@@ -32,7 +32,7 @@ |
||
32 | 32 | { |
33 | 33 | $this->mergeConfigFrom(__DIR__.'/../config/str-tokens.php', 'str-tokens'); |
34 | 34 | |
35 | - $this->app->singleton(StrTokenGenerator::class, function () { |
|
35 | + $this->app->singleton(StrTokenGenerator::class, function() { |
|
36 | 36 | return new StrTokenGenerator($this->app); |
37 | 37 | }); |
38 | 38 | } |
@@ -45,7 +45,7 @@ discard block |
||
45 | 45 | public function __construct($app = null) |
46 | 46 | { |
47 | 47 | if (!$app) { |
48 | - $app = app(); //Fallback when $app is not given |
|
48 | + $app = app(); //Fallback when $app is not given |
|
49 | 49 | } |
50 | 50 | $this->app = $app; |
51 | 51 | |
@@ -275,7 +275,7 @@ discard block |
||
275 | 275 | $disable = $this->config->get('str-tokens.disable_configs', []); |
276 | 276 | |
277 | 277 | foreach ($tokens as $name => $original) { |
278 | - if (! Str::is($disable, $name)) { |
|
278 | + if (!Str::is($disable, $name)) { |
|
279 | 279 | $res = $this->config->get($name, ''); |
280 | 280 | $replacements[$original] = is_string($res) ? $res : ''; |
281 | 281 | } |
@@ -327,8 +327,8 @@ discard block |
||
327 | 327 | */ |
328 | 328 | protected function ensureValidEntity($entity) |
329 | 329 | { |
330 | - if (! $entity instanceof Model) { |
|
331 | - throw new \Exception("StrToken Entity must by instance of '" . Model::class . "'. Current instance of '" . gettype($entity) . "'"); |
|
330 | + if (!$entity instanceof Model) { |
|
331 | + throw new \Exception("StrToken Entity must by instance of '".Model::class."'. Current instance of '".gettype($entity)."'"); |
|
332 | 332 | } |
333 | 333 | } |
334 | 334 | } |
335 | 335 | \ No newline at end of file |