Skip to content

Commit 697ee12

Browse files
committed
Return "self" in "@method" return type
1 parent dc364be commit 697ee12

File tree

4 files changed

+11
-11
lines changed

4 files changed

+11
-11
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ For IDE and static code analyzers I recommend adding the following docblock:
7575

7676
```php
7777
/**
78-
* @method static ENUMNAME CASENAME()
78+
* @method static self CASENAME()
7979
*/
8080
```
8181

examples/doctrine/src/UserStatus-emulated.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
use Mabe\Enum\Cl\EmulatedStringEnum;
66

77
/**
8-
* @method static UserStatus ACTIVE()
9-
* @method static UserStatus BANNED()
10-
* @method static UserStatus DELETED()
8+
* @method static self ACTIVE()
9+
* @method static self BANNED()
10+
* @method static self DELETED()
1111
*/
1212
final class UserStatus extends EmulatedStringEnum
1313
{

examples/doctrine/src/UserStatus-native.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55
use Mabe\Enum\Cl\EnumBc;
66

77
/**
8-
* @method static UserStatus ACTIVE()
9-
* @method static UserStatus BANNED()
10-
* @method static UserStatus DELETED()
8+
* @method static self ACTIVE()
9+
* @method static self BANNED()
10+
* @method static self DELETED()
1111
*/
1212
enum UserStatus:string
1313
{

tests/AmbiguousBackingValuesEnumEmulated.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<?php declare(strict_types=1);
22

33
/**
4-
* @method static AmbiguousStringValuesEnumEmulated TEST1()
5-
* @method static AmbiguousStringValuesEnumEmulated TEST2()
4+
* @method static self TEST1()
5+
* @method static self TEST2()
66
*/
77
final class AmbiguousStringValuesEnumEmulated extends Mabe\Enum\Cl\EmulatedStringEnum
88
{
@@ -11,8 +11,8 @@ final class AmbiguousStringValuesEnumEmulated extends Mabe\Enum\Cl\EmulatedStrin
1111
}
1212

1313
/**
14-
* @method static AmbiguousIntValuesEnumEmulated TEST1()
15-
* @method static AmbiguousIntValuesEnumEmulated TEST2()
14+
* @method static self TEST1()
15+
* @method static self TEST2()
1616
*/
1717
final class AmbiguousIntValuesEnumEmulated extends Mabe\Enum\Cl\EmulatedIntEnum
1818
{

0 commit comments

Comments
 (0)