Skip to content

Commit

Permalink
add mixed as type
Browse files Browse the repository at this point in the history
  • Loading branch information
DjordyKoert committed Jan 18, 2025
1 parent 5e49bed commit b0afc78
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/RouteDescriber/FosRestDescriber.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ public function describe(OA\OpenApi $api, Route $route, \ReflectionMethod $refle
/**
* @param mixed $requirements Value to retrieve a pattern from
*/
private function getPattern($requirements): ?string
private function getPattern(mixed $requirements): ?string
{
if (\is_array($requirements) && isset($requirements['rule'])) {
return (string) $requirements['rule'];
Expand All @@ -107,7 +107,7 @@ private function getPattern($requirements): ?string
/**
* @param mixed $requirements Value to retrieve a format from
*/
private function getFormat($requirements): ?string
private function getFormat(mixed $requirements): ?string
{
if ($requirements instanceof Constraint && !$requirements instanceof Regex) {
if ($requirements instanceof DateTime) {
Expand Down Expand Up @@ -136,7 +136,7 @@ private function getFormat($requirements): ?string
*
* @return mixed[]|null
*/
private function getEnum($requirements, \ReflectionMethod $reflectionMethod): ?array
private function getEnum(mixed $requirements, \ReflectionMethod $reflectionMethod): ?array
{
if (!($requirements instanceof Choice)) {
return null;
Expand Down

0 comments on commit b0afc78

Please sign in to comment.