@@ -48,7 +48,7 @@ discard block |
||
48 | 48 | * |
49 | 49 | * @return mixed |
50 | 50 | */ |
51 | - function data_get($target, string|array $key, mixed $default = null) |
|
51 | + function data_get($target, string | array $key, mixed $default = null) |
|
52 | 52 | { |
53 | 53 | if (is_null($key)) return $target; |
54 | 54 | |
@@ -58,7 +58,7 @@ discard block |
||
58 | 58 | if ($segment === '*') { |
59 | 59 | if ($target instanceof Collection) { |
60 | 60 | $target = $target->all(); |
61 | - } elseif (! is_array($target)) { |
|
61 | + } elseif ( ! is_array($target)) { |
|
62 | 62 | return value($default); |
63 | 63 | } |
64 | 64 | |
@@ -80,7 +80,7 @@ discard block |
||
80 | 80 | } |
81 | 81 | } |
82 | 82 | |
83 | -if( ! function_exists('data_set')) { |
|
83 | +if ( ! function_exists('data_set')) { |
|
84 | 84 | /** |
85 | 85 | * Set an item on an array or object using dot notation. |
86 | 86 | * |
@@ -91,7 +91,7 @@ discard block |
||
91 | 91 | * |
92 | 92 | * @return mixed |
93 | 93 | */ |
94 | - function data_set(&$target, string|array $key, mixed $value, bool $overwrite = true) |
|
94 | + function data_set(&$target, string | array $key, mixed $value, bool $overwrite = true) |
|
95 | 95 | { |
96 | 96 | $segments = is_array($key) ? $key : explode('.', $key); |
97 | 97 |
@@ -50,7 +50,9 @@ |
||
50 | 50 | */ |
51 | 51 | function data_get($target, string|array $key, mixed $default = null) |
52 | 52 | { |
53 | - if (is_null($key)) return $target; |
|
53 | + if (is_null($key)) { |
|
54 | + return $target; |
|
55 | + } |
|
54 | 56 | |
55 | 57 | $key = is_array($key) ? $key : explode('.', $key); |
56 | 58 |
@@ -69,7 +69,7 @@ discard block |
||
69 | 69 | $operator = '='; |
70 | 70 | } |
71 | 71 | |
72 | - return function ($item) use ($key, $operator, $value) { |
|
72 | + return function($item) use ($key, $operator, $value) { |
|
73 | 73 | $retrieved = data_get($item, $key); |
74 | 74 | |
75 | 75 | switch ($operator) { |
@@ -147,7 +147,7 @@ discard block |
||
147 | 147 | */ |
148 | 148 | public function jsonSerialize(): array |
149 | 149 | { |
150 | - return array_map(function ($value) { |
|
150 | + return array_map(function($value) { |
|
151 | 151 | if ($value instanceof JsonSerializable) { |
152 | 152 | return $value->jsonSerialize(); |
153 | 153 | } elseif ($value instanceof Arrayable) { |
@@ -55,7 +55,9 @@ |
||
55 | 55 | */ |
56 | 56 | public function operatorCallback($key, $operator = null, $value = null) |
57 | 57 | { |
58 | - if ($this->useAsCallable($key)) return $key; |
|
58 | + if ($this->useAsCallable($key)) { |
|
59 | + return $key; |
|
60 | + } |
|
59 | 61 | |
60 | 62 | if (func_num_args() === 1) { |
61 | 63 | $value = true; |
@@ -153,7 +153,7 @@ |
||
153 | 153 | * |
154 | 154 | * @return string|object |
155 | 155 | */ |
156 | - protected function getReflectionClass($class): string|object |
|
156 | + protected function getReflectionClass($class): string | object |
|
157 | 157 | { |
158 | 158 | $object = new ReflectionClass($class); |
159 | 159 |
@@ -106,7 +106,7 @@ |
||
106 | 106 | protected function loadJsonPaths($locale): array |
107 | 107 | { |
108 | 108 | return collect([$this->path]) |
109 | - ->reduce(function ($output, $path) use ($locale) { |
|
109 | + ->reduce(function($output, $path) use ($locale) { |
|
110 | 110 | $slash = DIRECTORY_SEPARATOR; |
111 | 111 | |
112 | 112 | if ($this->files->exists($fullPath = "{$path}$slash{$locale}.json")) { |
@@ -40,7 +40,7 @@ |
||
40 | 40 | { |
41 | 41 | $this->registerLoader(); |
42 | 42 | |
43 | - $this->app->singleton('translator', function ($app) { |
|
43 | + $this->app->singleton('translator', function($app) { |
|
44 | 44 | $locale = $app['config']['app.locale']; |
45 | 45 | $loader = $app['translator.loader']; |
46 | 46 |
@@ -205,7 +205,7 @@ |
||
205 | 205 | */ |
206 | 206 | public function create($table, Closure $callback): void |
207 | 207 | { |
208 | - $this->build(take($this->createDataprint($table), function ($dataprint) use ($callback) { |
|
208 | + $this->build(take($this->createDataprint($table), function($dataprint) use ($callback) { |
|
209 | 209 | $dataprint->create(); |
210 | 210 | |
211 | 211 | $callback($dataprint); |
@@ -38,7 +38,7 @@ |
||
38 | 38 | public function createDatabase($name): bool |
39 | 39 | { |
40 | 40 | return $this->connection->statement( |
41 | - $this->grammar->compileCreateDatabase($name, $this->connection) |
|
41 | + $this->grammar->compileCreateDatabase($name, $this->connection) |
|
42 | 42 | ); |
43 | 43 | } |
44 | 44 |
@@ -38,7 +38,7 @@ discard block |
||
38 | 38 | public function createDatabase($name): bool |
39 | 39 | { |
40 | 40 | return $this->connection->statement( |
41 | - $this->grammar->compileCreateDatabase($name, $this->connection) |
|
41 | + $this->grammar->compileCreateDatabase($name, $this->connection) |
|
42 | 42 | ); |
43 | 43 | } |
44 | 44 | |
@@ -152,10 +152,10 @@ discard block |
||
152 | 152 | public function getAllTables() |
153 | 153 | { |
154 | 154 | return $this->connection->select( |
155 | - $this->grammar->compileGetAllTables( |
|
156 | - $this->connection->getConfig('schema') |
|
157 | - ) |
|
158 | - ); |
|
155 | + $this->grammar->compileGetAllTables( |
|
156 | + $this->connection->getConfig('schema') |
|
157 | + ) |
|
158 | + ); |
|
159 | 159 | } |
160 | 160 | |
161 | 161 | /** |
@@ -166,9 +166,9 @@ discard block |
||
166 | 166 | public function getAllViews() |
167 | 167 | { |
168 | 168 | return $this->connection->select( |
169 | - $this->grammar->compileGetAllViews( |
|
170 | - $this->connection->getConfig('schema') |
|
171 | - ) |
|
172 | - ); |
|
169 | + $this->grammar->compileGetAllViews( |
|
170 | + $this->connection->getConfig('schema') |
|
171 | + ) |
|
172 | + ); |
|
173 | 173 | } |
174 | 174 | } |
175 | 175 | \ No newline at end of file |
@@ -957,7 +957,7 @@ |
||
957 | 957 | */ |
958 | 958 | protected function modifyDefault(Dataprint $dataprint, Flowing $column) |
959 | 959 | { |
960 | - if ( ! is_null($column->default)) { |
|
960 | + if ( ! is_null($column->default)) { |
|
961 | 961 | return " default ".$this->getDefaultValue($column->default); |
962 | 962 | } |
963 | 963 | } |
@@ -885,7 +885,9 @@ |
||
885 | 885 | */ |
886 | 886 | protected function modifyUnsigned(Dataprint $dataprint, Flowing $column): string |
887 | 887 | { |
888 | - if ($column->unsigned) return ' unsigned'; |
|
888 | + if ($column->unsigned) { |
|
889 | + return ' unsigned'; |
|
890 | + } |
|
889 | 891 | } |
890 | 892 | |
891 | 893 | /** |