Skip to content

Commit

Permalink
support backed enum
Browse files Browse the repository at this point in the history
  • Loading branch information
rodber committed Feb 5, 2025
1 parent 7dea06c commit 56002a6
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Attributes/StringAttr.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
namespace Chevere\Parameter\Attributes;

use Attribute;
use BackedEnum;
use Chevere\Parameter\Interfaces\ParameterAttributeInterface;
use Chevere\Parameter\Interfaces\ParameterInterface;
use Chevere\Parameter\Interfaces\StringParameterInterface;
Expand All @@ -28,7 +29,7 @@ class StringAttr implements ParameterAttributeInterface
private StringParameterInterface $parameter;

public function __construct(
string $pattern = '',
string|BackedEnum $pattern = '',
string $description = '',
bool $sensitive = false

Check warning on line 34 in src/Attributes/StringAttr.php

View workflow job for this annotation

GitHub Actions / PHP 8.1 test on ubuntu-24.04

Escaped Mutant for Mutator "FalseValue": @@ @@ { use AttrTrait; private StringParameterInterface $parameter; - public function __construct(string|BackedEnum $pattern = '', string $description = '', bool $sensitive = false) + public function __construct(string|BackedEnum $pattern = '', string $description = '', bool $sensitive = true) { $this->parameter = string(regex: $pattern, description: $description, sensitive: $sensitive); }

Check warning on line 34 in src/Attributes/StringAttr.php

View workflow job for this annotation

GitHub Actions / PHP 8.2 test on ubuntu-24.04

Escaped Mutant for Mutator "FalseValue": @@ @@ { use AttrTrait; private StringParameterInterface $parameter; - public function __construct(string|BackedEnum $pattern = '', string $description = '', bool $sensitive = false) + public function __construct(string|BackedEnum $pattern = '', string $description = '', bool $sensitive = true) { $this->parameter = string(regex: $pattern, description: $description, sensitive: $sensitive); }

Check warning on line 34 in src/Attributes/StringAttr.php

View workflow job for this annotation

GitHub Actions / PHP 8.3 test on ubuntu-24.04

Escaped Mutant for Mutator "FalseValue": @@ @@ { use AttrTrait; private StringParameterInterface $parameter; - public function __construct(string|BackedEnum $pattern = '', string $description = '', bool $sensitive = false) + public function __construct(string|BackedEnum $pattern = '', string $description = '', bool $sensitive = true) { $this->parameter = string(regex: $pattern, description: $description, sensitive: $sensitive); }

Check warning on line 34 in src/Attributes/StringAttr.php

View workflow job for this annotation

GitHub Actions / PHP 8.4 test on ubuntu-24.04

Escaped Mutant for Mutator "FalseValue": @@ @@ { use AttrTrait; private StringParameterInterface $parameter; - public function __construct(string|BackedEnum $pattern = '', string $description = '', bool $sensitive = false) + public function __construct(string|BackedEnum $pattern = '', string $description = '', bool $sensitive = true) { $this->parameter = string(regex: $pattern, description: $description, sensitive: $sensitive); }
) {
Expand Down

0 comments on commit 56002a6

Please sign in to comment.