| Conditions | 5 |
| Paths | 4 |
| Total Lines | 19 |
| Code Lines | 12 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 10 |
| CRAP Score | 5.0187 |
| Changes | 0 | ||
| 1 | <?php |
||
| 20 | 1 | public static function buildCandidateRow(Candidate $candidate, $skipAlreadyDeployed) |
|
| 21 | { |
||
| 22 | 1 | $status = $candidate->getStatus(); |
|
| 23 | |||
| 24 | 1 | if ($skipAlreadyDeployed && $status === Candidate::STATUS_ALREADY_DEPLOYED) { |
|
| 25 | return null; |
||
| 26 | } |
||
| 27 | |||
| 28 | switch ($status) { |
||
| 29 | 1 | case Candidate::STATUS_QUEUED: |
|
| 30 | 1 | $status = sprintf('<comment>%s</comment>', $status); |
|
| 31 | 1 | break; |
|
| 32 | 1 | case Candidate::STATUS_HAS_SYNTAX_ERROR: |
|
| 33 | 1 | $status = sprintf('<error>%s</error>', $status); |
|
| 34 | 1 | break; |
|
| 35 | } |
||
| 36 | |||
| 37 | 1 | return [$candidate->getName(), $status]; |
|
| 38 | } |
||
| 39 | |||
| 55 |