| Conditions | 3 |
| Paths | 3 |
| Total Lines | 12 |
| Code Lines | 4 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 33 | public function offsetGet($offset) { |
||
| 34 | |||
| 35 | // Get name of the method, the class should have. Like "getText" |
||
| 36 | $method = Text::camelCase("get $offset"); |
||
| 37 | |||
| 38 | // If it exists, call it and return its return value |
||
| 39 | if (method_exists($this, $method)) return $this->{$method}(); |
||
| 40 | |||
| 41 | // If not return the data from the array after checking it is set |
||
| 42 | return isset($this->container[$offset]) ? $this->container[$offset] : null; |
||
| 43 | |||
| 44 | } |
||
| 45 | |||
| 47 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.