Conditions | 3 |
Paths | 3 |
Total Lines | 18 |
Code Lines | 9 |
Lines | 0 |
Ratio | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
20 | public function extract () |
||
21 | { |
||
22 | if ( $this->input == null ) { |
||
23 | throw new SourceWatcherException( "An input must be provided." ); |
||
24 | } |
||
25 | |||
26 | $inputIsValid = $this->input instanceof ExtractorResultInput; |
||
27 | |||
28 | if ( !$inputIsValid ) { |
||
29 | throw new SourceWatcherException( sprintf( "The input must be an instance of %s", |
||
30 | ExtractorResultInput::class ) ); |
||
31 | } |
||
32 | |||
33 | $previousExtractor = $this->input->getInput(); |
||
34 | |||
35 | $this->result = $previousExtractor->getResult(); |
||
36 | |||
37 | return $this->result; |
||
38 | } |
||
40 |