Completed
Branch php7 (1047cd)
by Eric
02:08
created
src/Jarvis.php 3 patches
Doc Comments   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 
157 157
     /**
158 158
      * @param  string  $eventName
159
-     * @param  mixed   $receiver
159
+     * @param  \Closure   $receiver
160 160
      * @param  integer $priority
161 161
      * @return self
162 162
      */
@@ -205,7 +205,7 @@  discard block
 block discarded – undo
205 205
     }
206 206
 
207 207
     /**
208
-     * @param  string $provider
208
+     * @param  ContainerProviderInterface $provider
209 209
      * @return self
210 210
      */
211 211
     public function hydrate(ContainerProviderInterface $provider) : Jarvis
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Jarvis;
6 6
 
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
      */
117 117
     public function analyze(Request $request = null) : Response
118 118
     {
119
-        $request = $request ?? $this->request;
119
+        $request = $request ? ? $this->request;
120 120
         $response = null;
121 121
 
122 122
         try {
@@ -191,7 +191,7 @@  discard block
 block discarded – undo
191 191
         }
192 192
 
193 193
         if (isset($this->receivers[$eventName])) {
194
-            $event = $event ?? new SimpleEvent();
194
+            $event = $event ? ? new SimpleEvent();
195 195
             foreach ($this->buildEventReceivers($eventName) as $receiver) {
196 196
                 call_user_func_array($this->callback_resolver->resolve($receiver), [$event]);
197 197
 
@@ -253,7 +253,7 @@  discard block
 block discarded – undo
253 253
      */
254 254
     private function buildEventReceivers(string $eventName)
255 255
     {
256
-        return $this->computedReceivers[$eventName] = $this->computedReceivers[$eventName] ?? array_merge(
256
+        return $this->computedReceivers[$eventName] = $this->computedReceivers[$eventName] ? ? array_merge(
257 257
             $this->receivers[$eventName][self::RECEIVER_HIGH_PRIORITY],
258 258
             $this->receivers[$eventName][self::RECEIVER_NORMAL_PRIORITY],
259 259
             $this->receivers[$eventName][self::RECEIVER_LOW_PRIORITY]
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -12,8 +12,8 @@
 block discarded – undo
12 12
 use Jarvis\Skill\EventBroadcaster\ControllerEvent;
13 13
 use Jarvis\Skill\EventBroadcaster\EventInterface;
14 14
 use Jarvis\Skill\EventBroadcaster\ExceptionEvent;
15
-use Jarvis\Skill\EventBroadcaster\ResponseEvent;
16 15
 use Jarvis\Skill\EventBroadcaster\JarvisEvents;
16
+use Jarvis\Skill\EventBroadcaster\ResponseEvent;
17 17
 use Jarvis\Skill\EventBroadcaster\SimpleEvent;
18 18
 use Symfony\Component\HttpFoundation\ParameterBag;
19 19
 use Symfony\Component\HttpFoundation\Request;
Please login to merge, or discard this patch.
src/Skill/EventBroadcaster/AnalyzeEvent.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -38,7 +38,7 @@
 block discarded – undo
38 38
     /**
39 39
      * @codeCoverageIgnore
40 40
      *
41
-     * @return Response|null
41
+     * @return Response
42 42
      */
43 43
     public function getResponse()
44 44
     {
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Jarvis\Skill\EventBroadcaster;
6 6
 
Please login to merge, or discard this patch.
src/Skill/DependencyInjection/ContainerProvider.php 2 patches
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Jarvis\Skill\DependencyInjection;
6 6
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
             }
43 43
 
44 44
             $request = $classname::createFromGlobals();
45
-            $request->setSession($request->getSession() ?? new Session());
45
+            $request->setSession($request->getSession() ? ? new Session());
46 46
 
47 47
             return $request;
48 48
         };
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -7,8 +7,8 @@
 block discarded – undo
7 7
 use Jarvis\Jarvis;
8 8
 use Jarvis\Skill\Core\CallbackResolver;
9 9
 use Jarvis\Skill\Core\ScopeManager;
10
-use Jarvis\Skill\EventBroadcaster\JarvisEvents;
11 10
 use Jarvis\Skill\EventBroadcaster\ExceptionEvent;
11
+use Jarvis\Skill\EventBroadcaster\JarvisEvents;
12 12
 use Jarvis\Skill\Routing\Router;
13 13
 use Symfony\Component\HttpFoundation\Request;
14 14
 use Symfony\Component\HttpFoundation\Response;
Please login to merge, or discard this patch.
src/Skill/EventBroadcaster/SimpleEvent.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Jarvis\Skill\EventBroadcaster;
6 6
 
Please login to merge, or discard this patch.
src/Skill/Routing/Router.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Jarvis\Skill\Routing;
6 6
 
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      */
33 33
     public function addRoute(string $httpMethod, string $route, $handler, string $scope = Jarvis::DEFAULT_SCOPE) : Router
34 34
     {
35
-        $this->rawRoutes[$scope] = $this->rawRoutes[$scope] ?? [];
35
+        $this->rawRoutes[$scope] = $this->rawRoutes[$scope] ? ? [];
36 36
         $this->rawRoutes[$scope][] = [strtolower($httpMethod), $route, $handler];
37 37
         $this->compilationKey = null;
38 38
 
Please login to merge, or discard this patch.
src/Skill/Core/CallbackResolver.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Jarvis\Skill\EventBroadcaster;
6 6
 
Please login to merge, or discard this patch.
src/Skill/Core/ScopeManager.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Jarvis\Skill\EventBroadcaster;
6 6
 
Please login to merge, or discard this patch.
src/Skill/DependencyInjection/Container.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Jarvis\Skill\EventBroadcaster;
6 6
 
Please login to merge, or discard this patch.
src/Skill/DependencyInjection/ContainerProviderInterface.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-declare(strict_types=1);
3
+declare(strict_types = 1);
4 4
 
5 5
 namespace Jarvis\Skill\EventBroadcaster;
6 6
 
Please login to merge, or discard this patch.