-
Notifications
You must be signed in to change notification settings - Fork 478
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cast PHPDoc array key type with array key casting rules
- Loading branch information
1 parent
64d7ac8
commit 5d17b84
Showing
3 changed files
with
38 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<?php declare(strict_types = 1); | ||
|
||
namespace Bug6117; | ||
|
||
final class Mapping | ||
{ | ||
} | ||
|
||
final class Stuff | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
const CATEGORY_TYPE_ONE = '44'; | ||
|
||
/** | ||
* @var string | ||
*/ | ||
const CATEGORY_TYPE_TWO = '45'; | ||
|
||
/** | ||
* @var array<self::CATEGORY_*, Mapping> | ||
*/ | ||
private $mappings = []; | ||
|
||
public function testMe(): void | ||
{ | ||
$this->mappings[self::CATEGORY_TYPE_TWO] = new Mapping(); | ||
|
||
$this->mappings[(string)self::CATEGORY_TYPE_TWO] = new Mapping(); | ||
} | ||
} |