Conditions | 4 |
Paths | 6 |
Total Lines | 14 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 0 |
1 | <?php |
||
21 | public function includeBody(Document $document) |
||
22 | { |
||
23 | $type = config('webfactor.documents.body_type'); |
||
24 | $options = config('webfactor.documents.transform_options.'.$type, []); |
||
25 | $options = is_array($options)? $options : [$options]; |
||
26 | |||
27 | $body = $document->body; |
||
28 | |||
29 | foreach ($options as $option) { |
||
30 | $body = method_exists($this, $option) ? $this->{$option}($body) : $body; |
||
31 | } |
||
32 | |||
33 | return $this->primitive($body); |
||
34 | } |
||
35 | |||
42 |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@return
annotation as described here.