StepSequence::__construct()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
nc 1
nop 3
crap 1
1
<?php
2
3
namespace Smoren\Sequence\Structs;
4
5
/**
6
 * Implementation of sequence with constant step.
7
 *
8
 * @template T
9
 * @extends Sequence<T>
10
 */
11
abstract class StepSequence extends Sequence
12
{
13
    /**
14
     * @var T step of the sequence
0 ignored issues
show
Bug introduced by
The type Smoren\Sequence\Structs\T was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
15
     */
16
    protected $step;
17
18
    /**
19
     * StepSequence constructor.
20
     *
21
     * @param T $start start of the sequence
22
     * @param int<0, max>|null $size size of the sequence (infinite if null)
23
     * @param T $step sequence step
24
     */
25 100
    public function __construct($start, ?int $size, $step)
26
    {
27 100
        parent::__construct($start, $size);
28 100
        $this->step = $step;
29
    }
30
}
31