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

ExtractorResultInput::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
rs 10
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