Fix bagdes in README #1496
Annotations
11 warnings
Node.js 16 actions are deprecated. Please update the following actions to use Node.js 20: actions/cache@v3. For more information see: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/.
|
Run mutation tests with pcov and infection/infection:
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 with pcov and infection/infection:
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 with pcov and infection/infection:
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 with pcov and infection/infection:
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 with pcov and infection/infection:
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 with pcov and infection/infection:
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 with pcov and infection/infection:
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 with pcov and infection/infection:
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 with pcov and infection/infection:
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 with pcov and infection/infection:
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]);
|
Loading