| Conditions | 4 |
| Paths | 3 |
| Total Lines | 19 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 9 |
| CRAP Score | 4.016 |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | 27 | public function __construct(array $aJobEntities) |
|
| 29 | { |
||
| 30 | 27 | $_aJobs = []; |
|
| 31 | |||
| 32 | 27 | if (count($aJobEntities) > 0) |
|
| 33 | { |
||
| 34 | 24 | $_mCheck = current($aJobEntities); |
|
| 35 | 24 | if (!$_mCheck instanceof JobEntityInterface) |
|
| 36 | { |
||
| 37 | throw new \InvalidArgumentException('array has to contain JobEntity objects'); |
||
| 38 | } |
||
| 39 | |||
| 40 | 24 | foreach ($aJobEntities as $_oJobEntity) |
|
| 41 | { |
||
| 42 | 24 | $_aJobs[$_oJobEntity->getKey()] = $_oJobEntity; |
|
| 43 | } |
||
| 44 | } |
||
| 45 | 27 | parent::__construct($_aJobs); |
|
| 46 | } |
||
| 47 | } |