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 ( 1f9c3d...35fc1b )
by sebastian
03:29
created
src/jwe/JWEFactory.php 3 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Copyright 2015 OpenStack Foundation
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- * http://www.apache.org/licenses/LICENSE-2.0
8
- * Unless required by applicable law or agreed to in writing, software
9
- * distributed under the License is distributed on an "AS IS" BASIS,
10
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- * See the License for the specific language governing permissions and
12
- * limitations under the License.
13
- **/
3
+     * Copyright 2015 OpenStack Foundation
4
+     * Licensed under the Apache License, Version 2.0 (the "License");
5
+     * you may not use this file except in compliance with the License.
6
+     * You may obtain a copy of the License at
7
+     * http://www.apache.org/licenses/LICENSE-2.0
8
+     * Unless required by applicable law or agreed to in writing, software
9
+     * distributed under the License is distributed on an "AS IS" BASIS,
10
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+     * See the License for the specific language governing permissions and
12
+     * limitations under the License.
13
+     **/
14 14
 
15 15
 namespace jwe\impl;
16 16
 
Please login to merge, or discard this patch.
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/CompressionAlgorithm.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Copyright 2015 OpenStack Foundation
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- * http://www.apache.org/licenses/LICENSE-2.0
8
- * Unless required by applicable law or agreed to in writing, software
9
- * distributed under the License is distributed on an "AS IS" BASIS,
10
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- * See the License for the specific language governing permissions and
12
- * limitations under the License.
13
- **/
3
+     * Copyright 2015 OpenStack Foundation
4
+     * Licensed under the Apache License, Version 2.0 (the "License");
5
+     * you may not use this file except in compliance with the License.
6
+     * You may obtain a copy of the License at
7
+     * http://www.apache.org/licenses/LICENSE-2.0
8
+     * Unless required by applicable law or agreed to in writing, software
9
+     * distributed under the License is distributed on an "AS IS" BASIS,
10
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+     * See the License for the specific language governing permissions and
12
+     * limitations under the License.
13
+     **/
14 14
 
15 15
 namespace jwe\compression_algorithms;
16 16
 
Please login to merge, or discard this patch.
src/jwe/compression_algorithms/impl/Deflate.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Copyright 2015 OpenStack Foundation
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- * http://www.apache.org/licenses/LICENSE-2.0
8
- * Unless required by applicable law or agreed to in writing, software
9
- * distributed under the License is distributed on an "AS IS" BASIS,
10
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- * See the License for the specific language governing permissions and
12
- * limitations under the License.
13
- **/
3
+     * Copyright 2015 OpenStack Foundation
4
+     * Licensed under the Apache License, Version 2.0 (the "License");
5
+     * you may not use this file except in compliance with the License.
6
+     * You may obtain a copy of the License at
7
+     * http://www.apache.org/licenses/LICENSE-2.0
8
+     * Unless required by applicable law or agreed to in writing, software
9
+     * distributed under the License is distributed on an "AS IS" BASIS,
10
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+     * See the License for the specific language governing permissions and
12
+     * limitations under the License.
13
+     **/
14 14
 
15 15
 namespace jwe\compression_algorithms\impl;
16 16
 
Please login to merge, or discard this patch.
src/jwe/compression_algorithms/impl/GZip.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Copyright 2015 OpenStack Foundation
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- * http://www.apache.org/licenses/LICENSE-2.0
8
- * Unless required by applicable law or agreed to in writing, software
9
- * distributed under the License is distributed on an "AS IS" BASIS,
10
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- * See the License for the specific language governing permissions and
12
- * limitations under the License.
13
- **/
3
+     * Copyright 2015 OpenStack Foundation
4
+     * Licensed under the Apache License, Version 2.0 (the "License");
5
+     * you may not use this file except in compliance with the License.
6
+     * You may obtain a copy of the License at
7
+     * http://www.apache.org/licenses/LICENSE-2.0
8
+     * Unless required by applicable law or agreed to in writing, software
9
+     * distributed under the License is distributed on an "AS IS" BASIS,
10
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+     * See the License for the specific language governing permissions and
12
+     * limitations under the License.
13
+     **/
14 14
 
15 15
 namespace jwe\compression_algorithms\impl;
16 16
 
Please login to merge, or discard this patch.
src/jwe/compression_algorithms/impl/ZLib.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Copyright 2015 OpenStack Foundation
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- * http://www.apache.org/licenses/LICENSE-2.0
8
- * Unless required by applicable law or agreed to in writing, software
9
- * distributed under the License is distributed on an "AS IS" BASIS,
10
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- * See the License for the specific language governing permissions and
12
- * limitations under the License.
13
- **/
3
+     * Copyright 2015 OpenStack Foundation
4
+     * Licensed under the Apache License, Version 2.0 (the "License");
5
+     * you may not use this file except in compliance with the License.
6
+     * You may obtain a copy of the License at
7
+     * http://www.apache.org/licenses/LICENSE-2.0
8
+     * Unless required by applicable law or agreed to in writing, software
9
+     * distributed under the License is distributed on an "AS IS" BASIS,
10
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+     * See the License for the specific language governing permissions and
12
+     * limitations under the License.
13
+     **/
14 14
 
15 15
 namespace jwe\compression_algorithms\impl;
16 16
 
Please login to merge, or discard this patch.
src/jwe/compression_algorithms/CompressionAlgorithmsNames.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Copyright 2015 OpenStack Foundation
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- * http://www.apache.org/licenses/LICENSE-2.0
8
- * Unless required by applicable law or agreed to in writing, software
9
- * distributed under the License is distributed on an "AS IS" BASIS,
10
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- * See the License for the specific language governing permissions and
12
- * limitations under the License.
13
- **/
3
+     * Copyright 2015 OpenStack Foundation
4
+     * Licensed under the Apache License, Version 2.0 (the "License");
5
+     * you may not use this file except in compliance with the License.
6
+     * You may obtain a copy of the License at
7
+     * http://www.apache.org/licenses/LICENSE-2.0
8
+     * Unless required by applicable law or agreed to in writing, software
9
+     * distributed under the License is distributed on an "AS IS" BASIS,
10
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+     * See the License for the specific language governing permissions and
12
+     * limitations under the License.
13
+     **/
14 14
 
15 15
 namespace jwe\compression_algorithms;
16 16
 
Please login to merge, or discard this patch.
src/jwe/compression_algorithms/CompressionAlgorithms_Registry.php 3 patches
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Copyright 2015 OpenStack Foundation
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- * http://www.apache.org/licenses/LICENSE-2.0
8
- * Unless required by applicable law or agreed to in writing, software
9
- * distributed under the License is distributed on an "AS IS" BASIS,
10
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- * See the License for the specific language governing permissions and
12
- * limitations under the License.
13
- **/
3
+  * Copyright 2015 OpenStack Foundation
4
+  * Licensed under the Apache License, Version 2.0 (the "License");
5
+  * you may not use this file except in compliance with the License.
6
+  * You may obtain a copy of the License at
7
+  * http://www.apache.org/licenses/LICENSE-2.0
8
+  * Unless required by applicable law or agreed to in writing, software
9
+  * distributed under the License is distributed on an "AS IS" BASIS,
10
+  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+  * See the License for the specific language governing permissions and
12
+  * limitations under the License.
13
+  **/
14 14
 
15 15
 namespace jwe\compression_algorithms;
16 16
 
Please login to merge, or discard this patch.
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/PublicKey.php 1 patch
Indentation   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -1,16 +1,16 @@
 block discarded – undo
1 1
 <?php
2 2
 /**
3
- * Copyright 2015 OpenStack Foundation
4
- * Licensed under the Apache License, Version 2.0 (the "License");
5
- * you may not use this file except in compliance with the License.
6
- * You may obtain a copy of the License at
7
- * http://www.apache.org/licenses/LICENSE-2.0
8
- * Unless required by applicable law or agreed to in writing, software
9
- * distributed under the License is distributed on an "AS IS" BASIS,
10
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
- * See the License for the specific language governing permissions and
12
- * limitations under the License.
13
- **/
3
+     * Copyright 2015 OpenStack Foundation
4
+     * Licensed under the Apache License, Version 2.0 (the "License");
5
+     * you may not use this file except in compliance with the License.
6
+     * You may obtain a copy of the License at
7
+     * http://www.apache.org/licenses/LICENSE-2.0
8
+     * Unless required by applicable law or agreed to in writing, software
9
+     * distributed under the License is distributed on an "AS IS" BASIS,
10
+     * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11
+     * See the License for the specific language governing permissions and
12
+     * limitations under the License.
13
+     **/
14 14
 
15 15
 namespace security;
16 16
 
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.