Update tools #303
Annotations
10 warnings
src/DependencyInjection/Compiler/AutoConfigureAdminClassesCompilerPass.php#L66
Escaped Mutant for Mutator "Continue_":
--- Original
+++ New
@@ @@
foreach ($container->findTaggedServiceIds('sonata.admin') as $id => $attributes) {
$definition = $container->getDefinition($id);
if (!$definition->isAutoconfigured()) {
- continue;
+ break;
}
$adminClass = $definition->getClass();
if (null === $adminClass) {
|
src/DependencyInjection/Compiler/AutoConfigureAdminClassesCompilerPass.php#L88
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
$attributes = $this->getAttributes($adminClass);
foreach ($attributes as $attribute) {
$this->setDefaultValuesForAttribute($inflector, $attribute, $name, $attributeDefaults);
- $container->removeDefinition($id);
+
$definition = $container->setDefinition($attribute->getAdminCode() ?? $id, (new Definition($adminClass))->addTag('sonata.admin', $attribute->getOptions())->setArguments([$attribute->getAdminCode(), $attribute->getEntity(), $attribute->getController()])->setAutoconfigured(true)->setAutowired(true));
if (null !== $attribute->getTranslationDomain()) {
$definition->addMethodCall('setTranslationDomain', [$attribute->getTranslationDomain()]);
|
src/DependencyInjection/Compiler/AutoConfigureAdminClassesCompilerPass.php#L90
Escaped Mutant for Mutator "Coalesce":
--- Original
+++ New
@@ @@
foreach ($attributes as $attribute) {
$this->setDefaultValuesForAttribute($inflector, $attribute, $name, $attributeDefaults);
$container->removeDefinition($id);
- $definition = $container->setDefinition($attribute->getAdminCode() ?? $id, (new Definition($adminClass))->addTag('sonata.admin', $attribute->getOptions())->setArguments([$attribute->getAdminCode(), $attribute->getEntity(), $attribute->getController()])->setAutoconfigured(true)->setAutowired(true));
+ $definition = $container->setDefinition($id ?? $attribute->getAdminCode(), (new Definition($adminClass))->addTag('sonata.admin', $attribute->getOptions())->setArguments([$attribute->getAdminCode(), $attribute->getEntity(), $attribute->getController()])->setAutoconfigured(true)->setAutowired(true));
if (null !== $attribute->getTranslationDomain()) {
$definition->addMethodCall('setTranslationDomain', [$attribute->getTranslationDomain()]);
}
|
src/DependencyInjection/Compiler/AutoConfigureAdminClassesCompilerPass.php#L98
Escaped Mutant for Mutator "TrueValue":
--- Original
+++ New
@@ @@
foreach ($attributes as $attribute) {
$this->setDefaultValuesForAttribute($inflector, $attribute, $name, $attributeDefaults);
$container->removeDefinition($id);
- $definition = $container->setDefinition($attribute->getAdminCode() ?? $id, (new Definition($adminClass))->addTag('sonata.admin', $attribute->getOptions())->setArguments([$attribute->getAdminCode(), $attribute->getEntity(), $attribute->getController()])->setAutoconfigured(true)->setAutowired(true));
+ $definition = $container->setDefinition($attribute->getAdminCode() ?? $id, (new Definition($adminClass))->addTag('sonata.admin', $attribute->getOptions())->setArguments([$attribute->getAdminCode(), $attribute->getEntity(), $attribute->getController()])->setAutoconfigured(false)->setAutowired(true));
if (null !== $attribute->getTranslationDomain()) {
$definition->addMethodCall('setTranslationDomain', [$attribute->getTranslationDomain()]);
}
|
src/DependencyInjection/Compiler/AutoConfigureAdminClassesCompilerPass.php#L98
Escaped Mutant for Mutator "TrueValue":
--- Original
+++ New
@@ @@
foreach ($attributes as $attribute) {
$this->setDefaultValuesForAttribute($inflector, $attribute, $name, $attributeDefaults);
$container->removeDefinition($id);
- $definition = $container->setDefinition($attribute->getAdminCode() ?? $id, (new Definition($adminClass))->addTag('sonata.admin', $attribute->getOptions())->setArguments([$attribute->getAdminCode(), $attribute->getEntity(), $attribute->getController()])->setAutoconfigured(true)->setAutowired(true));
+ $definition = $container->setDefinition($attribute->getAdminCode() ?? $id, (new Definition($adminClass))->addTag('sonata.admin', $attribute->getOptions())->setArguments([$attribute->getAdminCode(), $attribute->getEntity(), $attribute->getController()])->setAutoconfigured(true)->setAutowired(false));
if (null !== $attribute->getTranslationDomain()) {
$definition->addMethodCall('setTranslationDomain', [$attribute->getTranslationDomain()]);
}
|
src/DependencyInjection/Compiler/AutoConfigureAdminClassesCompilerPass.php#L102
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
$container->removeDefinition($id);
$definition = $container->setDefinition($attribute->getAdminCode() ?? $id, (new Definition($adminClass))->addTag('sonata.admin', $attribute->getOptions())->setArguments([$attribute->getAdminCode(), $attribute->getEntity(), $attribute->getController()])->setAutoconfigured(true)->setAutowired(true));
if (null !== $attribute->getTranslationDomain()) {
- $definition->addMethodCall('setTranslationDomain', [$attribute->getTranslationDomain()]);
+ $definition->addMethodCall('setTranslationDomain', []);
}
if (\is_array($attribute->getTemplates())) {
foreach ($attribute->getTemplates() as $key => $template) {
|
src/DependencyInjection/Compiler/AutoConfigureAdminClassesCompilerPass.php#L107
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
}
if (\is_array($attribute->getTemplates())) {
foreach ($attribute->getTemplates() as $key => $template) {
- $definition->addMethodCall('setTemplate', [$key, $template]);
+ $definition->addMethodCall('setTemplate', [$template]);
}
}
if (\is_array($attribute->getChildren())) {
|
src/DependencyInjection/Compiler/AutoConfigureAdminClassesCompilerPass.php#L113
Escaped Mutant for Mutator "ArrayItemRemoval":
--- Original
+++ New
@@ @@
}
if (\is_array($attribute->getChildren())) {
foreach ($attribute->getChildren() as $childId) {
- $definition->addMethodCall('addChild', [new Reference($childId)]);
+ $definition->addMethodCall('addChild', []);
}
}
}
|
src/DependencyInjection/Compiler/AutoConfigureAdminClassesCompilerPass.php#L130
Escaped Mutant for Mutator "Identical":
--- Original
+++ New
@@ @@
if (null === $attribute->getLabel()) {
$attribute->setLabel($inflector->capitalize(str_replace('_', ' ', $inflector->tableize($name))));
}
- if (null === $attribute->getLabelCatalogue()) {
+ if (null !== $attribute->getLabelCatalogue()) {
$attribute->setLabelCatalogue($defaults['label_catalogue']);
}
if (null === $attribute->getLabelTranslatorStrategy()) {
|
src/DependencyInjection/Compiler/AutoConfigureAdminClassesCompilerPass.php#L131
Escaped Mutant for Mutator "MethodCallRemoval":
--- Original
+++ New
@@ @@
$attribute->setLabel($inflector->capitalize(str_replace('_', ' ', $inflector->tableize($name))));
}
if (null === $attribute->getLabelCatalogue()) {
- $attribute->setLabelCatalogue($defaults['label_catalogue']);
+
}
if (null === $attribute->getLabelTranslatorStrategy()) {
$attribute->setLabelTranslatorStrategy($defaults['label_translator_strategy']);
|
The logs for this run have expired and are no longer available.
Loading