Passed
Push — master ( f38dcf...954e17 )
by Jean Paul
01:37
created

ExtractorResultInput   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 17
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 17
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A setInput() 0 3 1
A getInput() 0 3 1
1
<?php
2
3
namespace Coco\SourceWatcher\Core\IO\Inputs;
4
5
use Coco\SourceWatcher\Core\Extractor;
6
7
/**
8
 * Class ExtractorResultInput
9
 *
10
 * @package Coco\SourceWatcher\Core\IO\Inputs
11
 */
12
class ExtractorResultInput extends Input
13
{
14
    private ?Extractor $previousExtractor;
15
16
    public function __construct ( Extractor $previousExtractor = null )
17
    {
18
        $this->previousExtractor = $previousExtractor;
19
    }
20
21
    public function getInput () : Extractor
22
    {
23
        return $this->previousExtractor;
0 ignored issues
show
Bug Best Practice introduced by
The expression return $this->previousExtractor could return the type null which is incompatible with the type-hinted return Coco\SourceWatcher\Core\Extractor. Consider adding an additional type-check to rule them out.
Loading history...
24
    }
25
26
    public function setInput ( $input ) : void
27
    {
28
        $this->previousExtractor = $input;
29
    }
30
}
31