Stub::getName()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 2
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Improved\IteratorPipeline\PipelineBuilder;
6
7
/**
8
 * A stub for a step in the pipeline builder.
9
 * @internal
10
 */
11
class Stub
12
{
13
    /**
14
     * @var string
15
     */
16
    protected $name;
17
18
    /**
19
     * Class constructor.
20
     *
21
     * @param string $name
22
     */
23 2
    public function __construct(string $name)
24
    {
25 2
        $this->name = $name;
26 2
    }
27
28
    /**
29
     * Get the name of the stub.
30
     *
31
     * @return string
32
     */
33 2
    public function getName()
34
    {
35 2
        return $this->name;
36
    }
37
38
39
    /**
40
     * Invoke stub
41
     *
42
     * @param iterable $iterable
43
     * @return iterable
44
     */
45 1
    public function __invoke(iterable $iterable)
0 ignored issues
show
introduced by
Method Improved\IteratorPipeline\PipelineBuilder\Stub::__invoke() has parameter $iterable with no value type specified in iterable type iterable.
Loading history...
introduced by
Method Improved\IteratorPipeline\PipelineBuilder\Stub::__invoke() return type has no value type specified in iterable type iterable.
Loading history...
46
    {
47 1
        return $iterable;
48
    }
49
}
50