| Conditions | 3 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 8 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | public function encode($data, $format, array $context = array()) |
||
| 29 | { |
||
| 30 | $cells = ''; |
||
| 31 | foreach ($data as $value) { |
||
| 32 | $cells .= strtr( |
||
| 33 | static::CELL_TEMPLATE, |
||
| 34 | [ |
||
| 35 | '{{type}}' => is_numeric($value) ? 'Number' : 'String', |
||
| 36 | '{{data}}' => $value |
||
| 37 | ] |
||
| 38 | ); |
||
| 39 | } |
||
| 40 | |||
| 41 | return strtr(static::ROW_TEMPLATE, [ '{{cells}}' => $cells ]); |
||
| 42 | } |
||
| 43 | |||
| 52 |