@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | |
53 | 53 | public function get(Entity $entity): Closure |
54 | 54 | { |
55 | - return function ($source, $args, $context, ResolveInfo $resolveInfo) { |
|
55 | + return function($source, $args, $context, ResolveInfo $resolveInfo) { |
|
56 | 56 | $fieldResolver = $this->fieldResolver; |
57 | 57 | $collection = $fieldResolver($source, $args, $context, $resolveInfo); |
58 | 58 | |
@@ -125,7 +125,7 @@ discard block |
||
125 | 125 | } |
126 | 126 | } |
127 | 127 | |
128 | - if (! empty($orderBy)) { |
|
128 | + if (!empty($orderBy)) { |
|
129 | 129 | $criteria->orderBy($orderBy); |
130 | 130 | } |
131 | 131 | |
@@ -183,7 +183,7 @@ discard block |
||
183 | 183 | // Get total count from collection then match |
184 | 184 | $itemCount = count($collection->matching($criteria)); |
185 | 185 | |
186 | - if ($last && ! $before) { |
|
186 | + if ($last && !$before) { |
|
187 | 187 | $offset = $itemCount - $last; |
188 | 188 | } |
189 | 189 | |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | ]; |
212 | 212 | |
213 | 213 | $lastCursor = $cursor; |
214 | - if (! $firstCursor) { |
|
214 | + if (!$firstCursor) { |
|
215 | 215 | $firstCursor = $cursor; |
216 | 216 | } |
217 | 217 |
@@ -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 | |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | // Add eq filter for to-one associations |
107 | 107 | foreach ($classMetadata->getAssociationNames() as $associationName) { |
108 | 108 | // Only process fields which are in the graphql metadata |
109 | - if (! in_array($associationName, array_keys($entityMetadata['fields']))) { |
|
109 | + if (!in_array($associationName, array_keys($entityMetadata['fields']))) { |
|
110 | 110 | continue; |
111 | 111 | } |
112 | 112 | |
@@ -131,7 +131,7 @@ discard block |
||
131 | 131 | /** @psalm-suppress InvalidArgument */ |
132 | 132 | $inputObject = new InputObjectType([ |
133 | 133 | 'name' => $typeName, |
134 | - 'fields' => static function () use ($fields) { |
|
134 | + 'fields' => static function() use ($fields) { |
|
135 | 135 | return $fields; |
136 | 136 | }, |
137 | 137 | ]); |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | |
34 | 34 | public function get(Entity $entity, string $eventName): Closure |
35 | 35 | { |
36 | - return function ($objectValue, array $args, $context, ResolveInfo $info) use ($entity, $eventName) { |
|
36 | + return function($objectValue, array $args, $context, ResolveInfo $info) use ($entity, $eventName) { |
|
37 | 37 | $entityClass = $entity->getEntityClass(); |
38 | 38 | |
39 | 39 | $queryBuilderFilter = (new Applicator($this->entityManager, $entityClass)) |
@@ -64,7 +64,7 @@ discard block |
||
64 | 64 | |
65 | 65 | foreach ($filterTypes as $field => $filters) { |
66 | 66 | // Allow for custom filters |
67 | - if (! is_array($filters)) { |
|
67 | + if (!is_array($filters)) { |
|
68 | 68 | continue; |
69 | 69 | } |
70 | 70 | foreach ($filters as $filter => $value) { |
@@ -186,7 +186,7 @@ discard block |
||
186 | 186 | $paginator = new Paginator($queryBuilder->getQuery()); |
187 | 187 | $itemCount = $paginator->count(); |
188 | 188 | |
189 | - if ($last && ! $before) { |
|
189 | + if ($last && !$before) { |
|
190 | 190 | $offset = $itemCount - $last; |
191 | 191 | $queryBuilder->setFirstResult($offset); |
192 | 192 | $paginator = new Paginator($queryBuilder->getQuery()); |
@@ -205,7 +205,7 @@ discard block |
||
205 | 205 | ]; |
206 | 206 | |
207 | 207 | $lastCursor = $cursor; |
208 | - if (! $firstCursor) { |
|
208 | + if (!$firstCursor) { |
|
209 | 209 | $firstCursor = $cursor; |
210 | 210 | } |
211 | 211 |