| Total Complexity | 7 |
| Total Lines | 40 |
| Duplicated Lines | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 9 | class VariableInfo_Renderer_String_Callable extends VariableInfo_Renderer_String |
||
| 10 | { |
||
| 11 | protected function _render() |
||
| 12 | { |
||
| 13 | $string = ''; |
||
| 14 | |||
| 15 | // Simple function call |
||
| 16 | if(is_string($this->value)) |
||
| 17 | { |
||
| 18 | return $this->value.'()'; |
||
| 19 | } |
||
| 20 | |||
| 21 | if(is_array($this->value)) { |
||
| 22 | return $this->renderArray(); |
||
| 23 | } |
||
| 24 | |||
| 25 | if($this->value instanceof NamedClosure) { |
||
| 26 | return 'Closure:'.$this->value->getOrigin(); |
||
| 27 | } |
||
| 28 | |||
| 29 | if($this->value instanceof Closure) { |
||
| 30 | return 'Closure'; |
||
| 31 | } |
||
| 32 | |||
| 33 | return $string; |
||
| 34 | } |
||
| 35 | |||
| 36 | private function renderArray() : string |
||
| 49 | } |
||
| 50 | } |
||
| 51 |