| Conditions | 5 |
| Paths | 4 |
| Total Lines | 12 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 47 | public function handle() |
||
| 48 | { |
||
| 49 | if (substr($this->candidate->path_to_cv, -4) == '.pdf') { |
||
| 50 | $outputFile = str_replace('.pdf', '_avatar.jpg', $this->candidate->path_to_cv); |
||
| 51 | |||
| 52 | if ($this->override || Storage::disk('s3')->missing($outputFile)) { |
||
| 53 | if (ResumeParser::extractPhoto($this->candidate->path_to_cv, $outputFile)) { |
||
| 54 | $this->candidate->photo_path = $outputFile; |
||
| 55 | } |
||
| 56 | |||
| 57 | $this->candidate->photo_extraction = new \DateTime(); |
||
| 58 | $this->candidate->save(); |
||
| 59 | } |
||
| 63 |