-
Notifications
You must be signed in to change notification settings - Fork 657
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
98d3514
commit ad5bf62
Showing
7 changed files
with
245 additions
and
72 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
15 changes: 15 additions & 0 deletions
15
src/Psalm/Internal/Scanner/UnresolvedConstant/EnumNameFetch.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 Psalm\Internal\Scanner\UnresolvedConstant; | ||
|
||
/** | ||
* @psalm-immutable | ||
* @internal | ||
*/ | ||
class EnumNameFetch extends EnumPropertyFetch | ||
{ | ||
public function __construct(string $fqcln, string $case) | ||
{ | ||
parent::__construct($fqcln, $case, 'name'); | ||
} | ||
} |
33 changes: 33 additions & 0 deletions
33
src/Psalm/Internal/Scanner/UnresolvedConstant/EnumPropertyFetch.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,33 @@ | ||
<?php | ||
|
||
namespace Psalm\Internal\Scanner\UnresolvedConstant; | ||
|
||
use Psalm\Internal\Scanner\UnresolvedConstantComponent; | ||
|
||
/** | ||
* @psalm-immutable | ||
* @internal | ||
*/ | ||
abstract class EnumPropertyFetch extends UnresolvedConstantComponent | ||
{ | ||
public string $fqcln; | ||
|
||
public string $case; | ||
|
||
/** @var 'name'|'value' */ | ||
public string $name; | ||
|
||
/** | ||
* @param string $fqcln | ||
* @param string $case | ||
* @param 'name'|'value' $name | ||
*/ | ||
public function __construct(string $fqcln, string $case, string $name) | ||
{ | ||
$this->fqcln = $fqcln; | ||
$this->case = $case; | ||
$this->name = $name; | ||
} | ||
|
||
|
||
} |
15 changes: 15 additions & 0 deletions
15
src/Psalm/Internal/Scanner/UnresolvedConstant/EnumValueFetch.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 Psalm\Internal\Scanner\UnresolvedConstant; | ||
|
||
/** | ||
* @psalm-immutable | ||
* @internal | ||
*/ | ||
class EnumValueFetch extends EnumPropertyFetch | ||
{ | ||
public function __construct(string $fqcln, string $case) | ||
{ | ||
parent::__construct($fqcln, $case, 'value'); | ||
} | ||
} |
Oops, something went wrong.