Conditions | 4 |
Paths | 6 |
Total Lines | 13 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 20 |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php |
||
21 | public function includeBody(Document $document) { |
||
22 | $type = config('webfactor.documents.body_type'); |
||
23 | $options = config('webfactor.documents.transform_options.'.$type, []); |
||
24 | $options = is_array($options)? $options : [$options]; |
||
25 | |||
26 | $body = $document->body; |
||
27 | |||
28 | foreach($options as $option) { |
||
29 | $body = method_exists($this, $option) ? $this->{$option}($body) : $body; |
||
30 | } |
||
31 | |||
32 | return $this->primitive($body); |
||
33 | } |
||
34 | |||
40 |
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.