EndResult   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 35
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 35
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A getResult() 0 3 1
A getType() 0 3 1
A __construct() 0 3 1
1
<?php declare(strict_types=1);
2
/**
3
 * portable-game-notation (https://github.com/chesszebra/portable-game-notation)
4
 *
5
 * @link https://github.com/chesszebra/portable-game-notation for the canonical source repository
6
 * @copyright Copyright (c) 2017 Chess Zebra (https://chesszebra.com)
7
 * @license https://github.com/chesszebra/portable-game-notation/blob/master/LICENSE.md MIT
8
 */
9
10
namespace ChessZebra\PortableGameNotation\Token;
11
12
final class EndResult implements TokenInterface
13
{
14
    /**
15
     * @var string
16
     */
17
    private $result;
18
19
    /**
20
     * Initializes a new instance of this class.
21
     *
22
     * @param string $result
23
     */
24
    public function __construct(string $result)
25
    {
26
        $this->result = $result;
27
    }
28
29
    /**
30
     * Gets the end result that is represented.
31
     *
32
     * @return string
33
     */
34
    public function getResult(): string
35
    {
36
        return $this->result;
37
    }
38
39
    /**
40
     * Gets the type of this token.
41
     *
42
     * @return int
43
     */
44
    public function getType(): int
45
    {
46
        return TokenInterface::END_RESULT;
47
    }
48
}
49