Enhancement: Implement Composer\TildeVersionRange
#7
Annotations
1 error and 2 warnings
|
src/Composer/TildeVersionRange.php#L32
Escaped Mutant for Mutator "PregMatchRemoveCaret":
--- Original
+++ New
@@ @@
*/
public static function fromString(string $value) : self
{
- if (1 !== \preg_match('/^~(?P<prefix>v)?(?P<major>0|[1-9]\\d*)(\\.(?P<minor>0|[1-9]\\d*)(\\.(?P<patch>0|[1-9]\\d*)(\\.(?P<fourth>0|[1-9]\\d*))?)?)?(-(?P<stability>(alpha|beta|dev|RC|stable)))?$/', $value)) {
+ if (1 !== \preg_match('/~(?P<prefix>v)?(?P<major>0|[1-9]\\d*)(\\.(?P<minor>0|[1-9]\\d*)(\\.(?P<patch>0|[1-9]\\d*)(\\.(?P<fourth>0|[1-9]\\d*))?)?)?(-(?P<stability>(alpha|beta|dev|RC|stable)))?$/', $value)) {
throw Exception\InvalidTildeVersionRange::fromString($value);
}
return new self($value);
|
src/Composer/TildeVersionRange.php#L32
Escaped Mutant for Mutator "PregMatchRemoveDollar":
--- Original
+++ New
@@ @@
*/
public static function fromString(string $value) : self
{
- if (1 !== \preg_match('/^~(?P<prefix>v)?(?P<major>0|[1-9]\\d*)(\\.(?P<minor>0|[1-9]\\d*)(\\.(?P<patch>0|[1-9]\\d*)(\\.(?P<fourth>0|[1-9]\\d*))?)?)?(-(?P<stability>(alpha|beta|dev|RC|stable)))?$/', $value)) {
+ if (1 !== \preg_match('/^~(?P<prefix>v)?(?P<major>0|[1-9]\\d*)(\\.(?P<minor>0|[1-9]\\d*)(\\.(?P<patch>0|[1-9]\\d*)(\\.(?P<fourth>0|[1-9]\\d*))?)?)?(-(?P<stability>(alpha|beta|dev|RC|stable)))?/', $value)) {
throw Exception\InvalidTildeVersionRange::fromString($value);
}
return new self($value);
|
The logs for this run have expired and are no longer available.
Loading