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 ( 41f07f...0ea501 )
by sebastian
05:24
created
src/jwe/impl/_ContentEncryptionKey.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@
 block discarded – undo
44 44
      * @param string $format
45 45
      * @param string $value
46 46
      */
47
-    public function __construct($alg, $format, $value){
47
+    public function __construct($alg, $format, $value) {
48 48
         $this->alg    = $alg;
49 49
         $this->format = $format;
50 50
         $this->value  = $value;
Please login to merge, or discard this patch.
src/jwe/RegisteredJWEJOSEHeaderNames.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
     const CompressionAlgorithm = 'zip';
65 65
 
66 66
 
67
-    public static $registered_basic_headers_set = array (
67
+    public static $registered_basic_headers_set = array(
68 68
         self::Algorithm,
69 69
         self::EncryptionAlgorithm,
70 70
         self::KeyID,
@@ -73,8 +73,8 @@  discard block
 block discarded – undo
73 73
         self::ContentType,
74 74
     );
75 75
 
76
-    public static $registered_basic_headers_set_types = array (
77
-        self::Algorithm            => JsonTypes::StringOrURI ,
76
+    public static $registered_basic_headers_set_types = array(
77
+        self::Algorithm            => JsonTypes::StringOrURI,
78 78
         self::Type                 => JsonTypes::StringOrURI,
79 79
         self::ContentType          => JsonTypes::StringOrURI,
80 80
         self::KeyID                => JsonTypes::JsonValue,
Please login to merge, or discard this patch.
src/jwe/KeyManagementModeValues.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,9 +24,9 @@
 block discarded – undo
24 24
 
25 25
     const KeyWrapping = 'wrap';
26 26
 
27
-    const DirectKeyAgreement ='agree';
27
+    const DirectKeyAgreement = 'agree';
28 28
 
29
-    const KeyAgreementWithKeyWrapping ='agree_wrap';
29
+    const KeyAgreementWithKeyWrapping = 'agree_wrap';
30 30
 
31 31
     const DirectEncryption = 'dir';
32 32
 }
33 33
\ No newline at end of file
Please login to merge, or discard this patch.
src/jwe/JWEFactory.php 2 patches
Spacing   +11 added lines, -16 removed lines patch added patch discarded remove patch
@@ -37,41 +37,36 @@  discard block
 block discarded – undo
37 37
     static public function build(IJWE_Specification $spec)
38 38
     {
39 39
 
40
-        if($spec instanceof IJWE_ParamsSpecification)
40
+        if ($spec instanceof IJWE_ParamsSpecification)
41 41
         {
42 42
 
43
-            if($spec->getRecipientKey()->getKeyUse()->getString() !== JSONWebKeyPublicKeyUseValues::Encryption)
44
-                throw new InvalidJWKType
45
-                (
46
-                    sprintf
47
-                    (
43
+            if ($spec->getRecipientKey()->getKeyUse()->getString() !== JSONWebKeyPublicKeyUseValues::Encryption)
44
+                throw new InvalidJWKType(
45
+                    sprintf(
48 46
                         'use %s not supported (should be "enc")',
49 47
                         $spec->getRecipientKey()->getKeyUse()->getString()
50 48
                     )
51 49
                 );
52 50
 
53
-            if($spec->getAlg()->getString() !== $spec->getRecipientKey()->getAlgorithm()->getString())
54
-                throw new InvalidJWKAlgorithm
55
-                (
56
-                    sprintf
57
-                    (
51
+            if ($spec->getAlg()->getString() !== $spec->getRecipientKey()->getAlgorithm()->getString())
52
+                throw new InvalidJWKAlgorithm(
53
+                    sprintf(
58 54
                         'mismatch between algorithm intended for use with the key %s and the cryptographic algorithm used to encrypt or determine the value of the CEK %s',
59 55
                         $spec->getAlg()->getString(),
60 56
                         $spec->getRecipientKey()->getAlgorithm()->getString()
61 57
                     )
62 58
                 );
63 59
 
64
-            $header = new JWEJOSEHeader
65
-            (
60
+            $header = new JWEJOSEHeader(
66 61
                 $spec->getAlg(),
67 62
                 $spec->getEnc(),
68 63
                 $spec->getRecipientKey()->getId()
69 64
             );
70 65
 
71 66
             //set zip alg
72
-            $zip    = $spec->getZip();
67
+            $zip = $spec->getZip();
73 68
 
74
-            if(!is_null($zip))
69
+            if (!is_null($zip))
75 70
                 $header->setCompressionAlgorithm($zip);
76 71
 
77 72
             $jwe = JWE::fromHeaderAndPayload($header, $spec->getPayload());
@@ -81,7 +76,7 @@  discard block
 block discarded – undo
81 76
             return $jwe;
82 77
         }
83 78
 
84
-        if($spec instanceof IJWE_CompactFormatSpecification)
79
+        if ($spec instanceof IJWE_CompactFormatSpecification)
85 80
         {
86 81
             return JWE::fromCompactSerialization($spec->getCompactFormat());
87 82
         }
Please login to merge, or discard this patch.
Braces   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -40,8 +40,8 @@  discard block
 block discarded – undo
40 40
         if($spec instanceof IJWE_ParamsSpecification)
41 41
         {
42 42
 
43
-            if($spec->getRecipientKey()->getKeyUse()->getString() !== JSONWebKeyPublicKeyUseValues::Encryption)
44
-                throw new InvalidJWKType
43
+            if($spec->getRecipientKey()->getKeyUse()->getString() !== JSONWebKeyPublicKeyUseValues::Encryption) {
44
+                            throw new InvalidJWKType
45 45
                 (
46 46
                     sprintf
47 47
                     (
@@ -49,9 +49,10 @@  discard block
 block discarded – undo
49 49
                         $spec->getRecipientKey()->getKeyUse()->getString()
50 50
                     )
51 51
                 );
52
+            }
52 53
 
53
-            if($spec->getAlg()->getString() !== $spec->getRecipientKey()->getAlgorithm()->getString())
54
-                throw new InvalidJWKAlgorithm
54
+            if($spec->getAlg()->getString() !== $spec->getRecipientKey()->getAlgorithm()->getString()) {
55
+                            throw new InvalidJWKAlgorithm
55 56
                 (
56 57
                     sprintf
57 58
                     (
@@ -60,6 +61,7 @@  discard block
 block discarded – undo
60 61
                         $spec->getRecipientKey()->getAlgorithm()->getString()
61 62
                     )
62 63
                 );
64
+            }
63 65
 
64 66
             $header = new JWEJOSEHeader
65 67
             (
@@ -71,8 +73,9 @@  discard block
 block discarded – undo
71 73
             //set zip alg
72 74
             $zip    = $spec->getZip();
73 75
 
74
-            if(!is_null($zip))
75
-                $header->setCompressionAlgorithm($zip);
76
+            if(!is_null($zip)) {
77
+                            $header->setCompressionAlgorithm($zip);
78
+            }
76 79
 
77 80
             $jwe = JWE::fromHeaderAndPayload($header, $spec->getPayload());
78 81
 
Please login to merge, or discard this patch.
src/jwe/compression_algorithms/CompressionAlgorithms_Registry.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 
32 32
     private $algorithms = array();
33 33
 
34
-    private function __construct(){
34
+    private function __construct() {
35 35
 
36 36
         $this->algorithms[CompressionAlgorithmsNames::Deflate] = new Deflate;
37 37
         $this->algorithms[CompressionAlgorithmsNames::GZip]    = new GZip;
@@ -39,13 +39,13 @@  discard block
 block discarded – undo
39 39
 
40 40
     }
41 41
 
42
-    private function __clone(){}
42
+    private function __clone() {}
43 43
 
44 44
     /**
45 45
      * @return CompressionAlgorithms_Registry
46 46
      */
47
-    public static function getInstance(){
48
-        if(!is_object(self::$instance)){
47
+    public static function getInstance() {
48
+        if (!is_object(self::$instance)) {
49 49
             self::$instance = new CompressionAlgorithms_Registry();
50 50
         }
51 51
         return self::$instance;
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
      * @param string $alg
56 56
      * @return bool
57 57
      */
58
-    public function isSupported($alg){
58
+    public function isSupported($alg) {
59 59
         return array_key_exists($alg, $this->algorithms);
60 60
     }
61 61
 
@@ -63,8 +63,8 @@  discard block
 block discarded – undo
63 63
      * @param $alg
64 64
      * @return null|CompressionAlgorithm
65 65
      */
66
-    public function get($alg){
67
-        if(!$this->isSupported($alg)) return null;
66
+    public function get($alg) {
67
+        if (!$this->isSupported($alg)) return null;
68 68
         return $this->algorithms[$alg];
69 69
     }
70 70
 }
71 71
\ No newline at end of file
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,9 @@
 block discarded – undo
64 64
      * @return null|CompressionAlgorithm
65 65
      */
66 66
     public function get($alg){
67
-        if(!$this->isSupported($alg)) return null;
67
+        if(!$this->isSupported($alg)) {
68
+         return null;
69
+        }
68 70
         return $this->algorithms[$alg];
69 71
     }
70 72
 }
71 73
\ No newline at end of file
Please login to merge, or discard this patch.
src/security/SymmetricSharedKey.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -27,7 +27,7 @@
 block discarded – undo
27 27
     /**
28 28
      * @param string $secret
29 29
      */
30
-    public function __construct($secret){
30
+    public function __construct($secret) {
31 31
         $this->secret = $secret;
32 32
     }
33 33
 
Please login to merge, or discard this patch.
src/security/rsa/_RSAPrivateKeyPEMFornat.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -33,11 +33,11 @@  discard block
 block discarded – undo
33 33
      * @param string $password
34 34
      * @throws RSABadPEMFormat
35 35
      */
36
-    public function __construct($pem_format, $password = null){
36
+    public function __construct($pem_format, $password = null) {
37 37
 
38 38
         parent::__construct($pem_format, $password);
39 39
         $this->d = $this->rsa_imp->exponent;
40
-        if($this->d->toString() === $this->e->toString())
40
+        if ($this->d->toString() === $this->e->toString())
41 41
             throw new RSABadPEMFormat(sprintf('pem %s is a public key!', $pem_format));
42 42
     }
43 43
 
@@ -57,9 +57,9 @@  discard block
 block discarded – undo
57 57
     public function getEncoded()
58 58
     {
59 59
         $pem = $this->rsa_imp->getPrivateKey(CRYPT_RSA_PUBLIC_FORMAT_PKCS1);
60
-        $pem = preg_replace('/\-+BEGIN RSA PRIVATE KEY\-+/','',$pem);
61
-        $pem = preg_replace('/\-+END RSA PRIVATE KEY\-+/','',$pem);
62
-        $pem = str_replace( array("\n","\r","\t"), '', trim($pem));
60
+        $pem = preg_replace('/\-+BEGIN RSA PRIVATE KEY\-+/', '', $pem);
61
+        $pem = preg_replace('/\-+END RSA PRIVATE KEY\-+/', '', $pem);
62
+        $pem = str_replace(array("\n", "\r", "\t"), '', trim($pem));
63 63
         return $pem;
64 64
     }
65 65
 
Please login to merge, or discard this patch.
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,8 +37,9 @@
 block discarded – undo
37 37
 
38 38
         parent::__construct($pem_format, $password);
39 39
         $this->d = $this->rsa_imp->exponent;
40
-        if($this->d->toString() === $this->e->toString())
41
-            throw new RSABadPEMFormat(sprintf('pem %s is a public key!', $pem_format));
40
+        if($this->d->toString() === $this->e->toString()) {
41
+                    throw new RSABadPEMFormat(sprintf('pem %s is a public key!', $pem_format));
42
+        }
42 43
     }
43 44
 
44 45
     /**
Please login to merge, or discard this patch.
src/security/rsa/_RSAPublicKeyPEMFornat.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
      * @param string $password
35 35
      * @throws RSABadPEMFormat
36 36
      */
37
-    public function __construct($pem_format, $password = null){
37
+    public function __construct($pem_format, $password = null) {
38 38
         parent::__construct($pem_format, $password);
39 39
         $this->e = $this->rsa_imp->publicExponent;
40 40
     }
@@ -62,9 +62,9 @@  discard block
 block discarded – undo
62 62
     public function getEncoded()
63 63
     {
64 64
         $pem = $this->rsa_imp->getPublicKey(CRYPT_RSA_PUBLIC_FORMAT_PKCS8);
65
-        $pem = preg_replace('/\-+BEGIN PUBLIC KEY\-+/','',$pem);
66
-        $pem = preg_replace('/\-+END PUBLIC KEY\-+/','',$pem);
67
-        $pem = str_replace( array("\n","\r","\t"), '', trim($pem));
65
+        $pem = preg_replace('/\-+BEGIN PUBLIC KEY\-+/', '', $pem);
66
+        $pem = preg_replace('/\-+END PUBLIC KEY\-+/', '', $pem);
67
+        $pem = str_replace(array("\n", "\r", "\t"), '', trim($pem));
68 68
         return $pem;
69 69
     }
70 70
 
Please login to merge, or discard this patch.
src/security/rsa/RSAFacade.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -33,17 +33,17 @@  discard block
 block discarded – undo
33 33
      */
34 34
     private $rsa_imp;
35 35
 
36
-    private function __construct(){
36
+    private function __construct() {
37 37
         $this->rsa_imp = new \Crypt_RSA();
38 38
     }
39 39
 
40
-    private function __clone(){}
40
+    private function __clone() {}
41 41
 
42 42
     /**
43 43
      * @return RSAFacade
44 44
      */
45
-    public static function getInstance(){
46
-        if(!is_object(self::$instance)){
45
+    public static function getInstance() {
46
+        if (!is_object(self::$instance)) {
47 47
             self::$instance = new RSAFacade();
48 48
         }
49 49
         return self::$instance;
@@ -53,12 +53,12 @@  discard block
 block discarded – undo
53 53
      * @param $bits
54 54
      * @return KeyPair
55 55
      */
56
-    public function buildKeyPair($bits){
56
+    public function buildKeyPair($bits) {
57 57
         $this->rsa_imp->setPrivateKeyFormat(CRYPT_RSA_PRIVATE_FORMAT_PKCS1);
58 58
         $this->rsa_imp->setPublicKeyFormat(CRYPT_RSA_PUBLIC_FORMAT_PKCS1);
59 59
 
60 60
         $list = $this->rsa_imp->createKey($bits);
61
-        return new KeyPair( new _RSAPublicKeyPEMFornat($list['publickey']), new _RSAPrivateKeyPEMFornat($list['privatekey']));
61
+        return new KeyPair(new _RSAPublicKeyPEMFornat($list['publickey']), new _RSAPrivateKeyPEMFornat($list['privatekey']));
62 62
     }
63 63
 
64 64
     /**
@@ -66,7 +66,7 @@  discard block
 block discarded – undo
66 66
      * @param \Math_BigInteger $e
67 67
      * @return RSAPublicKey
68 68
      */
69
-    public function buildPublicKey(\Math_BigInteger $n, \Math_BigInteger $e){
69
+    public function buildPublicKey(\Math_BigInteger $n, \Math_BigInteger $e) {
70 70
         $public_key_pem = $this->rsa_imp->_convertPublicKey($n, $e);
71 71
         return new _RSAPublicKeyPEMFornat($public_key_pem);
72 72
     }
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
      * @param \Math_BigInteger $d
77 77
      * @return RSAPrivateKey
78 78
      */
79
-    public function buildMinimalPrivateKey(\Math_BigInteger $n, \Math_BigInteger $d){
79
+    public function buildMinimalPrivateKey(\Math_BigInteger $n, \Math_BigInteger $d) {
80 80
         $this->rsa_imp->modulus = $n;
81 81
         $this->rsa_imp->exponent = $d;
82 82
         $private_key_pem = $this->rsa_imp->_getPrivatePublicKey();
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
                                     \Math_BigInteger $q,
102 102
                                     \Math_BigInteger $dp,
103 103
                                     \Math_BigInteger $dq,
104
-                                    \Math_BigInteger $qi){
104
+                                    \Math_BigInteger $qi) {
105 105
 
106 106
         $private_key_pem = $this->rsa_imp->_convertPrivateKey(
107 107
             $n,
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
      * @return RSAPrivateKey
121 121
      * @throws RSABadPEMFormat
122 122
      */
123
-    public function buildPrivateKeyFromPEM($private_key_pem, $password = null){
123
+    public function buildPrivateKeyFromPEM($private_key_pem, $password = null) {
124 124
        return new _RSAPrivateKeyPEMFornat($private_key_pem, $password);
125 125
     }
126 126
 
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
      * @return RSAPublicKey
130 130
      * @throws RSABadPEMFormat
131 131
      */
132
-    public function buildPublicKeyFromPEM($public_key_pem){
132
+    public function buildPublicKeyFromPEM($public_key_pem) {
133 133
         return new _RSAPublicKeyPEMFornat($public_key_pem);
134 134
     }
135 135
 
Please login to merge, or discard this patch.