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 ( 0ea501...6c40ed )
by sebastian
04:26 queued 02:55
created
src/jwk/impl/JWK.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -36,9 +36,9 @@  discard block
 block discarded – undo
36 36
      * @throws InvalidJWKType
37 37
      * @throws InvalidJWKUseException
38 38
      */
39
-    protected function __construct(array $headers = []){
39
+    protected function __construct(array $headers = []) {
40 40
 
41
-        if(count($headers) === 0 ) return;
41
+        if (count($headers) === 0) return;
42 42
 
43 43
         $alg = @$headers[JSONWebKeyParameters::Algorithm];
44 44
         $this->setAlgorithm($alg);
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      */
81 81
     public function setId($kid)
82 82
     {
83
-        if(!empty($kid))
83
+        if (!empty($kid))
84 84
             $this->set[JSONWebKeyParameters::KeyId] = new  JsonValue($kid);
85 85
         return $this;
86 86
     }
@@ -92,8 +92,8 @@  discard block
 block discarded – undo
92 92
      */
93 93
     public function setAlgorithm($alg)
94 94
     {
95
-        if(!in_array($alg, JSONWebSignatureAndEncryptionAlgorithms::$header_location_alg))
96
-            throw new InvalidJWKAlgorithm (sprintf('alg %s', $alg));
95
+        if (!in_array($alg, JSONWebSignatureAndEncryptionAlgorithms::$header_location_alg))
96
+            throw new InvalidJWKAlgorithm(sprintf('alg %s', $alg));
97 97
 
98 98
         $this->set[JSONWebKeyParameters::Algorithm] = new StringOrURI($alg);
99 99
         return $this;
@@ -106,8 +106,8 @@  discard block
 block discarded – undo
106 106
      */
107 107
     public function setKeyUse($use)
108 108
     {
109
-        if(empty($use)) return $this;
110
-        if(!in_array($use, JSONWebKeyPublicKeyUseValues::$valid_uses))
109
+        if (empty($use)) return $this;
110
+        if (!in_array($use, JSONWebKeyPublicKeyUseValues::$valid_uses))
111 111
             throw new InvalidJWKUseException(sprintf('use %s', $use));
112 112
 
113 113
         $this->set[JSONWebKeyParameters::PublicKeyUse] = new StringOrURI($use);
@@ -121,7 +121,7 @@  discard block
 block discarded – undo
121 121
      */
122 122
     public function setType($type)
123 123
     {
124
-        if(!in_array($type, JSONWebKeyTypes::$valid_keys_set))
124
+        if (!in_array($type, JSONWebKeyTypes::$valid_keys_set))
125 125
             throw new InvalidJWKType(sprintf('use %s', $type));
126 126
 
127 127
         $this->set[JSONWebKeyParameters::KeyType] = new StringOrURI($type);
Please login to merge, or discard this patch.
Braces   +18 added lines, -10 removed lines patch added patch discarded remove patch
@@ -38,7 +38,9 @@  discard block
 block discarded – undo
38 38
      */
39 39
     protected function __construct(array $headers = []){
40 40
 
41
-        if(count($headers) === 0 ) return;
41
+        if(count($headers) === 0 ) {
42
+         return;
43
+        }
42 44
 
43 45
         $alg = @$headers[JSONWebKeyParameters::Algorithm];
44 46
         $this->setAlgorithm($alg);
@@ -80,8 +82,9 @@  discard block
 block discarded – undo
80 82
      */
81 83
     public function setId($kid)
82 84
     {
83
-        if(!empty($kid))
84
-            $this->set[JSONWebKeyParameters::KeyId] = new  JsonValue($kid);
85
+        if(!empty($kid)) {
86
+                    $this->set[JSONWebKeyParameters::KeyId] = new  JsonValue($kid);
87
+        }
85 88
         return $this;
86 89
     }
87 90
 
@@ -92,8 +95,9 @@  discard block
 block discarded – undo
92 95
      */
93 96
     public function setAlgorithm($alg)
94 97
     {
95
-        if(!in_array($alg, JSONWebSignatureAndEncryptionAlgorithms::$header_location_alg))
96
-            throw new InvalidJWKAlgorithm (sprintf('alg %s', $alg));
98
+        if(!in_array($alg, JSONWebSignatureAndEncryptionAlgorithms::$header_location_alg)) {
99
+                    throw new InvalidJWKAlgorithm (sprintf('alg %s', $alg));
100
+        }
97 101
 
98 102
         $this->set[JSONWebKeyParameters::Algorithm] = new StringOrURI($alg);
99 103
         return $this;
@@ -106,9 +110,12 @@  discard block
 block discarded – undo
106 110
      */
107 111
     public function setKeyUse($use)
108 112
     {
109
-        if(empty($use)) return $this;
110
-        if(!in_array($use, JSONWebKeyPublicKeyUseValues::$valid_uses))
111
-            throw new InvalidJWKUseException(sprintf('use %s', $use));
113
+        if(empty($use)) {
114
+         return $this;
115
+        }
116
+        if(!in_array($use, JSONWebKeyPublicKeyUseValues::$valid_uses)) {
117
+                    throw new InvalidJWKUseException(sprintf('use %s', $use));
118
+        }
112 119
 
113 120
         $this->set[JSONWebKeyParameters::PublicKeyUse] = new StringOrURI($use);
114 121
         return $this;
@@ -121,8 +128,9 @@  discard block
 block discarded – undo
121 128
      */
122 129
     public function setType($type)
123 130
     {
124
-        if(!in_array($type, JSONWebKeyTypes::$valid_keys_set))
125
-            throw new InvalidJWKType(sprintf('use %s', $type));
131
+        if(!in_array($type, JSONWebKeyTypes::$valid_keys_set)) {
132
+                    throw new InvalidJWKType(sprintf('use %s', $type));
133
+        }
126 134
 
127 135
         $this->set[JSONWebKeyParameters::KeyType] = new StringOrURI($type);
128 136
         return $this;
Please login to merge, or discard this patch.
src/utils/ByteUtil.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
      * @param int $byte_len
23 23
      * @return int
24 24
      */
25
-    static public function bitLength($byte_len){
25
+    static public function bitLength($byte_len) {
26 26
         return $byte_len * 8;
27 27
     }
28 28
 
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
      * @param int $byte_len
31 31
      * @return String
32 32
      */
33
-    static public function randomBytes($byte_len){
33
+    static public function randomBytes($byte_len) {
34 34
         return Random::string($byte_len);
35 35
     }
36 36
 
@@ -38,10 +38,10 @@  discard block
 block discarded – undo
38 38
      * @param array $oct
39 39
      * @return string
40 40
      */
41
-    static public function convertHalfWordArrayToBin(array $oct){
41
+    static public function convertHalfWordArrayToBin(array $oct) {
42 42
         $hex = '';
43
-        foreach($oct as $b){
44
-            $hex .= str_pad(dechex($b),2,'0',STR_PAD_LEFT);
43
+        foreach ($oct as $b) {
44
+            $hex .= str_pad(dechex($b), 2, '0', STR_PAD_LEFT);
45 45
         }
46 46
         return self::hex2bin($hex);
47 47
     }
@@ -50,15 +50,15 @@  discard block
 block discarded – undo
50 50
      * @param int $nbr
51 51
      * @return string
52 52
      */
53
-    static public function convert2UnsignedLongBE($nbr){
54
-        $hex = str_pad(dechex($nbr),16,'0',STR_PAD_LEFT);
53
+    static public function convert2UnsignedLongBE($nbr) {
54
+        $hex = str_pad(dechex($nbr), 16, '0', STR_PAD_LEFT);
55 55
         return self::hex2bin($hex);
56 56
     }
57 57
 
58
-    static public function hex2bin($hex_string){
59
-        if ( function_exists( 'hex2bin' ) ){
58
+    static public function hex2bin($hex_string) {
59
+        if (function_exists('hex2bin')) {
60 60
             return hex2bin($hex_string);
61 61
         }
62
-        return pack("H*" , $hex_string);
62
+        return pack("H*", $hex_string);
63 63
     }
64 64
 }
65 65
\ No newline at end of file
Please login to merge, or discard this patch.
src/utils/json_types/Base64urlUInt.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
     /**
23 23
      * @return BigInteger
24 24
      */
25
-    public function toBigInt(){
25
+    public function toBigInt() {
26 26
         $b64 = new Base64UrlRepresentation();
27 27
         $hex = bin2hex($b64->decode($this->value));
28 28
         return new BigInteger('0x'.$hex, 16);
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
      * @param BigInteger $big_int
33 33
      * @return Base64urlUInt
34 34
      */
35
-    public static function fromBigInt(BigInteger $big_int){
35
+    public static function fromBigInt(BigInteger $big_int) {
36 36
         $b64 = new Base64UrlRepresentation();
37 37
         $input = $big_int->toBytes();
38 38
         return new Base64urlUInt($b64->encode($input));
Please login to merge, or discard this patch.
src/jwt/utils/JOSEHeaderFactory.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
  */
22 22
 class JOSEHeaderFactory {
23 23
 
24
-    static protected function getProductClass(){
24
+    static protected function getProductClass() {
25 25
         return  '\jwt\impl\JOSEHeader';
26 26
     }
27 27
 
@@ -35,12 +35,12 @@  discard block
 block discarded – undo
35 35
 
36 36
         $args = [];
37 37
 
38
-        foreach(RegisteredJOSEHeaderNames::$registered_basic_headers_set as $header_name){
38
+        foreach (RegisteredJOSEHeaderNames::$registered_basic_headers_set as $header_name) {
39 39
             $value = isset($raw_headers[$header_name]) ? $raw_headers[$header_name] : null;
40 40
             $type  = @RegisteredJOSEHeaderNames::$registered_basic_headers_set_types[$header_name];
41
-            if(!is_null($value))
41
+            if (!is_null($value))
42 42
             {
43
-                if(is_null($type)) continue;
43
+                if (is_null($type)) continue;
44 44
                 $class    = new \ReflectionClass($type);
45 45
                 $value    = $class->newInstanceArgs(array($value));
46 46
             }
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 
55 55
         // unregistered headers
56 56
 
57
-        foreach($raw_headers as $k => $v){
57
+        foreach ($raw_headers as $k => $v) {
58 58
             $basic_header->addHeader(new JOSEHeaderParam($k, new JsonValue($v)));
59 59
         }
60 60
 
Please login to merge, or discard this patch.
src/jwe/impl/JWESerializer.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -46,7 +46,7 @@
 block discarded – undo
46 46
      * @return array
47 47
      * @throws JWEInvalidCompactFormatException
48 48
      */
49
-    static public function deserialize($input){
49
+    static public function deserialize($input) {
50 50
         $parts = explode(IBasicJWT::SegmentSeparator, $input);
51 51
         if (count($parts) !== 5) throw new JWEInvalidCompactFormatException;
52 52
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -48,7 +48,9 @@
 block discarded – undo
48 48
      */
49 49
     static public function deserialize($input){
50 50
         $parts = explode(IBasicJWT::SegmentSeparator, $input);
51
-        if (count($parts) !== 5) throw new JWEInvalidCompactFormatException;
51
+        if (count($parts) !== 5) {
52
+         throw new JWEInvalidCompactFormatException;
53
+        }
52 54
 
53 55
         $header = JWEJOSEHeaderSerializer::deserialize($parts[0]);
54 56
         $enc_cek = JWTRawSerializer::deserialize($parts[1]);
Please login to merge, or discard this patch.
src/jwe/impl/JWEJOSEHeaderFactory.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
  */
22 22
 final class JWEJOSEHeaderFactory {
23 23
 
24
-    static protected function getProductClass(){
24
+    static protected function getProductClass() {
25 25
         return  '\jwe\impl\JWEJOSEHeader';
26 26
     }
27 27
 
@@ -30,16 +30,16 @@  discard block
 block discarded – undo
30 30
      * @return IJWEJOSEHeader
31 31
      * @throws \ReflectionException
32 32
      */
33
-    public static function build(array $raw_headers){
33
+    public static function build(array $raw_headers) {
34 34
 
35 35
         $args = array();
36 36
 
37
-        foreach(RegisteredJWEJOSEHeaderNames::$registered_basic_headers_set as $header_name){
37
+        foreach (RegisteredJWEJOSEHeaderNames::$registered_basic_headers_set as $header_name) {
38 38
             $value = isset($raw_headers[$header_name]) ? $raw_headers[$header_name] : null;
39 39
             $type  = @RegisteredJWEJOSEHeaderNames::$registered_basic_headers_set_types[$header_name];
40
-            if(!is_null($value))
40
+            if (!is_null($value))
41 41
             {
42
-                if(is_null($type)) continue;
42
+                if (is_null($type)) continue;
43 43
                 $class    = new \ReflectionClass($type);
44 44
                 $value    = $class->newInstanceArgs(array($value));
45 45
             }
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 
54 54
         // unregistered headers
55 55
 
56
-        foreach($raw_headers as $k => $v){
56
+        foreach ($raw_headers as $k => $v) {
57 57
             $basic_header->addHeader(new JOSEHeaderParam($k, new JsonValue($v)));
58 58
         }
59 59
 
Please login to merge, or discard this patch.
src/jwe/compression_algorithms/CompressionAlgorithms_Registry.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@  discard block
 block discarded – undo
27 27
 
28 28
     private $algorithms = [];
29 29
 
30
-    private function __construct(){
30
+    private function __construct() {
31 31
 
32 32
         $this->algorithms[CompressionAlgorithmsNames::Deflate] = new Deflate;
33 33
         $this->algorithms[CompressionAlgorithmsNames::GZip]    = new GZip;
@@ -35,13 +35,13 @@  discard block
 block discarded – undo
35 35
 
36 36
     }
37 37
 
38
-    private function __clone(){}
38
+    private function __clone() {}
39 39
 
40 40
     /**
41 41
      * @return CompressionAlgorithms_Registry
42 42
      */
43
-    public static function getInstance(){
44
-        if(!is_object(self::$instance)){
43
+    public static function getInstance() {
44
+        if (!is_object(self::$instance)) {
45 45
             self::$instance = new CompressionAlgorithms_Registry();
46 46
         }
47 47
         return self::$instance;
@@ -51,7 +51,7 @@  discard block
 block discarded – undo
51 51
      * @param string $alg
52 52
      * @return bool
53 53
      */
54
-    public function isSupported($alg){
54
+    public function isSupported($alg) {
55 55
         return array_key_exists($alg, $this->algorithms);
56 56
     }
57 57
 
@@ -59,8 +59,8 @@  discard block
 block discarded – undo
59 59
      * @param $alg
60 60
      * @return null|CompressionAlgorithm
61 61
      */
62
-    public function get($alg){
63
-        if(!$this->isSupported($alg)) return null;
62
+    public function get($alg) {
63
+        if (!$this->isSupported($alg)) return null;
64 64
         return $this->algorithms[$alg];
65 65
     }
66 66
 }
67 67
\ No newline at end of file
Please login to merge, or discard this patch.
digital_signatures/rsa/PKCS1/RSASSA_PKCS1_v1_5_Algorithm.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,6 +24,6 @@
 block discarded – undo
24 24
      */
25 25
     public function getPaddingMode()
26 26
     {
27
-        return RSA::SIGNATURE_PKCS1 ;
27
+        return RSA::SIGNATURE_PKCS1;
28 28
     }
29 29
 }
30 30
\ No newline at end of file
Please login to merge, or discard this patch.
src/jwa/cryptographic_algorithms/DigitalSignatures_MACs_Registry.php 1 patch
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -36,7 +36,7 @@  discard block
 block discarded – undo
36 36
 
37 37
     private $algorithms = [];
38 38
 
39
-    private function __construct(){
39
+    private function __construct() {
40 40
 
41 41
         $this->algorithms[JSONWebSignatureAndEncryptionAlgorithms::HS256] = new HS256_Algorithm;
42 42
         $this->algorithms[JSONWebSignatureAndEncryptionAlgorithms::HS384] = new HS384_Algorithm;
@@ -52,13 +52,13 @@  discard block
 block discarded – undo
52 52
 
53 53
     }
54 54
 
55
-    private function __clone(){}
55
+    private function __clone() {}
56 56
 
57 57
     /**
58 58
      * @return DigitalSignatures_MACs_Registry
59 59
      */
60
-    public static function getInstance(){
61
-        if(!is_object(self::$instance)){
60
+    public static function getInstance() {
61
+        if (!is_object(self::$instance)) {
62 62
             self::$instance = new DigitalSignatures_MACs_Registry();
63 63
         }
64 64
         return self::$instance;
@@ -68,7 +68,7 @@  discard block
 block discarded – undo
68 68
      * @param string $alg
69 69
      * @return bool
70 70
      */
71
-    public function isSupported($alg){
71
+    public function isSupported($alg) {
72 72
         return array_key_exists($alg, $this->algorithms);
73 73
     }
74 74
 
@@ -76,8 +76,8 @@  discard block
 block discarded – undo
76 76
      * @param $alg
77 77
      * @return null|DigitalSignatureAlgorithm|MAC_Algorithm
78 78
      */
79
-    public function get($alg){
80
-        if(!$this->isSupported($alg)) return null;
79
+    public function get($alg) {
80
+        if (!$this->isSupported($alg)) return null;
81 81
         return $this->algorithms[$alg];
82 82
     }
83 83
 }
84 84
\ No newline at end of file
Please login to merge, or discard this patch.