@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | // Now that we have verified the option is dynamic and has |
87 | 87 | // matches, we get the Option object from the implemented |
88 | 88 | // method to deal with the matches. |
89 | - $parameter = $this->parseMatches($this->getMatches($option)); |
|
89 | + $parameter = $this->parseMatches($this->getMatches($option)); |
|
90 | 90 | |
91 | 91 | // Return the content of the option executed. |
92 | 92 | return $this->runForParameter($parameter); |
@@ -103,7 +103,7 @@ discard block |
||
103 | 103 | */ |
104 | 104 | public function addFormatters($formatters) |
105 | 105 | { |
106 | - array_walk($formatters, function ($formatter, $name) { |
|
106 | + array_walk($formatters, function($formatter, $name) { |
|
107 | 107 | $this->addFormatter($formatter, is_int($name) ? null : $name); |
108 | 108 | }); |
109 | 109 | |
@@ -211,7 +211,7 @@ discard block |
||
211 | 211 | * @param array $params |
212 | 212 | * @return mixed |
213 | 213 | */ |
214 | - protected function callFormatter($formatter, array $params = []) |
|
214 | + protected function callFormatter($formatter, array $params = [ ]) |
|
215 | 215 | { |
216 | 216 | return $this->getContainer()->call($formatter, $params); |
217 | 217 | } |
@@ -236,7 +236,7 @@ discard block |
||
236 | 236 | $formatter = $this->getContainer()->make($formatter); |
237 | 237 | } |
238 | 238 | |
239 | - return [$formatter, 'format']; |
|
239 | + return [ $formatter, 'format' ]; |
|
240 | 240 | } |
241 | 241 | |
242 | 242 | /** |
@@ -42,6 +42,6 @@ |
||
42 | 42 | */ |
43 | 43 | public function getParams(): array |
44 | 44 | { |
45 | - return $this->params; |
|
45 | + return $this->params; |
|
46 | 46 | } |
47 | 47 | } |
48 | 48 | \ No newline at end of file |
@@ -11,7 +11,7 @@ |
||
11 | 11 | */ |
12 | 12 | public static function bootLincable() |
13 | 13 | { |
14 | - static::creating(function ($model) { |
|
14 | + static::creating(function($model) { |
|
15 | 15 | $model->addLincableFields(); |
16 | 16 | }); |
17 | 17 | } |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | * |
16 | 16 | * @var array |
17 | 17 | */ |
18 | - protected $configuration = []; |
|
18 | + protected $configuration = [ ]; |
|
19 | 19 | |
20 | 20 | /** |
21 | 21 | * The base namespace for the models. |
@@ -43,7 +43,7 @@ discard block |
||
43 | 43 | */ |
44 | 44 | public function has($key) |
45 | 45 | { |
46 | - return isset($this->configuration[$key]); |
|
46 | + return isset($this->configuration[ $key ]); |
|
47 | 47 | } |
48 | 48 | |
49 | 49 | /** |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | */ |
56 | 56 | public function get($key, $default = null) |
57 | 57 | { |
58 | - return $this->has($key) ? $this->configuration[$key] : $default; |
|
58 | + return $this->has($key) ? $this->configuration[ $key ] : $default; |
|
59 | 59 | } |
60 | 60 | |
61 | 61 | /** |
@@ -130,12 +130,12 @@ discard block |
||
130 | 130 | { |
131 | 131 | $model = $key; |
132 | 132 | |
133 | - if (str_contains($key, '.') || ! str_contains($key, '\\')) { |
|
133 | + if (str_contains($key, '.') || !str_contains($key, '\\')) { |
|
134 | 134 | |
135 | 135 | // Build the class namespace using the base model namespace |
136 | 136 | // and the parts of the key splitted by dots. |
137 | - $model = $this->buildNamespace(array_merge( |
|
138 | - [$this->modelsNamespace], |
|
137 | + $model = $this->buildNamespace(array_merge( |
|
138 | + [ $this->modelsNamespace ], |
|
139 | 139 | array_map('ucfirst', explode('.', $key)) |
140 | 140 | )); |
141 | 141 | } |
@@ -39,7 +39,7 @@ |
||
39 | 39 | protected function buildNamespace(array $classes) |
40 | 40 | { |
41 | 41 | // Transform all class names. |
42 | - array_walk($classes, function (&$class, $key) { |
|
42 | + array_walk($classes, function(&$class, $key) { |
|
43 | 43 | |
44 | 44 | // Determine wheter class starts with backslash. |
45 | 45 | $appends = starts_with($class, '\\'); |
@@ -35,14 +35,14 @@ |
||
35 | 35 | { |
36 | 36 | $parameters = $this->parseUrlFragments($url); |
37 | 37 | |
38 | - $dynamicParameters = array_filter($parameters, function ($parameter) { |
|
38 | + $dynamicParameters = array_filter($parameters, function($parameter) { |
|
39 | 39 | |
40 | 40 | // Determine wheter the parameter is dynamic on parser |
41 | 41 | // and should be kept. |
42 | 42 | return $this->parser->isParameterDynamic($parameter); |
43 | 43 | }); |
44 | 44 | |
45 | - return array_flatten(array_map(function ($parameter) { |
|
45 | + return array_flatten(array_map(function($parameter) { |
|
46 | 46 | |
47 | 47 | // Return the matches for the dynamic parameter. |
48 | 48 | return $this->parser->getMatches($parameter); |