Passed
Push — master ( 2ae9a7...fef751 )
by Vasyl
02:46
created
src/ServiceProvider.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@
 block discarded – undo
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
     }
Please login to merge, or discard this patch.
src/StrTokenGenerator.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
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
 block discarded – undo
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
 block discarded – undo
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
Please login to merge, or discard this patch.