| Conditions | 3 |
| Paths | 3 |
| Total Lines | 9 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 10 | public function format($value, $rules) { |
||
| 11 | if (!isset($rules['format'])) return $value; |
||
| 12 | $format = new \Transphporm\StringExtractor($rules['format']); |
||
| 13 | $options = explode(' ', $format); |
||
| 14 | $functionName = array_shift($options); |
||
| 15 | foreach ($options as &$f) $f = trim($format->rebuild($f), '"'); |
||
| 16 | |||
| 17 | return $this->processFormat($options, $functionName, $value); |
||
| 18 | } |
||
| 19 | |||
| 30 | } |