jwtClaims   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 2
eloc 4
c 2
b 0
f 0
dl 0
loc 25
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A setSegment() 0 3 1
A getSegment() 0 3 1
1
<?php
2
/**
3
 * ==================================
4
 * Responsible PHP API
5
 * ==================================
6
 *
7
 * @link Git https://github.com/vince-scarpa/responsibleAPI.git
8
 *
9
 * @api Responible API
10
 * @package responsible\core\oauth
11
 *
12
 * @author Vince scarpa <[email protected]>
13
 *
14
 */
15
namespace responsible\core\auth;
16
17
class jwtClaims
18
{
19
    /**
20
     * [$segments Collection segments]
21
     * @var array
22
     */
23
    private $segments = array();
24
25
    /**
26
     * [setSegment]
27
     * @param string $encodedHeader [Header claims encoded]
28
     */
29
    public function setSegment($segment, $encodedHeader)
30
    {
31
        $this->segments[$segment] = $encodedHeader;
32
    }
33
34
    /**
35
     * [getSegment Return a given segment request]
36
     * @param  string $segment [header, payload, secret]
37
     * @return string
38
     */
39
    public function getSegment($segment)
40
    {
41
        return $this->segments[$segment];
42
    }
43
}
44