-
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #478 from ergebnis/feature/enum
Enhancement: Add support for `enum`
- Loading branch information
Showing
18 changed files
with
410 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,6 +15,7 @@ | |
"string", | ||
"true", | ||
"void", | ||
"T_ENUM", | ||
"T_NAME_QUALIFIED" | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 22 additions & 0 deletions
22
test/Fixture/Classy/Php81/WithMethodsNamedAfterKeywords/source.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<?php | ||
|
||
namespace Ergebnis\Classy\Test\Fixture\Classy\Php81\WithMethodsNamedAfterKeywords; | ||
|
||
class Foo | ||
{ | ||
public function class() | ||
{ | ||
} | ||
|
||
public function enum() | ||
{ | ||
} | ||
|
||
public function interface() | ||
{ | ||
} | ||
|
||
public function trait() | ||
{ | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
test/Fixture/Classy/Php81/WithMethodsNamedAfterKeywordsAndReturnType/source.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace Ergebnis\Classy\Test\Fixture\Classy\Php81\WithMethodsNamedAfterKeywordsAndReturnType; | ||
|
||
|
||
class Foo | ||
{ | ||
public function class(): string | ||
{ | ||
} | ||
|
||
public function enum(): string | ||
{ | ||
} | ||
|
||
public function interface(): string | ||
{ | ||
} | ||
|
||
public function trait(): string | ||
{ | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
test/Fixture/Classy/Php81/WithinMultipleNamespaces/source.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
<?php | ||
|
||
namespace Ergebnis\Classy\Test\Fixture\Classy\Php81\WithinMultipleNamespaces\Foo; | ||
{ | ||
class Foo {} | ||
|
||
interface Bar {} | ||
|
||
trait Baz {} | ||
|
||
enum Qux {} | ||
} | ||
|
||
namespace Ergebnis\Classy\Test\Fixture\Classy\Php81\WithinMultipleNamespaces\Bar; | ||
{ | ||
class Foo {} | ||
|
||
interface Bar {} | ||
|
||
trait Baz {} | ||
|
||
enum Qux {} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace Ergebnis\Classy\Test\Fixture\Classy\Php81\WithinNamespace; | ||
|
||
class Foo {} | ||
|
||
interface Bar {} | ||
|
||
trait Baz {} | ||
|
||
enum Qux {} |
11 changes: 11 additions & 0 deletions
11
test/Fixture/Classy/Php81/WithinNamespaceAndMultiLineComments/source.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace Ergebnis\Classy\Test\Fixture\Classy\Php81\WithinNamespaceAndMultiLineComments; | ||
|
||
/* foo */ class /* bar */ Foo /* baz */ {} | ||
|
||
/* foo */ interface /* bar */ Bar /* baz */ {} | ||
|
||
/* foo */ trait /* bar */ Baz /* baz */ {} | ||
|
||
/* foo */ enum /* bar */ Qux /* baz */ {} |
19 changes: 19 additions & 0 deletions
19
test/Fixture/Classy/Php81/WithinNamespaceAndShellStyleComments/source.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
<?php | ||
|
||
namespace Ergebnis\Classy\Test\Fixture\Classy\Php81\WithinNamespaceAndShellStyleComments; | ||
|
||
class # foo | ||
Foo # bar | ||
{} | ||
|
||
interface # foo | ||
Bar # bar | ||
{} | ||
|
||
trait # foo | ||
Baz // bar | ||
{} | ||
|
||
enum # foo | ||
Baz // bar | ||
{} |
15 changes: 15 additions & 0 deletions
15
test/Fixture/Classy/Php81/WithinNamespaceAndSingleLineComments/source.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<?php | ||
|
||
namespace Ergebnis\Classy\Test\Fixture\Classy\Php81\WithinNamespaceAndSingleLineComments; | ||
|
||
class // foo | ||
Foo // bar | ||
{} | ||
|
||
interface // foo | ||
Bar // bar | ||
{} | ||
|
||
trait // foo | ||
Baz // bar | ||
{} |
12 changes: 12 additions & 0 deletions
12
test/Fixture/Classy/Php81/WithinNamespaceWithBraces/source.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
|
||
namespace Ergebnis\Classy\Test\Fixture\Classy\Php81\WithinNamespaceWithBraces | ||
{ | ||
class Foo {} | ||
|
||
interface Bar {} | ||
|
||
trait Baz {} | ||
|
||
enum Qux {} | ||
} |
11 changes: 11 additions & 0 deletions
11
test/Fixture/Classy/Php81/WithinNamespaceWithSingleSegment/source.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
<?php | ||
|
||
namespace Ergebnis; | ||
|
||
class Foo {} | ||
|
||
interface Bar {} | ||
|
||
trait Baz {} | ||
|
||
enum Qux {} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
<?php | ||
|
||
class Foo {} | ||
|
||
interface Bar {} | ||
|
||
trait Baz {} | ||
|
||
enum Qux {} |
Oops, something went wrong.