| Total Complexity | 2 |
| Total Lines | 29 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php declare(strict_types=1); |
||
| 12 | final class Stream extends AbstractWriter |
||
| 13 | { |
||
| 14 | /** |
||
| 15 | * @var resource |
||
| 16 | */ |
||
| 17 | private $resource; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Initializes a new instance of this class. |
||
| 21 | * |
||
| 22 | * @param resource $resource The resource to write to. |
||
| 23 | * @param bool $showMoveNumberTwice Whether or not to repeat the move number. |
||
| 24 | */ |
||
| 25 | public function __construct($resource, bool $showMoveNumberTwice = false) |
||
| 26 | { |
||
| 27 | $this->resource = $resource; |
||
| 28 | |||
| 29 | parent::__construct($showMoveNumberTwice); |
||
| 30 | } |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Writes a single game. |
||
| 34 | * |
||
| 35 | * @param string $pgn The PGN data of a single game. |
||
| 36 | * @return void |
||
| 37 | */ |
||
| 38 | protected function writeGame(string $pgn): void |
||
| 41 | } |
||
| 42 | } |
||
| 43 |