Completed
Push — master ( ab6153...4ba325 )
by Iman
03:22
created
src/Hooks/ViewHooks.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -31,9 +31,9 @@
 block discarded – undo
31 31
     private function normalizeView(array $views): array
32 32
     {
33 33
         $views = $this->normalizeInput($views);
34
-        $mapper = function ($view) {
34
+        $mapper = function($view) {
35 35
             $this->checkViewExists($view);
36
-            return 'creating: '.\Illuminate\View\ViewName::normalize($view);
36
+            return 'creating: ' . \Illuminate\View\ViewName::normalize($view);
37 37
         };
38 38
 
39 39
         return array_map($mapper, $views);
Please login to merge, or discard this patch.
src/Hooks/RouteHooks.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -13,7 +13,7 @@  discard block
 block discarded – undo
13 13
      */
14 14
     public function whenYouVisitUrl(...$url)
15 15
     {
16
-        $removeSlash = function ($url) {
16
+        $removeSlash = function($url) {
17 17
             return ltrim($url, '/');
18 18
         };
19 19
 
@@ -39,12 +39,12 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function whenYouCallAction(...$action)
41 41
     {
42
-        $addNamespace = function ($action) {
42
+        $addNamespace = function($action) {
43 43
             if ($action = ltrim($action, '\\')) {
44 44
                 return $action;
45 45
             }
46 46
 
47
-            return app()->getNamespace().'\\Http\\Controllers\\'.$action;
47
+            return app()->getNamespace() . '\\Http\\Controllers\\' . $action;
48 48
         };
49 49
 
50 50
         $action = array_map($addNamespace, $this->normalizeInput($action));
Please login to merge, or discard this patch.
src/Actions.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@
 block discarded – undo
55 55
 
56 56
     public function afterFiringEvent($event, $payload = [], $halt = false)
57 57
     {
58
-        $this->chain->eventFire($event, $payload , $halt);
58
+        $this->chain->eventFire($event, $payload, $halt);
59 59
 
60 60
         return $this;
61 61
     }
Please login to merge, or discard this patch.
src/ResponderFactory.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
     public function abortCallback($abort)
33 33
     {
34
-        $responder = function () use ($abort) {
34
+        $responder = function() use ($abort) {
35 35
             abort(...$abort);
36 36
         };
37 37
 
@@ -46,7 +46,7 @@  discard block
 block discarded – undo
46 46
      */
47 47
     public function exceptionCallback($e): \Closure
48 48
     {
49
-        $responder = function () use ($e) {
49
+        $responder = function() use ($e) {
50 50
             $exClass = $e['class'];
51 51
             throw new $exClass($e['message']);
52 52
         };
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
      */
63 63
     public function responseCallback($resp): \Closure
64 64
     {
65
-        $responder = function () use ($resp) {
65
+        $responder = function() use ($resp) {
66 66
             $respObj = response();
67 67
             foreach ($resp as $call) {
68 68
                 list($method, $args) = $call;
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 
77 77
     public function redirectCallback($resp): \Closure
78 78
     {
79
-        $responder = function () use ($resp) {
79
+        $responder = function() use ($resp) {
80 80
             $respObj = redirect();
81 81
             foreach ($resp as $call) {
82 82
                 list($method, $args) = $call;
Please login to merge, or discard this patch.
src/ListenerFactory.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
         $cb = $this->chain->predicate;
44 44
         $this->chain->reset();
45 45
 
46
-        return function (...$f) use ($responder, $cb, $dispatcher, $calls) {
46
+        return function(...$f) use ($responder, $cb, $dispatcher, $calls) {
47 47
             if ($cb($f)) {
48 48
                 return true;
49 49
             }
@@ -58,12 +58,12 @@  discard block
 block discarded – undo
58 58
     {
59 59
         $events = $this->chain->events;
60 60
 
61
-        if (! $events) {
62
-            return function () {
61
+        if (!$events) {
62
+            return function() {
63 63
             };
64 64
         }
65 65
 
66
-        return function () use ($events) {
66
+        return function() use ($events) {
67 67
             foreach ($events as $event) {
68 68
                 app('events')->dispatch(...$event);
69 69
             }
@@ -74,12 +74,12 @@  discard block
 block discarded – undo
74 74
     {
75 75
         $calls = $this->chain->calls;
76 76
 
77
-        if (! $calls) {
78
-            return function () {
77
+        if (!$calls) {
78
+            return function() {
79 79
             };
80 80
         }
81 81
 
82
-        return function () use ($calls) {
82
+        return function() use ($calls) {
83 83
             foreach ($calls as $call) {
84 84
                 app()->call(...$call);
85 85
             }
Please login to merge, or discard this patch.
src/WatchingStrategies/RouterEventManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -73,7 +73,7 @@
 block discarded – undo
73 73
             }
74 74
         }
75 75
 
76
-        return function () {
76
+        return function() {
77 77
         };
78 78
     }
79 79
 }
Please login to merge, or discard this patch.
src/YouShouldHave.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@  discard block
 block discarded – undo
33 33
     {
34 34
         $gate = $this->defineNewGate($gate);
35 35
 
36
-        $this->chain->predicate = function (...$payload) use ($gate, $parameters) {
36
+        $this->chain->predicate = function(...$payload) use ($gate, $parameters) {
37 37
             return Gate::allows($gate, (array_merge($parameters, ...$payload)));
38 38
         };
39 39
 
@@ -47,8 +47,8 @@  discard block
 block discarded – undo
47 47
 
48 48
     public function thisMethodShouldAllow($callback, array $parameters = []): Otherwise
49 49
     {
50
-        $this->chain->predicate = function (...$payload) use ($callback, $parameters) {
51
-            return (bool) app()->call($callback, array_merge($parameters, ...$payload));
50
+        $this->chain->predicate = function(...$payload) use ($callback, $parameters) {
51
+            return (bool)app()->call($callback, array_merge($parameters, ...$payload));
52 52
         };
53 53
 
54 54
         return app(Otherwise::class);
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
 
57 57
     public function thisValueShouldAllow($value): Otherwise
58 58
     {
59
-        $this->chain->predicate = function () use ($value) {
60
-            return (bool) $value;
59
+        $this->chain->predicate = function() use ($value) {
60
+            return (bool)$value;
61 61
         };
62 62
 
63 63
         return app(Otherwise::class);
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
     public function youShouldBeGuest(): Otherwise
67 67
     {
68
-        $this->chain->predicate = function () {
68
+        $this->chain->predicate = function() {
69 69
             return auth()->guest();
70 70
         };
71 71
 
@@ -74,7 +74,7 @@  discard block
 block discarded – undo
74 74
 
75 75
     public function sessionShouldHave($key): Otherwise
76 76
     {
77
-        $this->chain->predicate = function () use ($key) {
77
+        $this->chain->predicate = function() use ($key) {
78 78
             return session()->has($key);
79 79
         };
80 80
 
@@ -83,7 +83,7 @@  discard block
 block discarded – undo
83 83
 
84 84
     public function youShouldBeLoggedIn(): Otherwise
85 85
     {
86
-        $this->chain->predicate = function () {
86
+        $this->chain->predicate = function() {
87 87
             return auth()->check();
88 88
         };
89 89
 
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
 
93 93
     public function immediately(): Actions
94 94
     {
95
-        $this->chain->predicate = function () {
95
+        $this->chain->predicate = function() {
96 96
             return false;
97 97
         };
98 98
 
Please login to merge, or discard this patch.
src/RouteAuthorizer.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 {
11 11
     public function authorizeMatchedRoutes()
12 12
     {
13
-        Route::matched(function (RouteMatched $eventObj) {
13
+        Route::matched(function(RouteMatched $eventObj) {
14 14
             $route = $eventObj->route;
15 15
             if ($eventObj->request->method() === 'GET') {
16 16
                 $this->authorizeUrls($route->uri);
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
      */
57 57
     private function setGuardFor($method, $key)
58 58
     {
59
-        $method = 'get'.$method;
59
+        $method = 'get' . $method;
60 60
         app(RouterEventManager::class)->{$method}($key)();
61 61
     }
62 62
 }
Please login to merge, or discard this patch.