Passed
Pull Request — master (#1)
by
unknown
02:45
created

TokenTrait::setToken()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
dl 0
loc 3
rs 10
cc 1
nc 1
nop 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Nelexa\GPlay\Scraper;
5
6
trait TokenTrait
7
{
8
    /**
9
     * @var string|null
10
     */
11
    private $token;
12
13
    /**
14
     * @param string|null $token
15
     */
16
    protected function setToken(?string $token): void
17
    {
18
        $this->token = $token;
19
    }
20
21
    /**
22
     * @return string|null
23
     */
24
    public function getToken(): ?string
25
    {
26
        return $this->token;
27
    }
28
29
    /**
30
     * @return bool
31
     */
32
    public function hasNextToken(): bool
33
    {
34
        return $this->token !== null;
35
    }
36
}
37