@@ -32,7 +32,7 @@ discard block |
||
32 | 32 | |
33 | 33 | /** |
34 | 34 | * @param \Illuminate\Database\Eloquent\Model $model |
35 | - * @return bool |
|
35 | + * @return boolean|null |
|
36 | 36 | */ |
37 | 37 | public function saving(Model $model) |
38 | 38 | { |
@@ -41,8 +41,8 @@ discard block |
||
41 | 41 | |
42 | 42 | /** |
43 | 43 | * @param \Illuminate\Database\Eloquent\Model $model |
44 | - * @param $event |
|
45 | - * @return bool |
|
44 | + * @param string $event |
|
45 | + * @return boolean|null |
|
46 | 46 | */ |
47 | 47 | protected function generateSlug(Model $model, $event) |
48 | 48 | { |
@@ -17,7 +17,7 @@ |
||
17 | 17 | */ |
18 | 18 | public function up() |
19 | 19 | { |
20 | - Schema::create('authors', function (Blueprint $table) { |
|
20 | + Schema::create('authors', function(Blueprint $table) { |
|
21 | 21 | $table->increments('id'); |
22 | 22 | $table->string('name'); |
23 | 23 | }); |
@@ -17,7 +17,7 @@ |
||
17 | 17 | */ |
18 | 18 | public function up() |
19 | 19 | { |
20 | - Schema::create('posts', function (Blueprint $table) { |
|
20 | + Schema::create('posts', function(Blueprint $table) { |
|
21 | 21 | $table->increments('id'); |
22 | 22 | $table->string('title'); |
23 | 23 | $table->string('subtitle')->nullable(); |
@@ -40,7 +40,7 @@ |
||
40 | 40 | { |
41 | 41 | $this->mergeConfigFrom(__DIR__ . '/../resources/config/sluggable.php', 'sluggable'); |
42 | 42 | |
43 | - $this->app->singleton(SluggableObserver::class, function ($app) { |
|
43 | + $this->app->singleton(SluggableObserver::class, function($app) { |
|
44 | 44 | return new SluggableObserver(new SlugService(), $app['events']); |
45 | 45 | }); |
46 | 46 | } |
@@ -130,7 +130,7 @@ discard block |
||
130 | 130 | |
131 | 131 | $sourceStrings = array_map(function($key) { |
132 | 132 | return array_get($this->model, $key); |
133 | - }, (array)$from); |
|
133 | + }, (array) $from); |
|
134 | 134 | |
135 | 135 | return join($sourceStrings, ' '); |
136 | 136 | } |
@@ -281,7 +281,7 @@ discard block |
||
281 | 281 | return end($suffix); |
282 | 282 | } |
283 | 283 | |
284 | - $list->transform(function ($value, $key) use ($len) { |
|
284 | + $list->transform(function($value, $key) use ($len) { |
|
285 | 285 | return intval(substr($value, $len)); |
286 | 286 | }); |
287 | 287 | |
@@ -305,7 +305,7 @@ discard block |
||
305 | 305 | $query = $this->model->newQuery(); |
306 | 306 | |
307 | 307 | //check for direct match or something that has a separator followed by a suffix |
308 | - $query->where(function (Builder $q) use ($attribute, $slug, $separator) { |
|
308 | + $query->where(function(Builder $q) use ($attribute, $slug, $separator) { |
|
309 | 309 | $q->where($attribute, $slug) |
310 | 310 | ->orWhere($attribute, 'LIKE', $slug . $separator . '%'); |
311 | 311 | }); |