Adding WordPress Package Link Generator #278
Annotations
1 error and 7 warnings
Run mutation tests
Process completed with exit code 1.
|
Run mutation tests:
src/Url/WordPressGenerator.php#L16
Escaped Mutant for Mutator "DecrementInteger":
@@ @@
*/
public function supportsPackage(PackageInterface $package)
{
- return 0 === strpos($package->getName(), 'wpackagist-plugin/') || 0 === strpos($package->getName(), 'wpackagist-theme/');
+ return -1 === strpos($package->getName(), 'wpackagist-plugin/') || 0 === strpos($package->getName(), 'wpackagist-theme/');
}
/**
* Generates a compare URL for two versions of the same package.
|
Run mutation tests:
src/Url/WordPressGenerator.php#L16
Escaped Mutant for Mutator "DecrementInteger":
@@ @@
*/
public function supportsPackage(PackageInterface $package)
{
- return 0 === strpos($package->getName(), 'wpackagist-plugin/') || 0 === strpos($package->getName(), 'wpackagist-theme/');
+ return 0 === strpos($package->getName(), 'wpackagist-plugin/') || -1 === strpos($package->getName(), 'wpackagist-theme/');
}
/**
* Generates a compare URL for two versions of the same package.
|
Run mutation tests:
src/Url/WordPressGenerator.php#L16
Escaped Mutant for Mutator "LogicalOr":
@@ @@
*/
public function supportsPackage(PackageInterface $package)
{
- return 0 === strpos($package->getName(), 'wpackagist-plugin/') || 0 === strpos($package->getName(), 'wpackagist-theme/');
+ return 0 === strpos($package->getName(), 'wpackagist-plugin/') && 0 === strpos($package->getName(), 'wpackagist-theme/');
}
/**
* Generates a compare URL for two versions of the same package.
|
Run mutation tests:
src/Url/WordPressGenerator.php#L58
Escaped Mutant for Mutator "ProtectedVisibility":
@@ @@
/**
* @return string|null
*/
- protected function getPackageType(PackageInterface $package)
+ private function getPackageType(PackageInterface $package)
{
[$type] = explode('/', $package->getName(), 2);
return 0 === strpos($type, 'wpackagist-') ? substr($type, 11) : null;
|
Run mutation tests:
src/Url/WordPressGenerator.php#L60
Escaped Mutant for Mutator "IncrementInteger":
@@ @@
*/
protected function getPackageType(PackageInterface $package)
{
- [$type] = explode('/', $package->getName(), 2);
+ [$type] = explode('/', $package->getName(), 3);
return 0 === strpos($type, 'wpackagist-') ? substr($type, 11) : null;
}
/**
|
Run mutation tests:
src/Url/WordPressGenerator.php#L68
Escaped Mutant for Mutator "ProtectedVisibility":
@@ @@
/**
* @return string
*/
- protected function getPackageSlug(PackageInterface $package)
+ private function getPackageSlug(PackageInterface $package)
{
[, $slug] = explode('/', $package->getName(), 2);
return $slug;
}
}
|
Run mutation tests:
src/Url/WordPressGenerator.php#L70
Escaped Mutant for Mutator "IncrementInteger":
@@ @@
*/
protected function getPackageSlug(PackageInterface $package)
{
- [, $slug] = explode('/', $package->getName(), 2);
+ [, $slug] = explode('/', $package->getName(), 3);
return $slug;
}
}
|
Loading