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 ( 6c40ed...665ea8 )
by sebastian
01:26
created
src/jwa/cryptographic_algorithms/digital_signatures/rsa/RSA_Algorithm.php 1 patch
Braces   +18 added lines, -9 removed lines patch added patch discarded remove patch
@@ -39,10 +39,13 @@  discard block
 block discarded – undo
39 39
      */
40 40
     public function sign(PrivateKey $private_key, $message)
41 41
     {
42
-        if(!($private_key instanceof RSAPrivateKey)) throw new InvalidKeyTypeAlgorithmException;
42
+        if(!($private_key instanceof RSAPrivateKey)) {
43
+         throw new InvalidKeyTypeAlgorithmException;
44
+        }
43 45
 
44
-        if($this->getMinKeyLen() > $private_key->getBitLength())
45
-            throw new InvalidKeyLengthAlgorithmException(sprintf('min len %s - cur len %s.',$this->getMinKeyLen(), $private_key->getBitLength()));
46
+        if($this->getMinKeyLen() > $private_key->getBitLength()) {
47
+                    throw new InvalidKeyLengthAlgorithmException(sprintf('min len %s - cur len %s.',$this->getMinKeyLen(), $private_key->getBitLength()));
48
+        }
46 49
 
47 50
         if($private_key->hasPassword()){
48 51
             $this->rsa_impl->setPassword($private_key->getPassword());
@@ -50,8 +53,9 @@  discard block
 block discarded – undo
50 53
 
51 54
         $res = $this->rsa_impl->loadKey($private_key->getEncoded());
52 55
 
53
-        if(!$res)
54
-            throw new InvalidKeyTypeAlgorithmException;
56
+        if(!$res) {
57
+                    throw new InvalidKeyTypeAlgorithmException;
58
+        }
55 59
 
56 60
         $this->rsa_impl->setHash($this->getHashingAlgorithm());
57 61
         $this->rsa_impl->setMGFHash($this->getHashingAlgorithm());
@@ -69,14 +73,19 @@  discard block
 block discarded – undo
69 73
      */
70 74
     public function verify(Key $key, $message, $signature)
71 75
     {
72
-        if(!($key instanceof RSAPublicKey)) throw new InvalidKeyTypeAlgorithmException;
76
+        if(!($key instanceof RSAPublicKey)) {
77
+         throw new InvalidKeyTypeAlgorithmException;
78
+        }
73 79
 
74
-        if($this->getMinKeyLen() > $key->getBitLength())
75
-            throw new InvalidKeyLengthAlgorithmException(sprintf('min len %s - cur len %s.',$this->getMinKeyLen(), $key->getBitLength()));
80
+        if($this->getMinKeyLen() > $key->getBitLength()) {
81
+                    throw new InvalidKeyLengthAlgorithmException(sprintf('min len %s - cur len %s.',$this->getMinKeyLen(), $key->getBitLength()));
82
+        }
76 83
 
77 84
         $res = $this->rsa_impl->loadKey($key->getEncoded());
78 85
 
79
-        if(!$res) throw new InvalidKeyTypeAlgorithmException;
86
+        if(!$res) {
87
+         throw new InvalidKeyTypeAlgorithmException;
88
+        }
80 89
 
81 90
         $this->rsa_impl->setHash($this->getHashingAlgorithm());
82 91
         $this->rsa_impl->setMGFHash($this->getHashingAlgorithm());
Please login to merge, or discard this patch.
src/security/rsa/_AbstractRSAKeyPEMFormat.php 1 patch
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,9 @@
 block discarded – undo
71 71
 
72 72
         $res = $this->rsa_imp->loadKey($this->pem_format, RSA::PRIVATE_FORMAT_PKCS1);
73 73
 
74
-        if(!$res) throw new RSABadPEMFormat(sprintf('pem %s',$pem_format ));
74
+        if(!$res) {
75
+         throw new RSABadPEMFormat(sprintf('pem %s',$pem_format ));
76
+        }
75 77
 
76 78
         $this->n = $this->rsa_imp->modulus;
77 79
     }
Please login to merge, or discard this patch.