@@ -74,7 +74,7 @@ discard block |
||
74 | 74 | * @param string[] $directiveNamespaces |
75 | 75 | * @return array<string, string> |
76 | 76 | */ |
77 | - public static function getDirectivesGraphql($directiveNamespaces = [ 'Modelarium\Laravel\Lighthouse\Directives' ]): array |
|
77 | + public static function getDirectivesGraphql($directiveNamespaces = ['Modelarium\Laravel\Lighthouse\Directives']): array |
|
78 | 78 | { |
79 | 79 | $directives = []; |
80 | 80 | |
@@ -84,11 +84,11 @@ discard block |
||
84 | 84 | |
85 | 85 | foreach ($classesInNamespace as $class) { |
86 | 86 | $reflection = new \ReflectionClass($class); |
87 | - if (! $reflection->isInstantiable()) { |
|
87 | + if (!$reflection->isInstantiable()) { |
|
88 | 88 | continue; |
89 | 89 | } |
90 | 90 | |
91 | - if (! is_a($class, \Nuwave\Lighthouse\Schema\Directives\BaseDirective::class, true)) { |
|
91 | + if (!is_a($class, \Nuwave\Lighthouse\Schema\Directives\BaseDirective::class, true)) { |
|
92 | 92 | continue; |
93 | 93 | } |
94 | 94 | |
@@ -106,7 +106,7 @@ discard block |
||
106 | 106 | * @param string[] $directiveNamespaces |
107 | 107 | * @return string |
108 | 108 | */ |
109 | - public static function getDirectivesGraphqlString($directiveNamespaces = [ 'Modelarium\Laravel\Lighthouse\Directives' ]): string |
|
109 | + public static function getDirectivesGraphqlString($directiveNamespaces = ['Modelarium\Laravel\Lighthouse\Directives']): string |
|
110 | 110 | { |
111 | 111 | return implode(self::getDirectivesGraphql($directiveNamespaces)); |
112 | 112 | } |
@@ -166,7 +166,7 @@ discard block |
||
166 | 166 | if ($name === 'Mutation') { |
167 | 167 | continue; |
168 | 168 | } |
169 | - $g = $this->processType((string)$name, $object); |
|
169 | + $g = $this->processType((string) $name, $object); |
|
170 | 170 | $this->collection = $this->collection->merge($g); |
171 | 171 | } |
172 | 172 | } |
@@ -159,7 +159,7 @@ discard block |
||
159 | 159 | { |
160 | 160 | $originalTypeLoader = $this->schema->getConfig()->typeLoader; |
161 | 161 | |
162 | - $this->schema->getConfig()->typeLoader = function ($typeName) use ($originalTypeLoader) { |
|
162 | + $this->schema->getConfig()->typeLoader = function($typeName) use ($originalTypeLoader) { |
|
163 | 163 | $type = $originalTypeLoader($typeName); |
164 | 164 | if ($type instanceof \GraphQL\Type\Definition\CustomScalarType) { |
165 | 165 | $scalarName = $type->name; |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | { |
175 | 175 | $this->ast = Visitor::visit($this->ast, [ |
176 | 176 | // load the scalar type classes |
177 | - NodeKind::SCALAR_TYPE_DEFINITION => function ($node) { |
|
177 | + NodeKind::SCALAR_TYPE_DEFINITION => function($node) { |
|
178 | 178 | $scalarName = $node->name->value; |
179 | 179 | |
180 | 180 | // load classes |
@@ -237,7 +237,7 @@ discard block |
||
237 | 237 | return []; |
238 | 238 | } |
239 | 239 | return array_map( |
240 | - function ($i) use ($basedir) { |
|
240 | + function($i) use ($basedir) { |
|
241 | 241 | $name = $i[1]; |
242 | 242 | if (array_key_exists($name, $this->imports)) { |
243 | 243 | return $this->imports[$name]; |