-
-
Notifications
You must be signed in to change notification settings - Fork 869
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(laravel): parameter fixes and tests
- Loading branch information
Showing
8 changed files
with
44 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ abstract class Parameter | |
* @param array<string, mixed> $extraProperties | ||
* @param ParameterProviderInterface|callable|string|null $provider | ||
* @param FilterInterface|string|null $filter | ||
* @param Constraint|Constraint[]|null $constraints | ||
* @param Constraint|array<string, string>|string|Constraint[]|null $constraints | ||
*/ | ||
public function __construct( | ||
protected ?string $key = null, | ||
|
@@ -41,7 +41,7 @@ public function __construct( | |
protected ?bool $required = null, | ||
protected ?int $priority = null, | ||
protected ?false $hydra = null, | ||
protected Constraint|array|null $constraints = null, | ||
protected Constraint|array|string|null $constraints = null, | ||
protected string|\Stringable|null $security = null, | ||
protected ?string $securityMessage = null, | ||
protected ?array $extraProperties = [], | ||
|
@@ -103,9 +103,9 @@ public function getHydra(): ?bool | |
} | ||
|
||
/** | ||
* @return Constraint|Constraint[]|null | ||
* @return Constraint|string|array<string, string>|Constraint[]|null | ||
*/ | ||
public function getConstraints(): Constraint|array|null | ||
public function getConstraints(): Constraint|string|array|null | ||
{ | ||
return $this->constraints; | ||
} | ||
|
@@ -232,7 +232,10 @@ public function withHydra(false $hydra): static | |
return $self; | ||
} | ||
|
||
public function withConstraints(array|Constraint $constraints): static | ||
/** | ||
* @param string|array<string, string>|Constraint[]|Constraint | ||
*/ | ||
public function withConstraints(string|array|Constraint $constraints): static | ||
Check failure on line 238 in src/Metadata/Parameter.php GitHub Actions / PHPStan (PHP 8.3)
|
||
{ | ||
$self = clone $this; | ||
$self->constraints = $constraints; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters