Passed
Push — master ( 823aee...b9b37f )
by Alec
13:15 queued 12s
created

Custom   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 13
Duplicated Lines 0 %

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A pattern() 0 3 1
A __construct() 0 6 1
1
<?php
2
3
declare(strict_types=1);
4
// 09.03.23
5
6
namespace AlecRabbit\Spinner\Core\Pattern\Char;
7
8
use AlecRabbit\Spinner\Core\Pattern\A\AReversiblePattern;
9
use Traversable;
10
11
/** @psalm-suppress UnusedClass */
12
final class Custom extends AReversiblePattern
13
{
14
    public function __construct(
15
        protected iterable $pattern,
16
        ?int $interval = null,
17
        bool $reversed = false
18
    ) {
19
        parent::__construct($interval, $reversed);
20
    }
21
22
    protected function pattern(): Traversable
23
    {
24
        yield from $this->pattern;
25
    }
26
}
27