GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.
Passed
Push — master ( 86f9a7...839a49 )
by Dangerous
05:09
created
src/DiMaria.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -78,10 +78,10 @@  discard block
 block discarded – undo
78 78
      */
79 79
     public function setInjection(string $className, string $method, array $params = []): self
80 80
     {
81
-        if (! isset($this->injections[$className])) {
81
+        if (!isset($this->injections[$className])) {
82 82
             $this->injections[$className] = [];
83 83
         }
84
-        if (! isset($this->injections[$className][$method])) {
84
+        if (!isset($this->injections[$className][$method])) {
85 85
             $this->injections[$className][$method] = [];
86 86
         }
87 87
         $this->injections[$className][$method][] = $params;
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
      */
97 97
     public function setParams(string $className, array $params): self
98 98
     {
99
-        $this->params[$className] = $params + ($this->params[$className] ?? []);
99
+        $this->params[$className] = $params + ($this->params[$className] ? ? []);
100 100
         return $this;
101 101
     }
102 102
 
@@ -123,11 +123,11 @@  discard block
 block discarded – undo
123 123
             return $this->sharedInstance[$className];
124 124
         }
125 125
         $originalClassName = $className;
126
-        while ($alias = $this->aliases[$className] ?? false) {
126
+        while ($alias = $this->aliases[$className] ? ? false) {
127 127
             $params = $params + $alias['params'];
128 128
             $className = $alias['className'];
129 129
         }
130
-        $callback = $this->cache[$originalClassName] ?? $this->getCallback($className, $originalClassName);
130
+        $callback = $this->cache[$originalClassName] ? ? $this->getCallback($className, $originalClassName);
131 131
         $object = $callback($params);
132 132
         if (isset($this->shared[$originalClassName])) {
133 133
             $this->sharedInstance[$originalClassName] = $object;
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
                 $methodInfo = $this->getMethodInfo(new \ReflectionMethod($className, $method));
144 144
                 foreach ($instance as $methodParameters) {
145 145
                     $methodParams = $this->getParameters($methodInfo, $methodParameters);
146
-                    $callback = function ($params) use ($callback, $method, $methodParams) {
146
+                    $callback = function($params) use ($callback, $method, $methodParams) {
147 147
                         $object = $callback($params);
148 148
                         $object->$method(...$methodParams);
149 149
                         return $object;
@@ -159,14 +159,14 @@  discard block
 block discarded – undo
159 159
     {
160 160
         $constructor = (new \ReflectionClass($className))->getConstructor();
161 161
 
162
-        if (! $constructor || ! $constructor->getNumberOfParameters()) {
163
-            return function () use ($className) {
162
+        if (!$constructor || !$constructor->getNumberOfParameters()) {
163
+            return function() use ($className) {
164 164
                 return new $className;
165 165
             };
166 166
         }
167 167
         $constructorInfo = $this->getMethodInfo($constructor);
168
-        $predefinedParams = $this->params[$className] ?? [];
169
-        return function ($params) use ($className, $constructorInfo, $predefinedParams) {
168
+        $predefinedParams = $this->params[$className] ? ? [];
169
+        return function($params) use ($className, $constructorInfo, $predefinedParams) {
170 170
             return new $className(...$this->getParameters($constructorInfo, $params + $predefinedParams));
171 171
         };
172 172
     }
Please login to merge, or discard this patch.