public function register()
{
if (count($this->getKeywordsToCheck()) === 0) {
throw new \SlevomatCodingStandard\Sniffs\Namespaces\NoKeywordsException(self::class, 'keywordsToCheck');
}
return array_map(function ($keyword) {
if (!defined($keyword)) {
throw new \SlevomatCodingStandard\Sniffs\Namespaces\UndefinedKeywordTokenException($keyword);
}
return constant($keyword);
}, $this->getKeywordsToCheck());
}