Skip to content

Update tools

Update tools #1483

Triggered via pull request December 3, 2023 14:21
Status Success
Total duration 3m 49s
Artifacts

continuous-integration.yml

on: pull_request
run  /  Generate test matrix
4s
run / Generate test matrix
Matrix: run / Code Coverage
Matrix: run / Coding Standards
Matrix: run / Lint composer.json
Matrix: run / Lint symfony container
Matrix: run / Mutation Tests
Matrix: run / Static Code Analysis
Matrix: run / Lint twig files
Matrix: run / Lint XLIFF files
Matrix: run / Lint YML files
Matrix: run / tests
Fit to window
Zoom out
Zoom in

Annotations

10 warnings
run / Mutation Tests (8.3): src/DependencyInjection/Compiler/MenuCompilerPass.php#L23
Escaped Mutant for Mutator "LogicalOr": --- Original +++ New @@ @@ public function process(ContainerBuilder $container) : void { $groups = $container->getParameter('nucleos_menu.groups'); - if (!\is_array($groups) || 0 === \count($groups)) { + if (!\is_array($groups) && 0 === \count($groups)) { return; } $registry = $container->getDefinition('sonata.block.menu.registry');
run / Mutation Tests (8.3): src/DependencyInjection/Configuration.php#L58
Escaped Mutant for Mutator "MethodCallRemoval": --- Original +++ New @@ @@ { $menuNode = $node->children()->arrayNode('groups')->useAttributeAsKey('id')->prototype('array')->fixXmlConfig('attribute')->fixXmlConfig('item')->addDefaultsIfNotSet()->children()->scalarNode('name')->defaultNull()->end()->arrayNode('attributes')->useAttributeAsKey('id')->defaultValue([])->prototype('scalar')->end()->end()->arrayNode('items')->useAttributeAsKey('id')->defaultValue([])->prototype('array'); $this->buildPathNode($menuNode); - $menuNode->end()->end()->end()->end(); + } private function buildPathNode(NodeDefinition $node) : void {
run / Mutation Tests (8.3): src/Menu/ConfigBuilder.php#L31
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ { $this->factory = $factory; $this->translator = $translator; - $this->defaultOptions = ['attributes' => ['class' => 'dropdown'], 'childrenAttributes' => ['class' => 'dropdown-menu'], 'linkAttributes' => ['class' => 'dropdown-toggle', 'data-toggle' => 'dropdown', 'data-target' => '#'], 'extras' => ['safe_label' => true, 'translation_domain' => false]]; + $this->defaultOptions = ['childrenAttributes' => ['class' => 'dropdown-menu'], 'linkAttributes' => ['class' => 'dropdown-toggle', 'data-toggle' => 'dropdown', 'data-target' => '#'], 'extras' => ['safe_label' => true, 'translation_domain' => false]]; } public function buildMenu(array $menu, array $options) : ItemInterface {
run / Mutation Tests (8.3): src/Menu/ConfigBuilder.php#L32
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ { $this->factory = $factory; $this->translator = $translator; - $this->defaultOptions = ['attributes' => ['class' => 'dropdown'], 'childrenAttributes' => ['class' => 'dropdown-menu'], 'linkAttributes' => ['class' => 'dropdown-toggle', 'data-toggle' => 'dropdown', 'data-target' => '#'], 'extras' => ['safe_label' => true, 'translation_domain' => false]]; + $this->defaultOptions = ['attributes' => [], 'childrenAttributes' => ['class' => 'dropdown-menu'], 'linkAttributes' => ['class' => 'dropdown-toggle', 'data-toggle' => 'dropdown', 'data-target' => '#'], 'extras' => ['safe_label' => true, 'translation_domain' => false]]; } public function buildMenu(array $menu, array $options) : ItemInterface {
run / Mutation Tests (8.3): src/Menu/ConfigBuilder.php#L35
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ { $this->factory = $factory; $this->translator = $translator; - $this->defaultOptions = ['attributes' => ['class' => 'dropdown'], 'childrenAttributes' => ['class' => 'dropdown-menu'], 'linkAttributes' => ['class' => 'dropdown-toggle', 'data-toggle' => 'dropdown', 'data-target' => '#'], 'extras' => ['safe_label' => true, 'translation_domain' => false]]; + $this->defaultOptions = ['attributes' => ['class' => 'dropdown'], 'childrenAttributes' => [], 'linkAttributes' => ['class' => 'dropdown-toggle', 'data-toggle' => 'dropdown', 'data-target' => '#'], 'extras' => ['safe_label' => true, 'translation_domain' => false]]; } public function buildMenu(array $menu, array $options) : ItemInterface {
run / Mutation Tests (8.3): src/Menu/ConfigBuilder.php#L38
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ { $this->factory = $factory; $this->translator = $translator; - $this->defaultOptions = ['attributes' => ['class' => 'dropdown'], 'childrenAttributes' => ['class' => 'dropdown-menu'], 'linkAttributes' => ['class' => 'dropdown-toggle', 'data-toggle' => 'dropdown', 'data-target' => '#'], 'extras' => ['safe_label' => true, 'translation_domain' => false]]; + $this->defaultOptions = ['attributes' => ['class' => 'dropdown'], 'childrenAttributes' => ['class' => 'dropdown-menu'], 'linkAttributes' => ['data-toggle' => 'dropdown', 'data-target' => '#'], 'extras' => ['safe_label' => true, 'translation_domain' => false]]; } public function buildMenu(array $menu, array $options) : ItemInterface {
run / Mutation Tests (8.3): src/Menu/ConfigBuilder.php#L43
Escaped Mutant for Mutator "ArrayItemRemoval": --- Original +++ New @@ @@ { $this->factory = $factory; $this->translator = $translator; - $this->defaultOptions = ['attributes' => ['class' => 'dropdown'], 'childrenAttributes' => ['class' => 'dropdown-menu'], 'linkAttributes' => ['class' => 'dropdown-toggle', 'data-toggle' => 'dropdown', 'data-target' => '#'], 'extras' => ['safe_label' => true, 'translation_domain' => false]]; + $this->defaultOptions = ['attributes' => ['class' => 'dropdown'], 'childrenAttributes' => ['class' => 'dropdown-menu'], 'linkAttributes' => ['class' => 'dropdown-toggle', 'data-toggle' => 'dropdown', 'data-target' => '#'], 'extras' => ['translation_domain' => false]]; } public function buildMenu(array $menu, array $options) : ItemInterface {
run / Mutation Tests (8.3): src/Menu/ConfigBuilder.php#L44
Escaped Mutant for Mutator "TrueValue": --- Original +++ New @@ @@ { $this->factory = $factory; $this->translator = $translator; - $this->defaultOptions = ['attributes' => ['class' => 'dropdown'], 'childrenAttributes' => ['class' => 'dropdown-menu'], 'linkAttributes' => ['class' => 'dropdown-toggle', 'data-toggle' => 'dropdown', 'data-target' => '#'], 'extras' => ['safe_label' => true, 'translation_domain' => false]]; + $this->defaultOptions = ['attributes' => ['class' => 'dropdown'], 'childrenAttributes' => ['class' => 'dropdown-menu'], 'linkAttributes' => ['class' => 'dropdown-toggle', 'data-toggle' => 'dropdown', 'data-target' => '#'], 'extras' => ['safe_label' => false, 'translation_domain' => false]]; } public function buildMenu(array $menu, array $options) : ItemInterface {
run / Mutation Tests (8.3): src/Menu/ConfigBuilder.php#L45
Escaped Mutant for Mutator "FalseValue": --- Original +++ New @@ @@ { $this->factory = $factory; $this->translator = $translator; - $this->defaultOptions = ['attributes' => ['class' => 'dropdown'], 'childrenAttributes' => ['class' => 'dropdown-menu'], 'linkAttributes' => ['class' => 'dropdown-toggle', 'data-toggle' => 'dropdown', 'data-target' => '#'], 'extras' => ['safe_label' => true, 'translation_domain' => false]]; + $this->defaultOptions = ['attributes' => ['class' => 'dropdown'], 'childrenAttributes' => ['class' => 'dropdown-menu'], 'linkAttributes' => ['class' => 'dropdown-toggle', 'data-toggle' => 'dropdown', 'data-target' => '#'], 'extras' => ['safe_label' => true, 'translation_domain' => true]]; } public function buildMenu(array $menu, array $options) : ItemInterface {
run / Mutation Tests (8.3): src/Menu/ConfigBuilder.php#L96
Escaped Mutant for Mutator "GreaterThan": --- Original +++ New @@ @@ { $label = $this->createLabel($itemDefinition); $menuOptions = self::getOptions($baseMenuOptions, $itemDefinition); - $hasChildren = \array_key_exists('children', $itemDefinition) && \count($itemDefinition['children']) > 0; + $hasChildren = \array_key_exists('children', $itemDefinition) && \count($itemDefinition['children']) >= 0; if ($hasChildren) { $label .= ' <b class="caret caret-menu"></b>'; $menuOptions = array_merge($menuOptions, $this->defaultOptions, ['label' => $label]);