StandardAlgebraicNotation   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 30
Duplicated Lines 0 %

Importance

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

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A getStandardAlgebraicNotation() 0 3 1
A getType() 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
use ChessZebra\StandardAlgebraicNotation\Notation;
13
14
final class StandardAlgebraicNotation implements TokenInterface
15
{
16
    /**
17
     * @var Notation
18
     */
19
    private $standardAlgebraicNotation;
20
21
    /**
22
     * Initializes a new instance of this class.
23
     *
24
     * @param Notation $standardAlgebraicNotation
25
     */
26
    public function __construct(Notation $standardAlgebraicNotation)
27
    {
28
        $this->standardAlgebraicNotation = $standardAlgebraicNotation;
29
    }
30
31
    /**
32
     * Gets the value of field "standardAlgebraicNotation".
33
     *
34
     * @return Notation
35
     */
36
    public function getStandardAlgebraicNotation(): Notation
37
    {
38
        return $this->standardAlgebraicNotation;
39
    }
40
41
    public function getType(): int
42
    {
43
        return TokenInterface::STANDARD_ALGEBRAIC_NOTATION;
44
    }
45
}
46