| Conditions | 6 |
| Paths | 10 |
| Total Lines | 14 |
| Code Lines | 7 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 10 | public function __toString() |
||
| 11 | { |
||
| 12 | $delimiter = $this->delimiter ?: ','; |
||
|
|
|||
| 13 | |||
| 14 | if ($delimiter != ',') { |
||
| 15 | var_dump($this->delimiter); exit(); |
||
| 16 | } |
||
| 17 | |||
| 18 | if ($this->start) { |
||
| 19 | return $this->start . implode($delimiter, $this->target->getArray()) . ($this->end ?: ')'); |
||
| 20 | } |
||
| 21 | |||
| 22 | return '(' . implode($delimiter, $this->target->getArray()) . ($this->end ? $this->end : ')'); |
||
| 23 | } |
||
| 24 | } |
||
| 25 |
Since your code implements the magic getter
_get, this function will be called for any read access on an undefined variable. You can add the@propertyannotation to your class or interface to document the existence of this variable.If the property has read access only, you can use the @property-read annotation instead.
Of course, you may also just have mistyped another name, in which case you should fix the error.
See also the PhpDoc documentation for @property.