@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | public function __construct($app = null) |
| 42 | 42 | { |
| 43 | 43 | if (!$app) { |
| 44 | - $app = app(); //Fallback when $app is not given |
|
| 44 | + $app = app(); //Fallback when $app is not given |
|
| 45 | 45 | } |
| 46 | 46 | $this->app = $app; |
| 47 | 47 | |
@@ -245,7 +245,7 @@ discard block |
||
| 245 | 245 | $disable = $this->config->get('str-tokens.disable_configs', []); |
| 246 | 246 | |
| 247 | 247 | foreach ($tokens as $name => $original) { |
| 248 | - if (! Helpers::strIs($disable, $name)) { |
|
| 248 | + if (!Helpers::strIs($disable, $name)) { |
|
| 249 | 249 | $res = $this->config->get($name, ''); |
| 250 | 250 | $replacements[$original] = is_string($res) ? $res : ''; |
| 251 | 251 | } |
@@ -281,8 +281,8 @@ discard block |
||
| 281 | 281 | */ |
| 282 | 282 | protected function ensureValidEntity($entity) |
| 283 | 283 | { |
| 284 | - if (! $entity instanceof Model) { |
|
| 285 | - throw new \Exception("StrToken Entity must by instance of '" . Model::class . "'. Current instance of '" . gettype($entity) . "'"); |
|
| 284 | + if (!$entity instanceof Model) { |
|
| 285 | + throw new \Exception("StrToken Entity must by instance of '".Model::class."'. Current instance of '".gettype($entity)."'"); |
|
| 286 | 286 | } |
| 287 | 287 | } |
| 288 | 288 | } |
| 289 | 289 | \ No newline at end of file |
@@ -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 | } |