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

JWS::withSignature()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 7
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 7
rs 9.4286
cc 1
eloc 4
nc 1
nop 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