| Total Complexity | 4 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 13 | class Variable implements HasType |
||
| 14 | { |
||
| 15 | use WithTypeDeclaration; |
||
| 16 | |||
| 17 | /** @var string */ |
||
| 18 | protected $name; |
||
| 19 | |||
| 20 | 144 | protected function __construct(string $name, TypeDeclaration $type) |
|
| 24 | 144 | } |
|
| 25 | |||
| 26 | 96 | public static function declaredWith(string $name, TypeDeclaration $type = null): Variable |
|
| 29 | } |
||
| 30 | |||
| 31 | 54 | public function __toString() |
|
| 40 |