Completed
Pull Request — master (#14)
by Artem
06:19
created

AbstractJwtPayload   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 47
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
wmc 4
lcom 0
cbo 0
dl 0
loc 47
rs 10
c 0
b 0
f 0
1
<?php
2
/*
3
 * This file is part of the FreshCentrifugoBundle.
4
 *
5
 * (c) Artem Henvald <[email protected]>
6
 *
7
 * For the full copyright and license information, please view the LICENSE
8
 * file that was distributed with this source code.
9
 */
10
11
declare(strict_types=1);
12
13
namespace Fresh\CentrifugoBundle\Token;
14
15
/**
16
 * AbstractJwtPayload.
17
 *
18
 * @author Artem Henvald <[email protected]>
19
 */
20
abstract class AbstractJwtPayload implements JwtPayloadInterface
21
{
22
    private ?int $expirationTime;
0 ignored issues
show
Bug introduced by
This code did not parse for me. Apparently, there is an error somewhere around this line:

Syntax error, unexpected '?', expecting T_FUNCTION or T_CONST
Loading history...
23
    private array $info;
24
    private ?string $base64info; // phpcs:ignore
25
26
    /**
27
     * @param array       $info
28
     * @param int|null    $expirationTime
29
     * @param string|null $base64info
30
     */
31
    public function __construct(array $info = [], ?int $expirationTime = null, ?string $base64info = null)
32
    {
33
        $this->info = $info;
34
        $this->expirationTime = $expirationTime;
35
        $this->base64info = $base64info;
36
    }
37
38
    /**
39
     * @return int|null
40
     */
41
    public function getExpirationTime(): ?int
42
    {
43
        return $this->expirationTime;
44
    }
45
46
    /**
47
     * @return array
48
     */
49
    public function getInfo(): array
50
    {
51
        return $this->info;
52
    }
53
54
    /**
55
     * @return string|null
56
     */
57
    public function getBase64Info(): ?string
58
    {
59
        return $this->base64info;
60
    }
61
}
62