New command: app:new:from:drupal7
#1760
This run and associated checks have been archived and are scheduled for deletion.
Learn more about checks retention
mutation.yml
on: pull_request
Mutation Testing
2m 31s
Annotations
10 warnings
Mutation Testing:
src/Command/App/From/Composer/ProjectBuilder.php#L69
Escaped Mutant for Mutator "InstanceOf_":
--- Original
+++ New
@@ @@
// Add recommended dependencies and patches, if any.
foreach ($this->resolver->getRecommendations() as $recommendation) {
assert($recommendation instanceof RecommendationInterface);
- if ($recommendation instanceof NormalizableInterface) {
+ if (true) {
$recommendations[] = $recommendation->normalize();
}
if ($recommendation instanceof AbandonmentRecommendation) {
|
Mutation Testing:
src/Command/App/From/Composer/ProjectBuilder.php#L109
Escaped Mutant for Mutator "LogicalAnd":
--- Original
+++ New
@@ @@
if ($recommendation->hasPatches()) {
$composer_json['extra']['patches'][$recommended_package_name] = $recommendation->getPatches();
}
- if ($recommendation->isVetted() && $recommendation->hasModulesToInstall()) {
+ if ($recommendation->isVetted() || $recommendation->hasModulesToInstall()) {
array_push($modules_to_install, ...$recommendation->getModulesToInstall());
}
}
|
Mutation Testing:
src/Command/App/From/Composer/ProjectBuilder.php#L126
Escaped Mutant for Mutator "UnwrapArrayValues":
--- Original
+++ New
@@ @@
if (isset($composer_json['extra']['patches'])) {
ksort($composer_json['extra']['patches']);
}
- $source_modules = array_values(array_map(function (ExtensionInterface $module) {
+ $source_modules = array_map(function (ExtensionInterface $module) {
// phpcs:disable SlevomatCodingStandard.Arrays.AlphabeticallySortedByKeys
return ['name' => $module->getName(), 'humanName' => $module->getHumanName(), 'version' => $module->getVersion()];
// phpcs:enable
- }, $this->siteInspector->getExtensions(SiteInspectorInterface::FLAG_EXTENSION_MODULE | SiteInspectorInterface::FLAG_EXTENSION_ENABLED)));
+ }, $this->siteInspector->getExtensions(SiteInspectorInterface::FLAG_EXTENSION_MODULE | SiteInspectorInterface::FLAG_EXTENSION_ENABLED));
$module_names = array_column($source_modules, 'name');
array_multisort($module_names, SORT_STRING, $source_modules);
$recommendation_ids = array_column($recommendations, 'id');
|
Mutation Testing:
src/Command/App/From/Composer/ProjectBuilder.php#L136
Escaped Mutant for Mutator "FunctionCallRemoval":
--- Original
+++ New
@@ @@
// phpcs:enable
}, $this->siteInspector->getExtensions(SiteInspectorInterface::FLAG_EXTENSION_MODULE | SiteInspectorInterface::FLAG_EXTENSION_ENABLED)));
$module_names = array_column($source_modules, 'name');
- array_multisort($module_names, SORT_STRING, $source_modules);
+
$recommendation_ids = array_column($recommendations, 'id');
array_multisort($recommendation_ids, SORT_STRING, $recommendations);
// phpcs:disable SlevomatCodingStandard.Arrays.AlphabeticallySortedByKeys
|
Mutation Testing:
src/Command/App/From/Configuration.php#L30
Escaped Mutant for Mutator "ProtectedVisibility":
--- Original
+++ New
@@ @@
* @param array $config
* An array of configuration, usually parsed from a configuration file.
*/
- protected function __construct(array $config)
+ private function __construct(array $config)
{
$this->array = static::schema(['rootPackageDefinition' => 'is_array'])($config);
}
|
Mutation Testing:
src/Command/App/From/JsonResourceParserTrait.php#L20
Escaped Mutant for Mutator "ProtectedVisibility":
--- Original
+++ New
@@ @@
* @return mixed
* The decoded JSON, usually an array.
*/
- protected static function parseJsonResource($resource) : mixed
+ private static function parseJsonResource($resource) : mixed
{
assert(is_resource($resource));
$json = stream_get_contents($resource);
|
Mutation Testing:
src/Command/App/From/JsonResourceParserTrait.php#L23
Escaped Mutant for Mutator "DecrementInteger":
--- Original
+++ New
@@ @@
{
assert(is_resource($resource));
$json = stream_get_contents($resource);
- return json_decode($json, TRUE, 512, JSON_OBJECT_AS_ARRAY | JSON_THROW_ON_ERROR);
+ return json_decode($json, TRUE, 511, JSON_OBJECT_AS_ARRAY | JSON_THROW_ON_ERROR);
}
}
|
Mutation Testing:
src/Command/App/From/JsonResourceParserTrait.php#L23
Escaped Mutant for Mutator "IncrementInteger":
--- Original
+++ New
@@ @@
{
assert(is_resource($resource));
$json = stream_get_contents($resource);
- return json_decode($json, TRUE, 512, JSON_OBJECT_AS_ARRAY | JSON_THROW_ON_ERROR);
+ return json_decode($json, TRUE, 513, JSON_OBJECT_AS_ARRAY | JSON_THROW_ON_ERROR);
}
}
|
Mutation Testing:
src/Command/App/From/Recommendation/AbandonmentRecommendation.php#L48
Escaped Mutant for Mutator "ProtectedVisibility":
--- Original
+++ New
@@ @@
* @param array $definition
* The original decoded definition.
*/
- protected function __construct(Closure $extension_evaluator, array $definition)
+ private function __construct(Closure $extension_evaluator, array $definition)
{
$this->evaluateExtension = $extension_evaluator;
$this->definition = $definition;
|
Mutation Testing:
src/Command/App/From/Recommendation/AbandonmentRecommendation.php#L66
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
public static function createFromDefinition(mixed $definition) : RecommendationInterface
{
// phpcs:disable SlevomatCodingStandard.Arrays.AlphabeticallySortedByKeys
- $validator = static::schema(['package' => 'is_null', 'note' => 'is_string', 'replaces' => static::schema(['name' => 'is_string']), 'vetted' => 'is_bool']);
+ $validator = static::schema(['note' => 'is_string', 'replaces' => static::schema(['name' => 'is_string']), 'vetted' => 'is_bool']);
// phpcs:enable
try {
$validated = $validator($definition);
|