| Conditions | 1 |
| Paths | 1 |
| Total Lines | 25 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 16 |
| CRAP Score | 1 |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 44 | 4 | public function getFunctions() |
|
| 45 | { |
||
| 46 | return [ |
||
| 47 | 4 | new \Twig_SimpleFunction( |
|
| 48 | 4 | 'translate', |
|
| 49 | function ($message, $domain = null, $locale = null) { |
||
| 50 | 2 | return $this->translate($message, $domain, $locale); |
|
| 51 | } |
||
| 52 | 4 | ), |
|
| 53 | 4 | new \Twig_SimpleFunction( |
|
| 54 | 4 | 'transPlural', |
|
| 55 | 2 | function( |
|
| 56 | $singular, $plural, $number, $domain = null, $locale = null |
||
| 57 | ) { |
||
| 58 | 2 | return $this->translatePlural( |
|
| 59 | 2 | $singular, |
|
| 60 | 2 | $plural, |
|
| 61 | 2 | $number, |
|
| 62 | 2 | $domain, |
|
| 63 | $locale |
||
| 64 | 2 | ); |
|
| 65 | } |
||
| 66 | 4 | ) |
|
| 67 | 4 | ]; |
|
| 68 | } |
||
| 69 | } |
||
| 70 |