Conditions | 2 |
Paths | 2 |
Total Lines | 11 |
Lines | 0 |
Ratio | 0 % |
Tests | 6 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
20 | 158 | public function checkEmbed($data) |
|
21 | { |
||
22 | 158 | if ($data instanceof AnnotatedInterface) |
|
23 | { |
||
24 | $params = [ |
||
25 | 1 | get_class($data) |
|
26 | ]; |
||
27 | 1 | $message = vsprintf('To store embedded/ref/related model (%s) it must be marked with @Embedded/@Related/@DbRef (Array) annotation', $params); |
|
28 | 1 | throw new StructureException($message); |
|
29 | } |
||
30 | } |
||
31 | } |