Conditions | 2 |
Paths | 2 |
Total Lines | 12 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Tests | 8 |
CRAP Score | 2 |
Changes | 0 |
1 | <?php |
||
19 | 1 | public function encode(array $data) |
|
20 | { |
||
21 | 1 | $body = isset($data[$this->contentFieldName]) ? $data[$this->contentFieldName] : ''; |
|
22 | 1 | unset($data[$this->contentFieldName]); |
|
23 | |||
24 | 1 | $str = "---\n"; |
|
25 | 1 | $str.= parent::encode($data); |
|
26 | 1 | $str.= "---\n"; |
|
27 | 1 | $str.= $body; |
|
28 | |||
29 | 1 | return $str; |
|
30 | } |
||
31 | |||
42 |