@@ -1,16 +1,16 @@ |
||
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 jwk; |
16 | 16 |
@@ -1,16 +1,16 @@ |
||
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 jwk; |
16 | 16 |
@@ -1,16 +1,16 @@ |
||
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 jwk; |
16 | 16 |
@@ -1,16 +1,16 @@ |
||
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 jwk; |
16 | 16 |
@@ -26,7 +26,7 @@ discard block |
||
26 | 26 | /** |
27 | 27 | * @return \Math_BigInteger |
28 | 28 | */ |
29 | - public function toBigInt(){ |
|
29 | + public function toBigInt() { |
|
30 | 30 | $b64 = new Base64UrlRepresentation(); |
31 | 31 | $hex = bin2hex($b64->decode($this->value)); |
32 | 32 | return new \Math_BigInteger('0x'.$hex, 16); |
@@ -36,7 +36,7 @@ discard block |
||
36 | 36 | * @param \Math_BigInteger $big_int |
37 | 37 | * @return Base64urlUInt |
38 | 38 | */ |
39 | - public static function fromBigInt(\Math_BigInteger $big_int){ |
|
39 | + public static function fromBigInt(\Math_BigInteger $big_int) { |
|
40 | 40 | $b64 = new Base64UrlRepresentation(); |
41 | 41 | $input = $big_int->toBytes(); |
42 | 42 | return new Base64urlUInt($b64->encode($input)); |
@@ -1,16 +1,16 @@ |
||
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 jwk; |
16 | 16 |
@@ -1,16 +1,16 @@ |
||
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 jwk; |
16 | 16 |
@@ -1,16 +1,16 @@ |
||
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 jwk; |
16 | 16 |
@@ -1,16 +1,16 @@ |
||
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 jwk; |
16 | 16 |
@@ -31,7 +31,7 @@ discard block |
||
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 |
||
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 |
||
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 |
||
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 |
@@ -64,7 +64,9 @@ |
||
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 |
@@ -1,16 +1,16 @@ |
||
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 jwk; |
16 | 16 |