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

Stub   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 37
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 37
ccs 7
cts 7
cp 1
rs 10
c 0
b 0
f 0
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A __invoke() 0 3 1
A getName() 0 3 1
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
}