@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | |
| 39 | 39 | // Custom types may hit this condition |
| 40 | 40 | // @codeCoverageIgnoreStart |
| 41 | - if (! $type instanceof ScalarType) { |
|
| 41 | + if (!$type instanceof ScalarType) { |
|
| 42 | 42 | continue; |
| 43 | 43 | } |
| 44 | 44 | |
@@ -47,11 +47,11 @@ discard block |
||
| 47 | 47 | // Between is a special case filter. |
| 48 | 48 | // To avoid creating a new Between type for each field, |
| 49 | 49 | // check if the Between type exists and reuse it. |
| 50 | - if (! $fields[$filter->value]['type'] instanceof Between) { |
|
| 50 | + if (!$fields[$filter->value]['type'] instanceof Between) { |
|
| 51 | 51 | continue; |
| 52 | 52 | } |
| 53 | 53 | |
| 54 | - if (! $typeContainer->has('Between_' . $type->name())) { |
|
| 54 | + if (!$typeContainer->has('Between_' . $type->name())) { |
|
| 55 | 55 | $typeContainer->set('Between_' . $type->name(), new Between($type)); |
| 56 | 56 | } |
| 57 | 57 | |
@@ -73,15 +73,15 @@ discard block |
||
| 73 | 73 | ); |
| 74 | 74 | |
| 75 | 75 | // Get the allowed filters |
| 76 | - $allowedFilters = array_udiff(Filters::cases(), $excludedFilters, static function ($a, $b) { |
|
| 76 | + $allowedFilters = array_udiff(Filters::cases(), $excludedFilters, static function($a, $b) { |
|
| 77 | 77 | return $a->value <=> $b->value; |
| 78 | 78 | }); |
| 79 | 79 | |
| 80 | 80 | // Limit association filters |
| 81 | 81 | if ($associationName) { |
| 82 | 82 | $excludeFilters = Filters::fromArray($associationMetadata['excludeFilters'] ?? []); |
| 83 | - $allowedFilters = array_filter($allowedFilters, static function ($value) use ($excludeFilters) { |
|
| 84 | - return ! in_array($value, $excludeFilters); |
|
| 83 | + $allowedFilters = array_filter($allowedFilters, static function($value) use ($excludeFilters) { |
|
| 84 | + return !in_array($value, $excludeFilters); |
|
| 85 | 85 | }); |
| 86 | 86 | } |
| 87 | 87 | |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | |
| 116 | 116 | foreach ($classMetadata->getFieldNames() as $fieldName) { |
| 117 | 117 | // Only process fields that are in the graphql metadata |
| 118 | - if (! in_array($fieldName, array_keys($entityMetadata['fields']))) { |
|
| 118 | + if (!in_array($fieldName, array_keys($entityMetadata['fields']))) { |
|
| 119 | 119 | continue; |
| 120 | 120 | } |
| 121 | 121 | |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | ->get($entityMetadata['fields'][$fieldName]['type']); |
| 124 | 124 | |
| 125 | 125 | // Custom types may hit this condition |
| 126 | - if (! $type instanceof ScalarType) { |
|
| 126 | + if (!$type instanceof ScalarType) { |
|
| 127 | 127 | continue; |
| 128 | 128 | } |
| 129 | 129 | |
@@ -140,8 +140,8 @@ discard block |
||
| 140 | 140 | $fieldExcludeFilters = Filters::fromArray($entityMetadata['fields'][$fieldName]['excludeFilters']); |
| 141 | 141 | $allowedFilters = array_filter( |
| 142 | 142 | $allowedFilters, |
| 143 | - static function ($value) use ($fieldExcludeFilters) { |
|
| 144 | - return ! in_array($value, $fieldExcludeFilters); |
|
| 143 | + static function($value) use ($fieldExcludeFilters) { |
|
| 144 | + return !in_array($value, $fieldExcludeFilters); |
|
| 145 | 145 | }, |
| 146 | 146 | ); |
| 147 | 147 | } |
@@ -188,7 +188,7 @@ discard block |
||
| 188 | 188 | // Add eq filter for to-one associations |
| 189 | 189 | foreach ($classMetadata->getAssociationNames() as $associationName) { |
| 190 | 190 | // Only process fields which are in the graphql metadata |
| 191 | - if (! isset($entityMetadata['fields'][$associationName])) { |
|
| 191 | + if (!isset($entityMetadata['fields'][$associationName])) { |
|
| 192 | 192 | continue; |
| 193 | 193 | } |
| 194 | 194 | |
@@ -200,14 +200,14 @@ discard block |
||
| 200 | 200 | ClassMetadata::MANY_TO_MANY, |
| 201 | 201 | ClassMetadata::ONE_TO_MANY, |
| 202 | 202 | ]) |
| 203 | - || ! in_array(Filters::EQ, $allowedFilters) |
|
| 203 | + || !in_array(Filters::EQ, $allowedFilters) |
|
| 204 | 204 | ) { |
| 205 | 205 | continue; |
| 206 | 206 | } |
| 207 | 207 | |
| 208 | 208 | $filterTypeName = 'Filters_ID_' . md5(serialize($allowedFilters)); |
| 209 | 209 | |
| 210 | - if (! $this->typeContainer->has($filterTypeName)) { |
|
| 210 | + if (!$this->typeContainer->has($filterTypeName)) { |
|
| 211 | 211 | $this->typeContainer->set($filterTypeName, new Association($this->typeContainer, Type::id(), [Filters::EQ])); |
| 212 | 212 | } |
| 213 | 213 | |