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