Use default FUNDING and ISSUE_TEMPLATE #567
Annotations
10 warnings
|
|
|
mutation / PHP 8.1-ubuntu-latest:
src/Menu.php#L417
Escaped Mutant for Mutator "UnwrapArrayMerge":
--- Original
+++ New
@@ @@
$attributes = $item['itemAttributes'] ?? [];
/** @var array */
$linkAttributes = $item['linkAttributes'] ?? [];
- $attributes = array_merge($this->itemAttributes, $attributes);
+ $attributes = $attributes;
if ($i === 0 && $this->firstItemCssClass !== '') {
Html::addCssClass($attributes, $this->firstItemCssClass);
}
|
|
mutation / PHP 8.1-ubuntu-latest:
src/Menu.php#L369
Escaped Mutant for Mutator "TrueValue":
--- Original
+++ New
@@ @@
$items[$i]['items'] = $this->normalizeItems($childItems);
if ($active) {
$items[$i]['active'] = true;
- $active = true;
+ $active = false;
}
}
}
|
|
mutation / PHP 8.1-ubuntu-latest:
src/Menu.php#L354
Escaped Mutant for Mutator "Identical":
--- Original
+++ New
@@ @@
}
$url = $child['url'] ?? '#';
$active = $child['active'] ?? false;
- if ($active === false) {
+ if ($active !== false) {
$child['active'] = $this->isItemActive($url, $this->currentPath, $this->activateItems);
}
if ($this->activateParents) {
|
|
mutation / PHP 8.1-ubuntu-latest:
src/Menu.php#L354
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
}
$url = $child['url'] ?? '#';
$active = $child['active'] ?? false;
- if ($active === false) {
+ if ($active === true) {
$child['active'] = $this->isItemActive($url, $this->currentPath, $this->activateItems);
}
if ($this->activateParents) {
|
|
mutation / PHP 8.1-ubuntu-latest:
src/Menu.php#L351
Escaped Mutant for Mutator "Coalesce":
--- Original
+++ New
@@ @@
unset($items[$i]);
continue;
}
- $url = $child['url'] ?? '#';
+ $url = '#' ?? $child['url'];
$active = $child['active'] ?? false;
if ($active === false) {
$child['active'] = $this->isItemActive($url, $this->currentPath, $this->activateItems);
|
|
mutation / PHP 8.1-ubuntu-latest:
src/Menu.php#L348
Escaped Mutant for Mutator "Continue_":
--- Original
+++ New
@@ @@
foreach ($items as $i => $child) {
if (isset($child['items']) && $child['items'] === [] && $this->hiddenEmptyItems) {
unset($items[$i]);
- continue;
+ break;
}
$url = $child['url'] ?? '#';
$active = $child['active'] ?? false;
|
|
mutation / PHP 8.1-ubuntu-latest:
src/Menu.php#L325
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
*
* {@see items}
*/
- private function normalizeItems(array $items, bool &$active = false) : array
+ private function normalizeItems(array $items, bool &$active = true) : array
{
/**
* @psalm-var array<
|
|
mutation / PHP 8.1-ubuntu-latest:
src/Menu.php#L237
Escaped Mutant for Mutator "CloneRemoval":
--- Original
+++ New
@@ @@
if ($value === '') {
throw new InvalidArgumentException('Tag for item container cannot be empty.');
}
- $new = clone $this;
+ $new = $this;
$new->itemsTag = $value;
return $new;
}
|
|
mutation / PHP 8.1-ubuntu-latest:
src/Menu.php#L154
Escaped Mutant for Mutator "CloneRemoval":
--- Original
+++ New
@@ @@
*/
public function hiddenEmptyItems() : self
{
- $new = clone $this;
+ $new = $this;
$new->hiddenEmptyItems = true;
return $new;
}
|