Conditions | 5 |
Paths | 5 |
Total Lines | 12 |
Code Lines | 6 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 5.1158 |
Changes | 1 | ||
Bugs | 0 | Features | 1 |
1 | <?php |
||
39 | 3 | private function isCommandPropertyValid(JobEntityInterface $jobEntity) |
|
40 | { |
||
41 | 3 | if (!$jobEntity instanceof ChronosJobEntity) { |
|
42 | throw new \RuntimeException('Required ChronosJobEntity. Something else found.'); |
||
43 | } |
||
44 | |||
45 | 3 | if (is_null($jobEntity->container)) { |
|
46 | 3 | return (!empty($jobEntity->command) && is_string($jobEntity->command)); |
|
47 | } |
||
48 | |||
49 | 1 | return (empty($jobEntity->command) || is_string($jobEntity->command)); |
|
50 | } |
||
51 | } |
||
52 |