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
Pull Request — master (#31)
by
unknown
05:52 queued 03:00
created
src/Formats/BSONPolyfill.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
-if ( ! function_exists('bson_decode')) {
3
+if (!function_exists('bson_decode')) {
4 4
     function bson_decode($payload)
5 5
     {
6 6
         return MongoDB\BSON\toPHP($payload, ['root' => 'array', 'document' => 'array']);
Please login to merge, or discard this patch.
src/Formats/MSGPack.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -26,14 +26,14 @@  discard block
 block discarded – undo
26 26
     {
27 27
         if (function_exists('msgpack_unpack')) {
28 28
             if ($payload) {
29
-                $prevHandler = set_error_handler(function ($errno, $errstr, $errfile, $errline, $errcontext) {
30
-                    throw new ParserException('Failed To Parse MSGPack');  // @codeCoverageIgnore
29
+                $prevHandler = set_error_handler(function($errno, $errstr, $errfile, $errline, $errcontext) {
30
+                    throw new ParserException('Failed To Parse MSGPack'); // @codeCoverageIgnore
31 31
                 });
32 32
 
33 33
                 $msg = msgpack_unpack(trim($payload));
34
-                if ( ! $msg) {
35
-                    set_error_handler($prevHandler);  // @codeCoverageIgnore
36
-                    throw new ParserException('Failed To Parse MSGPack');  // @codeCoverageIgnore
34
+                if (!$msg) {
35
+                    set_error_handler($prevHandler); // @codeCoverageIgnore
36
+                    throw new ParserException('Failed To Parse MSGPack'); // @codeCoverageIgnore
37 37
                 }
38 38
 
39 39
                 set_error_handler($prevHandler);
@@ -43,6 +43,6 @@  discard block
 block discarded – undo
43 43
             return [];
44 44
         }
45 45
 
46
-        throw new ParserException('Failed To Parse MSGPack - Supporting Library Not Available');  // @codeCoverageIgnore
46
+        throw new ParserException('Failed To Parse MSGPack - Supporting Library Not Available'); // @codeCoverageIgnore
47 47
     }
48 48
 }
Please login to merge, or discard this patch.
src/Formats/BSON.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -24,25 +24,25 @@
 block discarded – undo
24 24
      */
25 25
     public function parse($payload)
26 26
     {
27
-        if (function_exists('MongoDB\BSON\toPHP') && ! function_exists('bson_decode')) {
28
-            require_once(__DIR__ . '/BSONPolyfill.php');  //@codeCoverageIgnore
29
-        } elseif ( ! (function_exists('bson_decode') || function_exists('MongoDB\BSON\toPHP'))) {
30
-            throw new ParserException('Failed To Parse BSON - Supporting Library Not Available');  // @codeCoverageIgnore
27
+        if (function_exists('MongoDB\BSON\toPHP') && !function_exists('bson_decode')) {
28
+            require_once(__DIR__.'/BSONPolyfill.php'); //@codeCoverageIgnore
29
+        } elseif (!(function_exists('bson_decode') || function_exists('MongoDB\BSON\toPHP'))) {
30
+            throw new ParserException('Failed To Parse BSON - Supporting Library Not Available'); // @codeCoverageIgnore
31 31
         }
32 32
 
33 33
         if ($payload) {
34
-            $prevHandler = set_error_handler(function ($errno, $errstr, $errfile, $errline, $errcontext) {
35
-                throw new \Exception($errstr);  // @codeCoverageIgnore
34
+            $prevHandler = set_error_handler(function($errno, $errstr, $errfile, $errline, $errcontext) {
35
+                throw new \Exception($errstr); // @codeCoverageIgnore
36 36
             });
37 37
 
38 38
             try {
39
-                $bson = bson_decode(trim($payload, " \t\n\r\x0b"));  // Don't trim \0, as it has valid meaning in BSON
40
-                if ( ! $bson) {
41
-                    throw new \Exception('Unknown error');  // @codeCoverageIgnore
39
+                $bson = bson_decode(trim($payload, " \t\n\r\x0b")); // Don't trim \0, as it has valid meaning in BSON
40
+                if (!$bson) {
41
+                    throw new \Exception('Unknown error'); // @codeCoverageIgnore
42 42
                 }
43 43
             } catch (\Exception $e) {
44 44
                 set_error_handler($prevHandler);
45
-                throw new ParserException('Failed To Parse BSON - ' . $e->getMessage());
45
+                throw new ParserException('Failed To Parse BSON - '.$e->getMessage());
46 46
             }
47 47
 
48 48
             set_error_handler($prevHandler);
Please login to merge, or discard this patch.