Skip to content

Commit 39b8959

Browse files
committed
added support for PHP 8.0 types mixed, static, false, null
1 parent f0dcad5 commit 39b8959

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

src/PhpGenerator/PhpNamespace.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ final class PhpNamespace
2828

2929
private const KEYWORDS = [
3030
'string' => 1, 'int' => 1, 'float' => 1, 'bool' => 1, 'array' => 1, 'object' => 1,
31-
'callable' => 1, 'iterable' => 1, 'void' => 1, 'self' => 1, 'parent' => 1,
31+
'callable' => 1, 'iterable' => 1, 'void' => 1, 'self' => 1, 'parent' => 1, 'static' => 1,
32+
'mixed' => 1, 'null' => 1, 'false' => 1,
3233
];
3334

3435
/** @var string */

src/PhpGenerator/Type.php

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,12 @@ class Type
2525
CALLABLE = 'callable',
2626
ITERABLE = 'iterable',
2727
VOID = 'void',
28+
MIXED = 'mixed',
29+
FALSE = 'false',
2830
NULL = 'null',
2931
SELF = 'self',
30-
PARENT = 'parent';
32+
PARENT = 'parent',
33+
STATIC = 'static';
3134

3235

3336
public static function nullable(string $type, bool $state = true): string

0 commit comments

Comments
 (0)