mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-26 12:52:36 +00:00
SensitiveConstantNameRector: ignore existing contants
case-sensitivity test of `defined()`: https://3v4l.org/DA23r
This commit is contained in:
parent
aecebd1d5c
commit
fc91cc3ec7
|
@ -118,6 +118,10 @@ CODE_SAMPLE
|
|||
}
|
||||
|
||||
$currentConstantName = (string) $node->name;
|
||||
|
||||
if (\defined($currentConstantName)) {
|
||||
return null;
|
||||
}
|
||||
|
||||
// is uppercase, all good
|
||||
if ($currentConstantName === strtoupper($currentConstantName)) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user