Conditions | 3 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
20 | 3 | public static function fromClassNameAndIdentifier($className, array $id) |
|
21 | { |
||
22 | 3 | $ids = []; |
|
23 | |||
24 | 3 | foreach ($id as $key => $value) { |
|
25 | 3 | $ids[] = $key . '(' . $value . ')'; |
|
26 | } |
||
27 | |||
28 | 3 | return new self( |
|
29 | 3 | 'Entity of type \'' . $className . '\'' . ($ids ? ' for IDs ' . implode(', ', $ids) : '') . ' was not found' |
|
|
|||
30 | ); |
||
33 |