@@ -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 | $typeName = $owningEntity ? |
| 41 | 41 | $owningEntity->getTypeName() . '_' . $associationName . '_filter' |
@@ -53,22 +53,22 @@ discard block |
||
| 53 | 53 | // Limit entity filters |
| 54 | 54 | if ($entityMetadata['excludeCriteria']) { |
| 55 | 55 | $excludeCriteria = $entityMetadata['excludeCriteria']; |
| 56 | - $allowedFilters = array_filter($allowedFilters, static function ($value) use ($excludeCriteria) { |
|
| 57 | - return ! in_array($value, $excludeCriteria); |
|
| 56 | + $allowedFilters = array_filter($allowedFilters, static function($value) use ($excludeCriteria) { |
|
| 57 | + return !in_array($value, $excludeCriteria); |
|
| 58 | 58 | }); |
| 59 | 59 | } |
| 60 | 60 | |
| 61 | 61 | // Limit association filters |
| 62 | 62 | if ($associationName) { |
| 63 | 63 | $excludeCriteria = $associationMetadata['excludeCriteria']; |
| 64 | - $allowedFilters = array_filter($allowedFilters, static function ($value) use ($excludeCriteria) { |
|
| 65 | - return ! in_array($value, $excludeCriteria); |
|
| 64 | + $allowedFilters = array_filter($allowedFilters, static function($value) use ($excludeCriteria) { |
|
| 65 | + return !in_array($value, $excludeCriteria); |
|
| 66 | 66 | }); |
| 67 | 67 | } |
| 68 | 68 | |
| 69 | 69 | foreach ($classMetadata->getFieldNames() as $fieldName) { |
| 70 | 70 | // Only process fields that are in the graphql metadata |
| 71 | - if (! in_array($fieldName, array_keys($entityMetadata['fields']))) { |
|
| 71 | + if (!in_array($fieldName, array_keys($entityMetadata['fields']))) { |
|
| 72 | 72 | continue; |
| 73 | 73 | } |
| 74 | 74 | |
@@ -92,8 +92,8 @@ discard block |
||
| 92 | 92 | $fieldExcludeCriteria = $entityMetadata['fields'][$fieldName]['excludeCriteria']; |
| 93 | 93 | $allowedFilters = array_filter( |
| 94 | 94 | $allowedFilters, |
| 95 | - static function ($value) use ($fieldExcludeCriteria) { |
|
| 96 | - return ! in_array($value, $fieldExcludeCriteria); |
|
| 95 | + static function($value) use ($fieldExcludeCriteria) { |
|
| 96 | + return !in_array($value, $fieldExcludeCriteria); |
|
| 97 | 97 | }, |
| 98 | 98 | ); |
| 99 | 99 | } |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | // Add eq filter for to-one associations |
| 109 | 109 | foreach ($classMetadata->getAssociationNames() as $associationName) { |
| 110 | 110 | // Only process fields which are in the graphql metadata |
| 111 | - if (! in_array($associationName, array_keys($entityMetadata['fields']))) { |
|
| 111 | + if (!in_array($associationName, array_keys($entityMetadata['fields']))) { |
|
| 112 | 112 | continue; |
| 113 | 113 | } |
| 114 | 114 | |