StepSequence   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 4
c 1
b 0
f 0
dl 0
loc 18
ccs 3
cts 3
cp 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 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