Passed
Push — master ( de3d61...be839c )
by Alec
13:42 queued 13s
created

NoCharPattern::getEntries()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
c 0
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
6
namespace AlecRabbit\Spinner\Core\Pattern;
7
8
use AlecRabbit\Spinner\Core\CharFrame;
9
use AlecRabbit\Spinner\Core\Pattern\A\AOneFramePattern;
10
use AlecRabbit\Spinner\Core\Pattern\Contract\ICharPattern;
11
use Traversable;
12
13
/** @psalm-suppress UnusedClass */
14
final class NoCharPattern extends AOneFramePattern implements ICharPattern
15
{
16
    public function __construct()
17
    {
18
        parent::__construct(
19
            frame: new CharFrame('', 0)
20
        );
21
    }
22
23
24
    public function getEntries(): Traversable
25
    {
26
        yield from [
27
            $this->frame,
28
        ];
29
    }
30
}
31