| 1 | <?php |
||
| 17 | final class SourceLocation |
||
| 18 | { |
||
| 19 | /** |
||
| 20 | * Translation key. |
||
| 21 | */ |
||
| 22 | private $message; |
||
| 23 | private $path; |
||
| 24 | private $line; |
||
| 25 | private $context; |
||
| 26 | |||
| 27 | 35 | public function __construct(string $message, string $path, int $line, array $context = []) |
|
| 34 | |||
| 35 | /** |
||
| 36 | * Create a source location from your current location. |
||
| 37 | */ |
||
| 38 | 4 | public static function createHere(string $message, array $context = []): self |
|
| 49 | |||
| 50 | 34 | public function getMessage(): string |
|
| 54 | |||
| 55 | 3 | public function getPath(): string |
|
| 59 | |||
| 60 | 6 | public function getLine(): int |
|
| 64 | |||
| 65 | 10 | public function getContext(): array |
|
| 69 | } |
||
| 70 |
It seems like you are relying on a variable being defined by an iteration: