| Conditions | 4 |
| Paths | 4 |
| Total Lines | 19 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 31 | public function extract () : array |
||
| 32 | { |
||
| 33 | if ( $this->databaseConnector == null ) { |
||
| 34 | throw new SourceWatcherException( "Database connector missing" ); |
||
| 35 | } |
||
| 36 | |||
| 37 | if ( $this->query == null ) { |
||
|
|
|||
| 38 | throw new SourceWatcherException( "Query missing" ); |
||
| 39 | } |
||
| 40 | |||
| 41 | $result = []; |
||
| 42 | |||
| 43 | $arrayResults = $this->databaseConnector->executePlainQuery( $this->query ); |
||
| 44 | |||
| 45 | foreach ( $arrayResults as $currentRecord ) { |
||
| 46 | array_push( $result, new Row( $currentRecord ) ); |
||
| 47 | } |
||
| 48 | |||
| 49 | return $result; |
||
| 50 | } |
||
| 52 |