@@ -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 | } |
@@ -125,16 +125,16 @@ discard block |
||
125 | 125 | return $this->model->__toString(); |
126 | 126 | } |
127 | 127 | |
128 | - $sourceStrings = array_map(function ($key) { |
|
128 | + $sourceStrings = array_map(function($key) { |
|
129 | 129 | $value = data_get($this->model, $key); |
130 | 130 | if (is_bool($value)) { |
131 | 131 | $value = (int) $value; |
132 | 132 | } |
133 | 133 | |
134 | 134 | return $value; |
135 | - }, (array)$from); |
|
135 | + }, (array) $from); |
|
136 | 136 | |
137 | - if ($this->getConfiguration()['class_name_when_null'] && $sourceStrings[0] == null){ |
|
137 | + if ($this->getConfiguration()['class_name_when_null'] && $sourceStrings[0] == null) { |
|
138 | 138 | $sourceStrings[0] = class_basename($this->model); |
139 | 139 | } |
140 | 140 | |
@@ -319,7 +319,7 @@ discard block |
||
319 | 319 | return end($suffix); |
320 | 320 | } |
321 | 321 | |
322 | - $list->transform(function ($value, $key) use ($len) { |
|
322 | + $list->transform(function($value, $key) use ($len) { |
|
323 | 323 | return intval(substr($value, $len)); |
324 | 324 | }); |
325 | 325 |