@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | */ |
87 | 87 | public function setDisk(string $disk) |
88 | 88 | { |
89 | - $this->disk = $this->app['filesystem']->disk($disk); |
|
89 | + $this->disk = $this->app[ 'filesystem' ]->disk($disk); |
|
90 | 90 | return $this; |
91 | 91 | } |
92 | 92 | |
@@ -109,7 +109,7 @@ discard block |
||
109 | 109 | * @param mixed $formatters |
110 | 110 | * @return this |
111 | 111 | */ |
112 | - public function addParser($parser, $formatters = []) |
|
112 | + public function addParser($parser, $formatters = [ ]) |
|
113 | 113 | { |
114 | 114 | if (is_string($parser)) { |
115 | 115 | |
@@ -117,7 +117,7 @@ discard block |
||
117 | 117 | $parser = $this->app->make($parser); |
118 | 118 | } |
119 | 119 | |
120 | - if (! $parser instanceof Parser) { |
|
120 | + if (!$parser instanceof Parser) { |
|
121 | 121 | $type = gettype($parser); |
122 | 122 | |
123 | 123 | // Force the parser to be a Parser class. |
@@ -149,16 +149,16 @@ discard block |
||
149 | 149 | |
150 | 150 | // Create the default parsers from config. |
151 | 151 | $parsers = array_merge( |
152 | - $this->getConfig('default_parsers', []), |
|
153 | - $this->getConfig('parsers', []) |
|
152 | + $this->getConfig('default_parsers', [ ]), |
|
153 | + $this->getConfig('parsers', [ ]) |
|
154 | 154 | ); |
155 | 155 | |
156 | - foreach($parsers as $parser => $formatters) { |
|
156 | + foreach ($parsers as $parser => $formatters) { |
|
157 | 157 | $this->addParser($parser, $formatters); |
158 | 158 | } |
159 | 159 | |
160 | 160 | // Create a new disk filesystem. |
161 | - $this->disk = $this->app['filesystem']->disk($this->getConfig('disk')); |
|
161 | + $this->disk = $this->app[ 'filesystem' ]->disk($this->getConfig('disk')); |
|
162 | 162 | } |
163 | 163 | |
164 | 164 | /** |
@@ -170,7 +170,7 @@ discard block |
||
170 | 170 | */ |
171 | 171 | protected function getConfig(string $key, $default = null) |
172 | 172 | { |
173 | - return $this->app["config"]["lincable.{$key}"] ?: $default; |
|
173 | + return $this->app[ "config" ][ "lincable.{$key}" ] ?: $default; |
|
174 | 174 | } |
175 | 175 | |
176 | 176 | /** |
@@ -182,10 +182,10 @@ discard block |
||
182 | 182 | protected function createUrlConfWithRoot(string $root = null) |
183 | 183 | { |
184 | 184 | // Add the url configuration. |
185 | - $urls = $this->getConfig('urls', []); |
|
185 | + $urls = $this->getConfig('urls', [ ]); |
|
186 | 186 | $urlConf = new UrlConf($this->getConfig('models.namespace')); |
187 | 187 | |
188 | - foreach($urls as $model => $url) { |
|
188 | + foreach ($urls as $model => $url) { |
|
189 | 189 | $url = str_start($url, '/'); |
190 | 190 | |
191 | 191 | if ($root && $root !== '') { |
@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | */ |
16 | 16 | public static function bootLincable() |
17 | 17 | { |
18 | - static::creating(function ($model) { |
|
18 | + static::creating(function($model) { |
|
19 | 19 | $model->addLincableFields(); |
20 | 20 | }); |
21 | 21 | } |
@@ -30,7 +30,7 @@ discard block |
||
30 | 30 | // Get the model fillable fields. |
31 | 31 | $fillables = $this->getFillable(); |
32 | 32 | |
33 | - $this->fillable(array_merge($fillables, [$this->getUrlField()])); |
|
33 | + $this->fillable(array_merge($fillables, [ $this->getUrlField() ])); |
|
34 | 34 | } |
35 | 35 | |
36 | 36 | /** |