Skip to content

Refactoring Collapse widget. #1168

Refactoring Collapse widget.

Refactoring Collapse widget. #1168

Triggered via pull request February 22, 2025 19:27
Status Success
Total duration 2m 30s
Artifacts

mutation.yml

on: pull_request
Matrix: mutation / roave-infection
Fit to window
Zoom out
Zoom in

Annotations

9 warnings
mutation / PHP 8.4-ubuntu-latest: src/CloseButtonTrait.php#L41
Escaped Mutant for Mutator "CloneRemoval": @@ @@ */ public function withoutCloseButton(): static { - $new = clone $this; + $new = $this; $new->showCloseButton = false; return $new; }
mutation / PHP 8.4-ubuntu-latest: src/CloseButtonTrait.php#L57
Escaped Mutant for Mutator "CloneRemoval": @@ @@ } public function withCloseButtonLabel(string|Stringable $label): static { - $new = clone $this; + $new = $this; $new->closeButtonLabel = $label; return $new; }
mutation / PHP 8.4-ubuntu-latest: src/CloseButtonTrait.php#L71
Escaped Mutant for Mutator "FalseValue": @@ @@ $new->encodeCloseButton = $encode; return $new; } - public function renderCloseButton(bool $inside = false): ?Tag + public function renderCloseButton(bool $inside = true): ?Tag { if ($inside && $this->showCloseButton === false) { return null;
mutation / PHP 8.4-ubuntu-latest: src/CloseButtonTrait.php#L82
Escaped Mutant for Mutator "CastString": @@ @@ $options = $this->closeButtonOptions; $tagName = ArrayHelper::remove($options, 'tag', 'button'); Html::addCssClass($options, ['widget' => 'btn-close']); - $label = (string) $this->closeButtonLabel; + $label = $this->closeButtonLabel; $options['data-bs-dismiss'] = $this->toggleComponent(); if (!$inside) { $options['data-bs-target'] = '#' . $this->getId();
mutation / PHP 8.4-ubuntu-latest: src/DropdownItem.php#L57
Escaped Mutant for Mutator "FalseValue": @@ @@ * * @psalm-param non-empty-string $headerTag */ - private function __construct(private readonly string $type = '', private readonly string|Stringable $content = '', private readonly string $url = '', private readonly bool $active = false, private readonly bool $disabled = false, private readonly array $attributes = [], private readonly array $itemAttributes = [], private readonly string $headerTag = 'h6') + private function __construct(private readonly string $type = '', private readonly string|Stringable $content = '', private readonly string $url = '', private readonly bool $active = true, private readonly bool $disabled = false, private readonly array $attributes = [], private readonly array $itemAttributes = [], private readonly string $headerTag = 'h6') { } /**
mutation / PHP 8.4-ubuntu-latest: src/DropdownItem.php#L58
Escaped Mutant for Mutator "FalseValue": @@ @@ * * @psalm-param non-empty-string $headerTag */ - private function __construct(private readonly string $type = '', private readonly string|Stringable $content = '', private readonly string $url = '', private readonly bool $active = false, private readonly bool $disabled = false, private readonly array $attributes = [], private readonly array $itemAttributes = [], private readonly string $headerTag = 'h6') + private function __construct(private readonly string $type = '', private readonly string|Stringable $content = '', private readonly string $url = '', private readonly bool $active = false, private readonly bool $disabled = true, private readonly array $attributes = [], private readonly array $itemAttributes = [], private readonly string $headerTag = 'h6') { } /**
mutation / PHP 8.4-ubuntu-latest: src/Widget.php#L32
Escaped Mutant for Mutator "PublicVisibility": @@ @@ * * @return string|null ID of the widget. */ - public function getId(): ?string + protected function getId(): ?string { if ($this->autoGenerate && $this->id === null) { $this->id = Html::generateId($this->autoIdPrefix);
mutation / PHP 8.4-ubuntu-latest: src/Widget.php#L34
Escaped Mutant for Mutator "LogicalAndAllSubExprNegation": @@ @@ */ public function getId(): ?string { - if ($this->autoGenerate && $this->id === null) { + if (!$this->autoGenerate && !($this->id === null)) { $this->id = Html::generateId($this->autoIdPrefix); } return $this->id;
mutation / PHP 8.4-ubuntu-latest: src/Widget.php#L48
Escaped Mutant for Mutator "CloneRemoval": @@ @@ */ public function id(string $id): static { - $new = clone $this; + $new = $this; $new->id = $id; return $new; }