Stream   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 2
c 1
b 0
f 1
dl 0
loc 11
rs 10
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
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\Reader;
11
12
use ChessZebra\PortableGameNotation\Lexer\StreamLexer;
13
use InvalidArgumentException;
14
15
final class Stream extends AbstractReader
16
{
17
    /**
18
     * Initializes a new instance of this class.
19
     *
20
     * @param resource $stream The stream to read from.
21
     * @throws InvalidArgumentException Thrown when the stream is not valid.
22
     */
23
    public function __construct($stream)
24
    {
25
        parent::__construct(new StreamLexer($stream));
26
    }
27
}
28