@@ -37,13 +37,13 @@ |
||
37 | 37 | */ |
38 | 38 | public function listForEloquent(string $class) : array |
39 | 39 | { |
40 | - $list = []; |
|
40 | + $list = [ ]; |
|
41 | 41 | $table = (new $class)->getTable(); |
42 | 42 | $columns = Schema::getColumnListing($table); |
43 | 43 | |
44 | 44 | foreach ($columns as $column) { |
45 | 45 | $type = Schema::getColumnType($table, $column); |
46 | - $list[$column] = $this->typesMap[$type] ?? null; |
|
46 | + $list[ $column ] = $this->typesMap[ $type ] ?? null; |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | return $list; |
@@ -37,17 +37,17 @@ discard block |
||
37 | 37 | */ |
38 | 38 | public function listForEloquent(string $class) : array |
39 | 39 | { |
40 | - $list = []; |
|
40 | + $list = [ ]; |
|
41 | 41 | $methods = (new ReflectionClass($class))->getMethods(ReflectionMethod::IS_PUBLIC); |
42 | - $declaredMethods = array_filter($methods, function ($method) use ($class) { |
|
42 | + $declaredMethods = array_filter($methods, function($method) use ($class) { |
|
43 | 43 | return $method->getDeclaringClass()->getName() == $class; |
44 | 44 | }); |
45 | 45 | |
46 | 46 | foreach ($declaredMethods as $method) { |
47 | 47 | if ($type = $this->getResourceTypeByMethodReturnType($method)) { |
48 | - $list[$method->getName()] = "relation|{$type}"; |
|
48 | + $list[ $method->getName() ] = "relation|{$type}"; |
|
49 | 49 | } elseif ($type = $this->getResourceTypeByMethodDefinition($method)) { |
50 | - $list[$method->getName()] = "relation|{$type}"; |
|
50 | + $list[ $method->getName() ] = "relation|{$type}"; |
|
51 | 51 | } |
52 | 52 | } |
53 | 53 | |
@@ -75,7 +75,7 @@ discard block |
||
75 | 75 | |
76 | 76 | $relation = lcfirst(class_basename($returnType)); |
77 | 77 | |
78 | - return $this->relationsMap[$relation] ?? null; |
|
78 | + return $this->relationsMap[ $relation ] ?? null; |
|
79 | 79 | } |
80 | 80 | |
81 | 81 | /** |
@@ -35,8 +35,8 @@ |
||
35 | 35 | */ |
36 | 36 | public function register() |
37 | 37 | { |
38 | - $this->app->singleton(Smokescreen::class, function () { |
|
39 | - return new Smokescreen(new \Rexlabs\Smokescreen\Smokescreen(), config('smokescreen', [])); |
|
38 | + $this->app->singleton(Smokescreen::class, function() { |
|
39 | + return new Smokescreen(new \Rexlabs\Smokescreen\Smokescreen(), config('smokescreen', [ ])); |
|
40 | 40 | }); |
41 | 41 | $this->app->alias(Smokescreen::class, 'smokescreen'); |
42 | 42 |