@@ -29,8 +29,8 @@ discard block |
||
29 | 29 | */ |
30 | 30 | public function __construct($app = null) |
31 | 31 | { |
32 | - if (! $app) { |
|
33 | - $app = app(); //Fallback when $app is not given |
|
32 | + if (!$app) { |
|
33 | + $app = app(); //Fallback when $app is not given |
|
34 | 34 | } |
35 | 35 | $this->app = $app; |
36 | 36 | |
@@ -144,7 +144,7 @@ discard block |
||
144 | 144 | protected function makeNonUniqueStr(string $rawStr): string |
145 | 145 | { |
146 | 146 | if ($str_segments_separator = $this->config['str_segments_separator']) { |
147 | - $res = array_map(function ($str) { |
|
147 | + $res = array_map(function($str) { |
|
148 | 148 | |
149 | 149 | return str_slug($this->getClippedSlugWithPrefixSuffix($str), $this->config['str_slug_separator']); |
150 | 150 | |
@@ -164,13 +164,13 @@ discard block |
||
164 | 164 | { |
165 | 165 | $prefix = $this->config['prefix']; |
166 | 166 | $suffix = $this->config['suffix']; |
167 | - $maximumLength= $this->config['max_length']; |
|
167 | + $maximumLength = $this->config['max_length']; |
|
168 | 168 | |
169 | 169 | if ($strLen = strlen($prefix) + strlen($suffix)) { |
170 | 170 | $limitWithoutPrefixSuffix = $maximumLength - ($strLen + 2); |
171 | 171 | |
172 | 172 | if ($limitWithoutPrefixSuffix < 1) { |
173 | - return str_limit($prefix . ' ' . $suffix, $maximumLength); |
|
173 | + return str_limit($prefix.' '.$suffix, $maximumLength); |
|
174 | 174 | } |
175 | 175 | |
176 | 176 | return $prefix.' '.str_limit($str, $limitWithoutPrefixSuffix, '').' '.$suffix; |
@@ -190,7 +190,7 @@ discard block |
||
190 | 190 | $i = 1; |
191 | 191 | |
192 | 192 | while ($this->isOtherRecordExists($str) || $str === '') { |
193 | - $str = $notUniqueStr . $this->config['str_slug_separator'] . $i++; |
|
193 | + $str = $notUniqueStr.$this->config['str_slug_separator'].$i++; |
|
194 | 194 | } |
195 | 195 | |
196 | 196 | return $str; |
@@ -28,7 +28,7 @@ |
||
28 | 28 | { |
29 | 29 | $this->mergeConfigFrom(__DIR__.'/../config/eus.php', 'eus'); |
30 | 30 | |
31 | - $this->app->singleton(EUSGenerator::class, function () { |
|
31 | + $this->app->singleton(EUSGenerator::class, function() { |
|
32 | 32 | return new EUSGenerator($this->app); |
33 | 33 | }); |
34 | 34 | } |