Conditions | 3 |
Paths | 3 |
Total Lines | 16 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 3 |
Changes | 0 |
1 | <?php |
||
33 | 32 | public function decorate(&$body, SearchCriteria $criteria) |
|
34 | { |
||
35 | 32 | $decorators = (new PluginFactory())->instance($this->getManganel()->decorators, $criteria, [ |
|
36 | 32 | BodyDecoratorInterface::class |
|
37 | ]); |
||
38 | |||
39 | 32 | foreach ($decorators as $decorator) |
|
40 | { |
||
41 | /* @var $decorator BodyDecoratorInterface */ |
||
42 | 32 | if ($decorator instanceof ManganelAwareInterface) |
|
43 | { |
||
44 | 32 | $decorator->setManganel($this->manganel); |
|
45 | } |
||
46 | 32 | $decorator->decorate($body, $criteria); |
|
47 | } |
||
48 | 32 | } |
|
49 | |||
51 |