| Conditions | 4 |
| Paths | 4 |
| Total Lines | 18 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 22 | public function getFunctions() |
||
| 23 | { |
||
| 24 | $functions = []; |
||
| 25 | $class = new \ReflectionClass(get_class($this)); |
||
| 26 | |||
| 27 | if (self::class === $class->name) { |
||
| 28 | return $functions; |
||
| 29 | } |
||
| 30 | |||
| 31 | foreach ($class->getMethods(\ReflectionMethod::IS_PUBLIC) as $method) { |
||
| 32 | if (false === ($offset = strpos($method->getName(), self::TWIG_FUNCTION_SUFFIX))) { |
||
| 33 | continue; |
||
| 34 | } |
||
| 35 | |||
| 36 | $functions[] = $this->registerAsTwigFunction(substr($method->getName(), 0, $offset)); |
||
| 37 | } |
||
| 38 | |||
| 39 | return $functions; |
||
| 40 | } |
||
| 47 |