Passed
Push — master ( e65d14...ed7f33 )
by Arnold
01:53
created

Stub::__construct()   A

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 0
Metric Value
cc 1
eloc 1
nc 1
nop 1
dl 0
loc 3
ccs 2
cts 2
cp 1
crap 1
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Improved\IteratorPipeline\PipelineBuilder;
6
7
class Stub
8
{
9
    /**
10
     * @var string
11
     */
12
    protected $name;
13
14
    /**
15
     * Class constructor.
16
     *
17
     * @param string $name
18
     */
19 2
    public function __construct(string $name)
20
    {
21 2
        $this->name = $name;
22 2
    }
23
24
    /**
25
     * Get the name of the stub.
26
     *
27
     * @return string
28
     */
29 2
    public function getName()
30
    {
31 2
        return $this->name;
32
    }
33
34
35
    /**
36
     * Invoke stub
37
     *
38
     * @param iterable $iterable
39
     * @return iterable
40
     */
41 1
    public function __invoke(iterable $iterable)
42
    {
43 1
        return $iterable;
44
    }
45
}