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

_ContentEncryptionKey::getStrippedEncoded()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php namespace jwe\impl;
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
 **/
14
use security\Key;
15
use utils\ByteUtil;
16
/**
17
 * Class _ContentEncryptionKey
18
 * @package jwe\impl
19
 * @internal
20
 */
21
final class _ContentEncryptionKey implements Key {
22
23
    /**
24
     * @var string
25
     */
26
    private $alg;
27
28
    /**
29
     * @var string
30
     */
31
    private $value;
32
33
    /**
34
     * @var string
35
     */
36
    private $format;
37
38
    /**
39
     * @param string $alg
40
     * @param string $format
41
     * @param string $value
42
     */
43
    public function __construct($alg, $format, $value){
44
        $this->alg    = $alg;
45
        $this->format = $format;
46
        $this->value  = $value;
47
    }
48
49
    /**
50
     * @return string
51
     */
52
    public function getAlgorithm()
53
    {
54
        return $this->alg;
55
    }
56
57
    /**
58
     * @return string
59
     */
60
    public function getEncoded()
61
    {
62
        return $this->value;
63
    }
64
65
    /**
66
     * @return string
67
     */
68
    public function getFormat()
69
    {
70
       return $this->format;
71
    }
72
73
    /**
74
     * @return int
75
     */
76
    public function getBitLength()
77
    {
78
       return ByteUtil::bitLength(strlen($this->value));
79
    }
80
81
    /**
82
     * @return string
83
     */
84
    public function getStrippedEncoded(): string
85
    {
86
       return $this->getEncoded();
87
    }
88
}