rector/src/Php/ReservedKeywordAnalyzer.php
Tomas Votruba 727b9f46f0 Updated Rector to commit bfa1891c50677b01136a9308fd3c3ecc12e267d9
bfa1891c50 [cleanup] Remove 73 unused public methods (#3245)
2022-12-23 17:10:25 +00:00

17 lines
413 B
PHP

<?php
declare (strict_types=1);
namespace Rector\Core\Php;
final class ReservedKeywordAnalyzer
{
/**
* @var string[]
*/
private const NATIVE_VARIABLE_NAMES = ['_ENV', '_POST', '_GET', '_COOKIE', '_SERVER', '_FILES', '_REQUEST', '_SESSION', 'GLOBALS'];
public function isNativeVariable(string $name) : bool
{
return \in_array($name, self::NATIVE_VARIABLE_NAMES, \true);
}
}