@@ -39,11 +39,11 @@ |
||
39 | 39 | public function getModelSchemas(): Collection |
40 | 40 | { |
41 | 41 | Utils::invariant( |
42 | - ! empty($this->modelSchemas), |
|
42 | + !empty($this->modelSchemas), |
|
43 | 43 | 'No model schemas defined on "'.get_class($this).'"' |
44 | 44 | ); |
45 | 45 | |
46 | - return collect($this->modelSchemas)->map(function (string $class) { |
|
46 | + return collect($this->modelSchemas)->map(function(string $class) { |
|
47 | 47 | return $this->registry->getModelSchema($class); |
48 | 48 | }); |
49 | 49 | } |
@@ -18,7 +18,7 @@ |
||
18 | 18 | */ |
19 | 19 | public function fields(): array |
20 | 20 | { |
21 | - return $this->getModelSchemas()->reduce(function (array $fields, ModelSchema $modelSchema) { |
|
21 | + return $this->getModelSchemas()->reduce(function(array $fields, ModelSchema $modelSchema) { |
|
22 | 22 | $inputType = 'Create'.$modelSchema->typename().'Input'; |
23 | 23 | |
24 | 24 | $fields[Utils::single($modelSchema->typename())] = $this->registry->field($inputType)->nullable(); |
@@ -14,7 +14,7 @@ |
||
14 | 14 | */ |
15 | 15 | public static function invariant($test, $message = '', ...$args) |
16 | 16 | { |
17 | - if (! $test) { |
|
17 | + if (!$test) { |
|
18 | 18 | if (count($args)) { |
19 | 19 | $message = sprintf($message, $args); |
20 | 20 | } |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | */ |
31 | 31 | protected function registerRoutes() |
32 | 32 | { |
33 | - if (! config('bakery.path')) { |
|
33 | + if (!config('bakery.path')) { |
|
34 | 34 | return; |
35 | 35 | } |
36 | 36 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | */ |
76 | 76 | protected function registerBakery() |
77 | 77 | { |
78 | - $this->app->singleton(Bakery::class, function () { |
|
78 | + $this->app->singleton(Bakery::class, function() { |
|
79 | 79 | $bakery = new Bakery(); |
80 | 80 | |
81 | 81 | $this->registerSecurityRules(); |
@@ -32,7 +32,7 @@ |
||
32 | 32 | */ |
33 | 33 | public function offsetGet($offset) |
34 | 34 | { |
35 | - if (! $this->offsetExists($offset)) { |
|
35 | + if (!$this->offsetExists($offset)) { |
|
36 | 36 | return null; |
37 | 37 | } |
38 | 38 |
@@ -29,7 +29,7 @@ |
||
29 | 29 | { |
30 | 30 | $fields = collect($this->fields); |
31 | 31 | |
32 | - return $fields->map(function (RootField $field) { |
|
32 | + return $fields->map(function(RootField $field) { |
|
33 | 33 | return $field->toArray(); |
34 | 34 | }); |
35 | 35 | } |
@@ -249,7 +249,7 @@ |
||
249 | 249 | { |
250 | 250 | $type = $this->getType($name); |
251 | 251 | |
252 | - if (! $type) { |
|
252 | + if (!$type) { |
|
253 | 253 | throw new TypeNotFound('Type '.$name.' not found.'); |
254 | 254 | } |
255 | 255 |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | */ |
129 | 129 | public function getArgs(): array |
130 | 130 | { |
131 | - return collect($this->args())->map(function (RootType $type) { |
|
131 | + return collect($this->args())->map(function(RootType $type) { |
|
132 | 132 | return $type->toType(); |
133 | 133 | })->toArray(); |
134 | 134 | } |
@@ -180,7 +180,7 @@ discard block |
||
180 | 180 | */ |
181 | 181 | private function getResolver() |
182 | 182 | { |
183 | - if (! method_exists($this, 'resolve')) { |
|
183 | + if (!method_exists($this, 'resolve')) { |
|
184 | 184 | return null; |
185 | 185 | } |
186 | 186 | |
@@ -196,7 +196,7 @@ discard block |
||
196 | 196 | */ |
197 | 197 | public function abstractResolver($root, array $args, $context, ResolveInfo $info) |
198 | 198 | { |
199 | - if (! method_exists($this, 'resolve')) { |
|
199 | + if (!method_exists($this, 'resolve')) { |
|
200 | 200 | return null; |
201 | 201 | } |
202 | 202 | |
@@ -218,7 +218,7 @@ discard block |
||
218 | 218 | try { |
219 | 219 | $result = $this->authorize($args); |
220 | 220 | |
221 | - if (! $result instanceof Response) { |
|
221 | + if (!$result instanceof Response) { |
|
222 | 222 | $result = $result ? Response::allow() : Response::deny(); |
223 | 223 | } |
224 | 224 | } catch (AuthorizationException $exception) { |
@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | { |
30 | 30 | // We wrap the query in a closure to make sure it |
31 | 31 | // does not clash with other (scoped) queries that are on the builder. |
32 | - return $query->where(function ($query) use ($args) { |
|
32 | + return $query->where(function($query) use ($args) { |
|
33 | 33 | return $this->applyFiltersRecursively($query, $args); |
34 | 34 | }); |
35 | 35 | } |
@@ -46,9 +46,9 @@ discard block |
||
46 | 46 | { |
47 | 47 | foreach ($args as $filter => $value) { |
48 | 48 | if ($filter === 'AND' || $filter === 'OR') { |
49 | - $query->where(function ($query) use ($value, $filter) { |
|
49 | + $query->where(function($query) use ($value, $filter) { |
|
50 | 50 | foreach ($value as $set) { |
51 | - if (! empty($set)) { |
|
51 | + if (!empty($set)) { |
|
52 | 52 | $this->applyFiltersRecursively($query, $set, $filter); |
53 | 53 | } |
54 | 54 | } |
@@ -86,11 +86,11 @@ discard block |
||
86 | 86 | $operator = '>='; |
87 | 87 | $type = $type ?: 'and'; |
88 | 88 | |
89 | - if (! $args || $args->isEmpty()) { |
|
89 | + if (!$args || $args->isEmpty()) { |
|
90 | 90 | return $query->doesntHave($relation, $type); |
91 | 91 | } |
92 | 92 | |
93 | - return $query->has($relation, $operator, $count, $type, function ($subQuery) use ($args) { |
|
93 | + return $query->has($relation, $operator, $count, $type, function($subQuery) use ($args) { |
|
94 | 94 | return $this->applyFiltersRecursively($subQuery, $args); |
95 | 95 | }); |
96 | 96 | } |