| Conditions | 1 |
| Paths | 1 |
| Total Lines | 18 |
| Code Lines | 11 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 31 | public function execute(Candidate $candidate) |
||
| 32 | { |
||
| 33 | $input = new InputStream(); |
||
| 34 | $input->write($candidate->getContent()); |
||
| 35 | |||
| 36 | $process = new Process($this->getCommandString()); |
||
| 37 | $process->setInput($input); |
||
| 38 | $process->start(); |
||
| 39 | |||
| 40 | $input->close(); |
||
| 41 | $process->wait(); |
||
| 42 | |||
| 43 | // remove extra header |
||
| 44 | $parsingResult = explode("\n", $process->getOutput()); |
||
| 45 | array_shift($parsingResult); |
||
| 46 | |||
| 47 | return implode("\n", $parsingResult); |
||
| 48 | } |
||
| 49 | |||
| 59 | } |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: