@@ -12,9 +12,9 @@ discard block |
||
12 | 12 | /** @param string[] $excludeCriteria */ |
13 | 13 | public function __construct( |
14 | 14 | protected string $group = 'default', |
15 | - protected string|null $strategy = null, |
|
16 | - protected string|null $description = null, |
|
17 | - protected string|null $type = null, |
|
15 | + protected string | null $strategy = null, |
|
16 | + protected string | null $description = null, |
|
17 | + protected string | null $type = null, |
|
18 | 18 | private array $excludeCriteria = [], |
19 | 19 | ) { |
20 | 20 | } |
@@ -24,17 +24,17 @@ discard block |
||
24 | 24 | return $this->group; |
25 | 25 | } |
26 | 26 | |
27 | - public function getStrategy(): string|null |
|
27 | + public function getStrategy(): string | null |
|
28 | 28 | { |
29 | 29 | return $this->strategy; |
30 | 30 | } |
31 | 31 | |
32 | - public function getDescription(): string|null |
|
32 | + public function getDescription(): string | null |
|
33 | 33 | { |
34 | 34 | return $this->description; |
35 | 35 | } |
36 | 36 | |
37 | - public function getType(): string|null |
|
37 | + public function getType(): string | null |
|
38 | 38 | { |
39 | 39 | return $this->type; |
40 | 40 | } |
@@ -33,9 +33,9 @@ discard block |
||
33 | 33 | /** @param mixed[]|null $associationMetadata */ |
34 | 34 | public function get( |
35 | 35 | Entity $targetEntity, |
36 | - Entity|null $owningEntity = null, |
|
37 | - string|null $associationName = null, |
|
38 | - array|null $associationMetadata = null, |
|
36 | + Entity | null $owningEntity = null, |
|
37 | + string | null $associationName = null, |
|
38 | + array | null $associationMetadata = null, |
|
39 | 39 | ): InputObjectType { |
40 | 40 | if ($owningEntity) { |
41 | 41 | $typeName = $owningEntity->getTypeName() . '_' . $associationName . '_filter'; |
@@ -56,16 +56,16 @@ discard block |
||
56 | 56 | // Limit entity filters |
57 | 57 | if ($entityMetadata['excludeCriteria']) { |
58 | 58 | $excludeCriteria = $entityMetadata['excludeCriteria']; |
59 | - $allowedFilters = array_filter($allowedFilters, static function ($value) use ($excludeCriteria) { |
|
60 | - return ! in_array($value, $excludeCriteria); |
|
59 | + $allowedFilters = array_filter($allowedFilters, static function($value) use ($excludeCriteria) { |
|
60 | + return !in_array($value, $excludeCriteria); |
|
61 | 61 | }); |
62 | 62 | } |
63 | 63 | |
64 | 64 | // Limit association filters |
65 | 65 | if ($associationName) { |
66 | 66 | $excludeCriteria = $associationMetadata['excludeCriteria']; |
67 | - $allowedFilters = array_filter($allowedFilters, static function ($value) use ($excludeCriteria) { |
|
68 | - return ! in_array($value, $excludeCriteria); |
|
67 | + $allowedFilters = array_filter($allowedFilters, static function($value) use ($excludeCriteria) { |
|
68 | + return !in_array($value, $excludeCriteria); |
|
69 | 69 | }); |
70 | 70 | } |
71 | 71 | |
@@ -73,7 +73,7 @@ discard block |
||
73 | 73 | $graphQLType = null; |
74 | 74 | |
75 | 75 | // Only process fields which are in the graphql metadata |
76 | - if (! in_array($fieldName, array_keys($entityMetadata['fields']))) { |
|
76 | + if (!in_array($fieldName, array_keys($entityMetadata['fields']))) { |
|
77 | 77 | continue; |
78 | 78 | } |
79 | 79 | |
@@ -97,8 +97,8 @@ discard block |
||
97 | 97 | $fieldExcludeCriteria = $entityMetadata['fields'][$fieldName]['excludeCriteria']; |
98 | 98 | $allowedFilters = array_filter( |
99 | 99 | $allowedFilters, |
100 | - static function ($value) use ($fieldExcludeCriteria) { |
|
101 | - return ! in_array($value, $fieldExcludeCriteria); |
|
100 | + static function($value) use ($fieldExcludeCriteria) { |
|
101 | + return !in_array($value, $fieldExcludeCriteria); |
|
102 | 102 | }, |
103 | 103 | ); |
104 | 104 | } |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | // Add eq filter for to-one associations |
114 | 114 | foreach ($classMetadata->getAssociationNames() as $associationName) { |
115 | 115 | // Only process fields which are in the graphql metadata |
116 | - if (! in_array($associationName, array_keys($entityMetadata['fields']))) { |
|
116 | + if (!in_array($associationName, array_keys($entityMetadata['fields']))) { |
|
117 | 117 | continue; |
118 | 118 | } |
119 | 119 | |
@@ -136,7 +136,7 @@ discard block |
||
136 | 136 | |
137 | 137 | $inputObject = new InputObjectType([ |
138 | 138 | 'name' => $typeName, |
139 | - 'fields' => static function () use ($fields) { |
|
139 | + 'fields' => static function() use ($fields) { |
|
140 | 140 | return $fields; |
141 | 141 | }, |
142 | 142 | ]); |