@@ -12,5 +12,5 @@ |
||
| 12 | 12 | |
| 13 | 13 | interface VisibilityFilter |
| 14 | 14 | { |
| 15 | - public function accept(Stmt|Param $member): bool; |
|
| 15 | + public function accept(Stmt | Param $member): bool; |
|
| 16 | 16 | } |
@@ -19,16 +19,16 @@ |
||
| 19 | 19 | */ |
| 20 | 20 | final class ProtectedVisibilityFilter implements VisibilityFilter |
| 21 | 21 | { |
| 22 | - public function accept(Stmt|Param $member): bool |
|
| 22 | + public function accept(Stmt | Param $member): bool |
|
| 23 | 23 | { |
| 24 | 24 | if ($member instanceof ClassConst |
| 25 | 25 | || $member instanceof ClassMethod |
| 26 | 26 | || $member instanceof Property) { |
| 27 | - return ! $member->isProtected(); |
|
| 27 | + return !$member->isProtected(); |
|
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | if ($member instanceof Param) { |
| 31 | - return ! (bool) ($member->flags & Class_::MODIFIER_PROTECTED); |
|
| 31 | + return !(bool)($member->flags & Class_::MODIFIER_PROTECTED); |
|
| 32 | 32 | } |
| 33 | 33 | |
| 34 | 34 | return false; |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | { |
| 45 | 45 | $members = $definitionMembers; |
| 46 | 46 | foreach ($this->filters as $filter) { |
| 47 | - $members = array_filter($members, static fn (Stmt|Param $member): bool => $filter->accept($member)); |
|
| 47 | + $members = array_filter($members, static fn(Stmt | Param $member): bool => $filter->accept($member)); |
|
| 48 | 48 | } |
| 49 | 49 | return $members; |
| 50 | 50 | } |
@@ -37,7 +37,7 @@ discard block |
||
| 37 | 37 | */ |
| 38 | 38 | public function build(array $parsedAttributes, UseStatements $useStatements): array |
| 39 | 39 | { |
| 40 | - return array_map(function (Property $attribute) use ($useStatements): Attribute { |
|
| 40 | + return array_map(function(Property $attribute) use ($useStatements): Attribute { |
|
| 41 | 41 | $variable = new Variable( |
| 42 | 42 | "\${$attribute->props[0]->name}", |
| 43 | 43 | $this->typeBuilder->fromAttributeType($attribute->type, $attribute->getDocComment(), $useStatements) |
@@ -54,7 +54,7 @@ discard block |
||
| 54 | 54 | */ |
| 55 | 55 | public function fromPromotedProperties(array $promotedProperties, UseStatements $useStatements): array |
| 56 | 56 | { |
| 57 | - return array_map(function (Node\Param $param) use ($useStatements): Attribute { |
|
| 57 | + return array_map(function(Node\Param $param) use ($useStatements): Attribute { |
|
| 58 | 58 | /** @var Node\Expr\Variable $var */ |
| 59 | 59 | $var = $param->var; |
| 60 | 60 | |
@@ -44,7 +44,7 @@ discard block |
||
| 44 | 44 | public function constants(array $members): array |
| 45 | 45 | { |
| 46 | 46 | /** @var ClassConst[] $constants */ |
| 47 | - $constants = array_filter($members, static fn ($attribute): bool => $attribute instanceof ClassConst); |
|
| 47 | + $constants = array_filter($members, static fn($attribute): bool => $attribute instanceof ClassConst); |
|
| 48 | 48 | |
| 49 | 49 | /** @var ClassConst[] $filteredConstants */ |
| 50 | 50 | $filteredConstants = $this->filters->apply($constants); |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | } |
| 65 | 65 | |
| 66 | 66 | /** @var Property[] $properties */ |
| 67 | - $properties = array_filter($members, static fn ($attribute): bool => $attribute instanceof Property); |
|
| 67 | + $properties = array_filter($members, static fn($attribute): bool => $attribute instanceof Property); |
|
| 68 | 68 | |
| 69 | 69 | /** @var Property[] $filteredAttributes */ |
| 70 | 70 | $filteredAttributes = $this->filters->apply($properties); |
@@ -89,7 +89,7 @@ discard block |
||
| 89 | 89 | { |
| 90 | 90 | $promotedProperties = array_filter( |
| 91 | 91 | $constructor->getParams(), |
| 92 | - static fn (Node\Param $param) => $param->flags !== 0 |
|
| 92 | + static fn(Node\Param $param) => $param->flags !== 0 |
|
| 93 | 93 | ); |
| 94 | 94 | |
| 95 | 95 | /** @var Node\Param[] $filteredPromotedProperties */ |