Conditions | 3 |
Paths | 3 |
Total Lines | 12 |
Lines | 0 |
Ratio | 0 % |
Tests | 5 |
CRAP Score | 3.2098 |
Changes | 0 |
1 | <?php |
||
48 | 1 | public function init() |
|
49 | { |
||
50 | 1 | if (empty($this->value)) |
|
51 | { |
||
52 | throw new UnexpectedValueException(sprintf('@SearchType annotation requires type name as param, used on model `%s`', $this->getMeta()->type()->name)); |
||
53 | } |
||
54 | 1 | if (!ClassChecker::exists($this->value)) |
|
55 | { |
||
56 | throw new UnexpectedValueException(sprintf('Could not resolve class name for @SearchType annotation used on model `%s`', $this->getMeta()->type()->name)); |
||
57 | } |
||
58 | 1 | $this->getEntity()->type = $this->value; |
|
59 | 1 | } |
|
60 | |||
62 |