Completed
Push — master ( 517e4f...f67525 )
by Florent
02:24
created

JWS   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 26
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 3
Bugs 2 Features 0
Metric Value
wmc 2
c 3
b 2
f 0
lcom 1
cbo 1
dl 0
loc 26
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getSignature() 0 4 1
A withSignature() 0 7 1
1
<?php
2
3
/*
4
 * The MIT License (MIT)
5
 *
6
 * Copyright (c) 2014-2015 Spomky-Labs
7
 *
8
 * This software may be modified and distributed under the terms
9
 * of the MIT license.  See the LICENSE file for details.
10
 */
11
12
namespace Jose;
13
14
/**
15
 * Class JWS.
16
 */
17
class JWS extends JWT implements JWSInterface
18
{
19
    /**
20
     * @var string|null
21
     */
22
    protected $signature = null;
23
24
    /**
25
     * {@inheritdoc}
26
     */
27
    public function getSignature()
28
    {
29
        return $this->signature;
30
    }
31
32
    /**
33
     * {@inheritdoc}
34
     */
35
    public function withSignature($signature)
36
    {
37
        $jws = clone $this;
38
        $jws->signature = $signature;
39
40
        return $jws;
41
    }
42
}
43