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 ( 665ea8...1b4181 )
by sebastian
15s
created
src/jwa/cryptographic_algorithms/KeyManagementAlgorithms_Registry.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -72,7 +72,9 @@
 block discarded – undo
72 72
      */
73 73
     public function get($alg)
74 74
     {
75
-        if(!$this->isSupported($alg)) return null;
75
+        if(!$this->isSupported($alg)) {
76
+         return null;
77
+        }
76 78
         return $this->algorithms[$alg];
77 79
     }
78 80
 }
79 81
\ No newline at end of file
Please login to merge, or discard this patch.
src/jwa/cryptographic_algorithms/DigitalSignatures_MACs_Registry.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -81,7 +81,9 @@
 block discarded – undo
81 81
      * @return null|DigitalSignatureAlgorithm|MAC_Algorithm
82 82
      */
83 83
     public function get($alg){
84
-        if(!$this->isSupported($alg)) return null;
84
+        if(!$this->isSupported($alg)) {
85
+         return null;
86
+        }
85 87
         return $this->algorithms[$alg];
86 88
     }
87 89
 }
88 90
\ No newline at end of file
Please login to merge, or discard this patch.
src/jwa/cryptographic_algorithms/macs/HSMAC_Algorithm.php 1 patch
Braces   +6 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,8 +37,9 @@  discard block
 block discarded – undo
37 37
      */
38 38
     public function digest(SharedKey $key, $message){
39 39
 
40
-        if($this->getMinKeyLen() > $key->getBitLength())
41
-            throw new InvalidKeyLengthAlgorithmException(sprintf('min len %s - cur len %s.',$this->getMinKeyLen(), $key->getBitLength()));
40
+        if($this->getMinKeyLen() > $key->getBitLength()) {
41
+                    throw new InvalidKeyLengthAlgorithmException(sprintf('min len %s - cur len %s.',$this->getMinKeyLen(), $key->getBitLength()));
42
+        }
42 43
 
43 44
         return hash_hmac($this->getHashingAlgorithm(), $message, $key->getSecret(), true);
44 45
     }
@@ -52,7 +53,9 @@  discard block
 block discarded – undo
52 53
      * @throws InvalidKeyTypeAlgorithmException
53 54
      */
54 55
     public function verify(Key $key, $message, $digest){
55
-        if(!($key instanceof SharedKey)) throw new InvalidKeyTypeAlgorithmException;
56
+        if(!($key instanceof SharedKey)) {
57
+         throw new InvalidKeyTypeAlgorithmException;
58
+        }
56 59
 
57 60
         return $digest === $this->digest($key, $message);
58 61
     }
Please login to merge, or discard this patch.
src/jwa/cryptographic_algorithms/ContentEncryptionAlgorithms_Registry.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -68,7 +68,9 @@
 block discarded – undo
68 68
      * @return null|ContentEncryptionAlgorithm
69 69
      */
70 70
     public function get($alg) {
71
-        if (!$this->isSupported($alg)) return null;
71
+        if (!$this->isSupported($alg)) {
72
+         return null;
73
+        }
72 74
         return $this->algorithms[$alg];
73 75
     }
74 76
 }
75 77
\ No newline at end of file
Please login to merge, or discard this patch.
cryptographic_algorithms/key_management/rsa/RSA_KeyManagementAlgorithm.php 1 patch
Braces   +24 added lines, -16 removed lines patch added patch discarded remove patch
@@ -47,19 +47,23 @@  discard block
 block discarded – undo
47 47
      */
48 48
     public function encrypt(Key $key, $message)
49 49
     {
50
-        if(!($key instanceof RSAPublicKey))
51
-            throw new InvalidKeyTypeAlgorithmException('key is not public');
50
+        if(!($key instanceof RSAPublicKey)) {
51
+                    throw new InvalidKeyTypeAlgorithmException('key is not public');
52
+        }
52 53
 
53
-        if($key->getFormat() !== 'PKCS8')
54
-            throw new InvalidKeyTypeAlgorithmException('keys is not on PKCS1 format');
54
+        if($key->getFormat() !== 'PKCS8') {
55
+                    throw new InvalidKeyTypeAlgorithmException('keys is not on PKCS1 format');
56
+        }
55 57
 
56 58
         $res = $this->rsa_impl->loadKey($key->getEncoded());
57 59
 
58
-        if(!$res)
59
-            throw new InvalidKeyTypeAlgorithmException('could not parse the key');
60
+        if(!$res) {
61
+                    throw new InvalidKeyTypeAlgorithmException('could not parse the key');
62
+        }
60 63
 
61
-        if($this->rsa_impl->getSize() < $this->getMinKeyLen())
62
-            throw new InvalidKeyTypeAlgorithmException('len is invalid');
64
+        if($this->rsa_impl->getSize() < $this->getMinKeyLen()) {
65
+                    throw new InvalidKeyTypeAlgorithmException('len is invalid');
66
+        }
63 67
 
64 68
         return $this->rsa_impl->encrypt($message);
65 69
     }
@@ -72,20 +76,24 @@  discard block
 block discarded – undo
72 76
      */
73 77
     public function decrypt(Key $key, $enc_message){
74 78
 
75
-        if(!($key instanceof RSAPrivateKey))
76
-            throw new InvalidKeyTypeAlgorithmException('key is not private');
79
+        if(!($key instanceof RSAPrivateKey)) {
80
+                    throw new InvalidKeyTypeAlgorithmException('key is not private');
81
+        }
77 82
 
78 83
 
79
-        if($key->getFormat() !== 'PKCS1')
80
-            throw new InvalidKeyTypeAlgorithmException('keys is not on PKCS1 format');
84
+        if($key->getFormat() !== 'PKCS1') {
85
+                    throw new InvalidKeyTypeAlgorithmException('keys is not on PKCS1 format');
86
+        }
81 87
 
82 88
         $res = $this->rsa_impl->loadKey($key->getEncoded());
83 89
 
84
-        if(!$res)
85
-            throw new InvalidKeyTypeAlgorithmException('could not parse the key');
90
+        if(!$res) {
91
+                    throw new InvalidKeyTypeAlgorithmException('could not parse the key');
92
+        }
86 93
 
87
-        if($this->rsa_impl->getSize() < $this->getMinKeyLen())
88
-            throw new InvalidKeyTypeAlgorithmException('len is invalid');
94
+        if($this->rsa_impl->getSize() < $this->getMinKeyLen()) {
95
+                    throw new InvalidKeyTypeAlgorithmException('len is invalid');
96
+        }
89 97
 
90 98
         return $this->rsa_impl->decrypt($enc_message);
91 99
     }
Please login to merge, or discard this patch.
content_encryption/AES_CBC_HS/AES_CBC_HMAC_SHA2_Algorithm.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -60,8 +60,9 @@  discard block
 block discarded – undo
60 60
     {
61 61
         $key_len = strlen($key);
62 62
 
63
-        if($this->getMinKeyLen() > ByteUtil::bitLength($key_len))
64
-            throw new InvalidKeyLengthAlgorithmException;
63
+        if($this->getMinKeyLen() > ByteUtil::bitLength($key_len)) {
64
+                    throw new InvalidKeyLengthAlgorithmException;
65
+        }
65 66
 
66 67
         $enc_key_len = $key_len / 2;
67 68
         // ENC_KEY = final ENC_KEY_LEN octets of K
@@ -133,8 +134,9 @@  discard block
 block discarded – undo
133 134
      */
134 135
     public function decrypt($cypher_text, $key, $iv, $aad, $tag)
135 136
     {
136
-        if(!$this->checkAuthenticationTag($cypher_text, $key, $iv, $aad, $tag))
137
-            throw new InvalidAuthenticationTagException;
137
+        if(!$this->checkAuthenticationTag($cypher_text, $key, $iv, $aad, $tag)) {
138
+                    throw new InvalidAuthenticationTagException;
139
+        }
138 140
 
139 141
         $enc_key_len = strlen($key) / 2;
140 142
         // ENC_KEY = final ENC_KEY_LEN octets of K
Please login to merge, or discard this patch.
src/jwt/impl/JWT.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -108,9 +108,13 @@
 block discarded – undo
108 108
     {
109 109
         $now = new \DateTime();
110 110
         $exp = $this->getClaimSet()->getExpirationTime()->getDateTime();
111
-        if($exp < $now) return true;
111
+        if($exp < $now) {
112
+         return true;
113
+        }
112 114
         $iat = $this->getClaimSet()->getIssuedAt()->getDateTime();
113
-        if($iat > $now) return true;
115
+        if($iat > $now) {
116
+         return true;
117
+        }
114 118
         $diff = $now->getTimestamp() - $iat->getTimestamp();
115 119
         return $diff > $tolerance;
116 120
     }
Please login to merge, or discard this patch.
src/jwt/impl/JWTSerializer.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -50,8 +50,9 @@
 block discarded – undo
50 50
 
51 51
         $e_parts = explode(IBasicJWT::SegmentSeparator, $input);
52 52
 
53
-        if(count($e_parts) < 2)
54
-            throw new InvalidJWTException(sprintf('%s has only 2 or less encoded parts!'));
53
+        if(count($e_parts) < 2) {
54
+                    throw new InvalidJWTException(sprintf('%s has only 2 or less encoded parts!'));
55
+        }
55 56
         $e_header    = $e_parts[0];
56 57
         $e_payload   = $e_parts[1];
57 58
         $e_signature = count($e_parts)>2 ? $e_parts[2] : '';
Please login to merge, or discard this patch.
src/jwt/impl/JWTClaimSet.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -123,8 +123,9 @@
 block discarded – undo
123 123
      */
124 124
     public function addClaim(JWTClaim $claim)
125 125
     {
126
-        if (isset($this->set[$claim->getName()]))
127
-            throw new ClaimAlreadyExistsException($claim->getName());
126
+        if (isset($this->set[$claim->getName()])) {
127
+                    throw new ClaimAlreadyExistsException($claim->getName());
128
+        }
128 129
 
129 130
         $this->set[$claim->getName()] = $claim->getValue();
130 131
     }
Please login to merge, or discard this patch.