Move attributes
to php-forge/html-attributes
package.
#1124
Annotations
10 warnings
mutation / PHP 8.1-ubuntu-latest:
src/Attribute/Custom/HasContainerCollection.php#L30
Escaped Mutant for Mutator "CloneRemoval":
--- Original
+++ New
@@ @@
*/
public function container(bool $value) : static
{
- $new = clone $this;
+ $new = $this;
$new->container = $value;
return $new;
}
|
mutation / PHP 8.1-ubuntu-latest:
src/Attribute/Custom/HasContainerCollection.php#L45
Escaped Mutant for Mutator "CloneRemoval":
--- Original
+++ New
@@ @@
*/
public function containerAttributes(array $values = []) : static
{
- $new = clone $this;
+ $new = $this;
$new->containerAttributes = $values;
return $new;
}
|
mutation / PHP 8.1-ubuntu-latest:
src/Attribute/Custom/HasContainerCollection.php#L59
Escaped Mutant for Mutator "FalseValue":
--- Original
+++ New
@@ @@
*
* @return static A new instance of the current class with the specified container class.
*/
- public function containerClass(string $value, bool $override = false) : static
+ public function containerClass(string $value, bool $override = true) : static
{
$new = clone $this;
CssClass::add($new->containerAttributes, $value, $override);
|
mutation / PHP 8.1-ubuntu-latest:
src/Attribute/Custom/HasContainerCollection.php#L61
Escaped Mutant for Mutator "CloneRemoval":
--- Original
+++ New
@@ @@
*/
public function containerClass(string $value, bool $override = false) : static
{
- $new = clone $this;
+ $new = $this;
CssClass::add($new->containerAttributes, $value, $override);
return $new;
}
|
mutation / PHP 8.1-ubuntu-latest:
src/Attribute/Custom/HasContainerCollection.php#L82
Escaped Mutant for Mutator "CloneRemoval":
--- Original
+++ New
@@ @@
if ($value === '') {
throw new InvalidArgumentException('The container tag must be a non-empty string.');
}
- $new = clone $this;
+ $new = $this;
$new->containerTag = $value;
return $new;
}
|
mutation / PHP 8.1-ubuntu-latest:
src/Attribute/Custom/HasContainerCollection.php#L88
Escaped Mutant for Mutator "ProtectedVisibility":
--- Original
+++ New
@@ @@
$new->containerTag = $value;
return $new;
}
- protected function renderContainerTag(string|null $id, string ...$content) : string
+ private function renderContainerTag(string|null $id, string ...$content) : string
{
return match ($this->container) {
true => Tag::widget()->attributes($this->containerAttributes)->content(...$content)->id($id)->tagName($this->containerTag)->render(),
|
mutation / PHP 8.1-ubuntu-latest:
src/Attribute/Custom/HasContentAttribute.php#L23
Escaped Mutant for Mutator "CloneRemoval":
--- Original
+++ New
@@ @@
*/
public function content(string $value) : static
{
- $new = clone $this;
+ $new = $this;
$new->attributes['content'] = Encode::content($value);
return $new;
}
}
|
mutation / PHP 8.1-ubuntu-latest:
src/Attribute/Custom/HasCsrf.php#L27
Escaped Mutant for Mutator "CloneRemoval":
--- Original
+++ New
@@ @@
*/
public function csrf(string|Stringable $csrfToken, string $csrfName = '_csrf') : static
{
- $new = clone $this;
+ $new = $this;
$new->csrfToken = (string) $csrfToken;
$new->csrfName = $csrfName;
if ($new->csrfToken !== '') {
|
mutation / PHP 8.1-ubuntu-latest:
src/Attribute/Custom/HasEnclosedByLabel.php#L23
Escaped Mutant for Mutator "CloneRemoval":
--- Original
+++ New
@@ @@
*/
public function enclosedByLabel(bool $value) : static
{
- $new = clone $this;
+ $new = $this;
$new->enclosedByLabel = $value;
return $new;
}
}
|
mutation / PHP 8.1-ubuntu-latest:
src/Attribute/Custom/HasSeparator.php#L23
Escaped Mutant for Mutator "CloneRemoval":
--- Original
+++ New
@@ @@
*/
public function separator(string $value) : static
{
- $new = clone $this;
+ $new = $this;
$new->separator = $value;
return $new;
}
}
|