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 — 3.x (#2409)
by
unknown
01:54
created
Slim/Route.php 3 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -77,8 +77,8 @@  discard block
 block discarded – undo
77 77
 
78 78
     /**
79 79
      * Convert hexadecimal number (range 0..15) into uppercased hex digit (0..9, A..F)
80
-     * @param $byte number in range 0..15
81
-     * @return uppercased hex digit (0..9, A..F) or underscore (in case of error)
80
+     * @param integer $byte number in range 0..15
81
+     * @return string hex digit (0..9, A..F) or underscore (in case of error)
82 82
      */
83 83
     public static function digit2hex($byte){
84 84
         if(($byte>=0) && ($byte<=9))
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 
91 91
     /**
92 92
      * Convert symbols from higher half of ANSI table into it's percent-encoded presentation
93
-     * @param $str UTF-8 encoded string
93
+     * @param string $str UTF-8 encoded string
94 94
      * @return string with higher half of ANSI table percent-encoded
95 95
      */
96 96
     public static function patternEncode($str){
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
     /**
106 106
      * Create new route
107 107
      *
108
-     * @param string|string[]   $methods The route HTTP methods
108
+     * @param string[]   $methods The route HTTP methods
109 109
      * @param string            $pattern The route pattern
110 110
      * @param callable          $callable The route callable
111 111
      * @param RouteGroup[]      $groups The parent route groups
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -80,11 +80,11 @@  discard block
 block discarded – undo
80 80
      * @param $byte number in range 0..15
81 81
      * @return uppercased hex digit (0..9, A..F) or underscore (in case of error)
82 82
      */
83
-    public static function digit2hex($byte){
84
-        if(($byte>=0) && ($byte<=9))
85
-            return chr($byte+ord('0'));
86
-        if(($byte>=10) && ($byte<=15))
87
-            return chr($byte+ord('A')-10);
83
+    public static function digit2hex($byte) {
84
+        if (($byte >= 0) && ($byte <= 9))
85
+            return chr($byte + ord('0'));
86
+        if (($byte >= 10) && ($byte <= 15))
87
+            return chr($byte + ord('A') - 10);
88 88
         return '_';
89 89
     }
90 90
 
@@ -93,11 +93,11 @@  discard block
 block discarded – undo
93 93
      * @param $str UTF-8 encoded string
94 94
      * @return string with higher half of ANSI table percent-encoded
95 95
      */
96
-    public static function patternEncode($str){
97
-        $arr=str_split($str);
96
+    public static function patternEncode($str) {
97
+        $arr = str_split($str);
98 98
         foreach ($arr as &$value) {
99
-            if(ord($value)>127)
100
-                $value='%' . self::digit2hex(ord($value) >> 4) . self::digit2hex(ord($value) & 0xF);
99
+            if (ord($value) > 127)
100
+                $value = '%' . self::digit2hex(ord($value) >> 4) . self::digit2hex(ord($value) & 0xF);
101 101
         }
102 102
         return implode($arr);
103 103
     }
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -81,10 +81,12 @@  discard block
 block discarded – undo
81 81
      * @return uppercased hex digit (0..9, A..F) or underscore (in case of error)
82 82
      */
83 83
     public static function digit2hex($byte){
84
-        if(($byte>=0) && ($byte<=9))
85
-            return chr($byte+ord('0'));
86
-        if(($byte>=10) && ($byte<=15))
87
-            return chr($byte+ord('A')-10);
84
+        if(($byte>=0) && ($byte<=9)) {
85
+                    return chr($byte+ord('0'));
86
+        }
87
+        if(($byte>=10) && ($byte<=15)) {
88
+                    return chr($byte+ord('A')-10);
89
+        }
88 90
         return '_';
89 91
     }
90 92
 
@@ -96,8 +98,9 @@  discard block
 block discarded – undo
96 98
     public static function patternEncode($str){
97 99
         $arr=str_split($str);
98 100
         foreach ($arr as &$value) {
99
-            if(ord($value)>127)
100
-                $value='%' . self::digit2hex(ord($value) >> 4) . self::digit2hex(ord($value) & 0xF);
101
+            if(ord($value)>127) {
102
+                            $value='%' . self::digit2hex(ord($value) >> 4) . self::digit2hex(ord($value) & 0xF);
103
+            }
101 104
         }
102 105
         return implode($arr);
103 106
     }
Please login to merge, or discard this patch.