Conditions | 4 |
Paths | 4 |
Total Lines | 17 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
35 | public function init() |
||
36 | { |
||
37 | $data = ParamsExpander::expand($this, ['class']); |
||
38 | $class = ''; |
||
39 | if (isset($data['class'])) |
||
40 | { |
||
41 | $class = $data['class']; |
||
42 | } |
||
43 | |||
44 | if (empty($class) || !ClassChecker::exists($class)) |
||
45 | { |
||
46 | $msg = ExceptionFormatter::formatForAnnotation($this, $class); |
||
47 | throw new UnexpectedValueException($msg); |
||
48 | } |
||
49 | NameNormalizer::normalize($class); |
||
50 | $this->getEntity()->slotFor[] = $class; |
||
51 | } |
||
52 | |||
54 |