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.
Completed
Push — master ( 502620...0fb245 )
by Dangerous
02:18
created
src/DiMaria.php 2 patches
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -96,7 +96,6 @@
 block discarded – undo
96 96
 
97 97
     /**
98 98
      * Returns true if DiMaria can return an entry for the given string. Returns false otherwise.
99
-     * @param string $id  identifier of the entry to look for
100 99
      * @return boolean
101 100
      */
102 101
     public function has($class): bool
Please login to merge, or discard this patch.
Spacing   +7 added lines, -10 removed lines patch added patch discarded remove patch
@@ -43,7 +43,7 @@  discard block
 block discarded – undo
43 43
      */
44 44
     public function setInjection(string $class, string $method, array $params = []): self
45 45
     {
46
-        $this->injections[$class][$method][] =  $params;
46
+        $this->injections[$class][$method][] = $params;
47 47
         return $this;
48 48
     }
49 49
 
@@ -101,10 +101,7 @@  discard block
 block discarded – undo
101 101
      */
102 102
     public function has($class): bool
103 103
     {
104
-        return isset($this->sharedInstance[$class]) ?:
105
-            class_exists($class) ?:
106
-            isset($this->aliases[$class]) ?:
107
-            isset($this->preferences[$class]);
104
+        return isset($this->sharedInstance[$class]) ?: class_exists($class) ?: isset($this->aliases[$class]) ?: isset($this->preferences[$class]);
108 105
     }
109 106
 
110 107
     /**
@@ -145,7 +142,7 @@  discard block
 block discarded – undo
145 142
 
146 143
     protected function getClassName(string $class): string
147 144
     {
148
-        if (! $this->has($class)) {
145
+        if (!$this->has($class)) {
149 146
             throw new NotFoundException('Class or alias ' . $class . ' does not exist');
150 147
         }
151 148
         while ($preference = $this->preferences[$class] ?? false) {
@@ -179,7 +176,7 @@  discard block
 block discarded – undo
179 176
                 $methodInfo = $this->getMethodInfo(new \ReflectionMethod($class, $method));
180 177
                 foreach ($instance as $methodParameters) {
181 178
                     $methodParams = $this->getParameters($methodInfo, $methodParameters);
182
-                    $callback = function ($params) use ($callback, $method, $methodParams) {
179
+                    $callback = function($params) use ($callback, $method, $methodParams) {
183 180
                         $object = $callback($params);
184 181
                         $object->$method(...$methodParams);
185 182
                         return $object;
@@ -193,15 +190,15 @@  discard block
 block discarded – undo
193 190
     protected function generateCallback(string $class): callable
194 191
     {
195 192
         $constructor = (new \ReflectionClass($class))->getConstructor();
196
-        if (! $constructor || ! $constructor->getNumberOfParameters()) {
197
-            return function () use ($class) {
193
+        if (!$constructor || !$constructor->getNumberOfParameters()) {
194
+            return function() use ($class) {
198 195
                 return new $class;
199 196
             };
200 197
         }
201 198
         $constructorInfo = $this->getMethodInfo($constructor);
202 199
         $predefinedParams = $this->params[$class] ?? [];
203 200
 
204
-        return function ($params) use ($class, $constructorInfo, $predefinedParams) {
201
+        return function($params) use ($class, $constructorInfo, $predefinedParams) {
205 202
             return new $class(...$this->getParameters($constructorInfo, $params + $predefinedParams));
206 203
         };
207 204
     }
Please login to merge, or discard this patch.