@@ -36,7 +36,7 @@ |
||
| 36 | 36 | /** |
| 37 | 37 | * Return a collection of registered settings. |
| 38 | 38 | * |
| 39 | - * @return Collection |
|
| 39 | + * @return \Illuminate\Support\Collection |
|
| 40 | 40 | */ |
| 41 | 41 | public function registeredSettings() |
| 42 | 42 | { |
@@ -189,7 +189,7 @@ discard block |
||
| 189 | 189 | * |
| 190 | 190 | * @param string $key |
| 191 | 191 | * |
| 192 | - * @return Collection |
|
| 192 | + * @return \Illuminate\Support\Collection|null |
|
| 193 | 193 | */ |
| 194 | 194 | public function getAllowed($key) |
| 195 | 195 | { |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | /** |
| 214 | 214 | * Get all saved settings. Default values are not included in this output. |
| 215 | 215 | * |
| 216 | - * @return Collection |
|
| 216 | + * @return \Illuminate\Support\Collection |
|
| 217 | 217 | */ |
| 218 | 218 | public function allSaved() |
| 219 | 219 | { |
@@ -357,7 +357,7 @@ discard block |
||
| 357 | 357 | * @param string $key |
| 358 | 358 | * @param mixed $value |
| 359 | 359 | * |
| 360 | - * @return bool |
|
| 360 | + * @return boolean|null |
|
| 361 | 361 | */ |
| 362 | 362 | protected function deleteRecord($key, $value) |
| 363 | 363 | { |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | { |
| 164 | 164 | $saved = $this->allSaved(); |
| 165 | 165 | |
| 166 | - return $this->allDefaults()->map(function ($value, $key) use ($saved) { |
|
| 166 | + return $this->allDefaults()->map(function($value, $key) use ($saved) { |
|
| 167 | 167 | if ($saved->has($key)) { |
| 168 | 168 | return $saved->get($key); |
| 169 | 169 | } |
@@ -179,7 +179,7 @@ discard block |
||
| 179 | 179 | */ |
| 180 | 180 | public function allDefaults() |
| 181 | 181 | { |
| 182 | - return $this->getRegistered()->map(function ($value, $key) { |
|
| 182 | + return $this->getRegistered()->map(function($value, $key) { |
|
| 183 | 183 | return $value['default']; |
| 184 | 184 | }); |
| 185 | 185 | } |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | */ |
| 206 | 206 | public function allAllowed() |
| 207 | 207 | { |
| 208 | - return $this->getRegistered()->map(function ($value, $key) { |
|
| 208 | + return $this->getRegistered()->map(function($value, $key) { |
|
| 209 | 209 | return $value['allowed']; |
| 210 | 210 | }); |
| 211 | 211 | } |
@@ -229,7 +229,7 @@ discard block |
||
| 229 | 229 | */ |
| 230 | 230 | public function set(array $attributes) |
| 231 | 231 | { |
| 232 | - collect($attributes)->each(function ($value, $key) { |
|
| 232 | + collect($attributes)->each(function($value, $key) { |
|
| 233 | 233 | $this->setKeyValue($key, $value, false); |
| 234 | 234 | }); |
| 235 | 235 | |
@@ -396,7 +396,7 @@ discard block |
||
| 396 | 396 | */ |
| 397 | 397 | protected function getAllSettingsFlat() |
| 398 | 398 | { |
| 399 | - return $this->getAllSettings()->flatMap(function ($model) { |
|
| 399 | + return $this->getAllSettings()->flatMap(function($model) { |
|
| 400 | 400 | return [$model->key => json_decode($model->value)[0]]; |
| 401 | 401 | }); |
| 402 | 402 | } |
@@ -422,7 +422,7 @@ discard block |
||
| 422 | 422 | */ |
| 423 | 423 | public function get($key) |
| 424 | 424 | { |
| 425 | - return $this->allSaved()->get($key, function () use ($key) { |
|
| 425 | + return $this->allSaved()->get($key, function() use ($key) { |
|
| 426 | 426 | return $this->getDefault($key); |
| 427 | 427 | }); |
| 428 | 428 | } |
@@ -33,11 +33,11 @@ |
||
| 33 | 33 | */ |
| 34 | 34 | protected function registerCommands() |
| 35 | 35 | { |
| 36 | - $this->app->singleton('command.pbag.make', function ($app) { |
|
| 36 | + $this->app->singleton('command.pbag.make', function($app) { |
|
| 37 | 37 | return $app['LaravelPropertyBag\Commands\PublishSettingsConfig']; |
| 38 | 38 | }); |
| 39 | 39 | |
| 40 | - $this->app->singleton('command.pbag.rules', function ($app) { |
|
| 40 | + $this->app->singleton('command.pbag.rules', function($app) { |
|
| 41 | 41 | return $app['LaravelPropertyBag\Commands\PublishRulesFile']; |
| 42 | 42 | }); |
| 43 | 43 | |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | */ |
| 13 | 13 | public function up() |
| 14 | 14 | { |
| 15 | - Schema::create('property_bag', function (Blueprint $table) { |
|
| 15 | + Schema::create('property_bag', function(Blueprint $table) { |
|
| 16 | 16 | $table->increments('id'); |
| 17 | 17 | $table->string('resource_type')->index(); |
| 18 | 18 | $table->integer('resource_id')->unsigned()->index(); |