|
@@ -178,13 +178,11 @@ class Sample
|
|
|
foreach (array_reverse(Preg::split('/(\\\\)/', $namespace, -1, PREG_SPLIT_NO_EMPTY | PREG_SPLIT_DELIM_CAPTURE)) as $piece) {
|
|
|
$index = $tokens->getPrevMeaningfulToken($index);
|
|
|
if ('\\' === $piece) {
|
|
|
- if (!$tokens[$index]->isGivenKind([T_NS_SEPARATOR])) {
|
|
|
- return null;
|
|
|
- }
|
|
|
- } else {
|
|
|
- if (!$tokens[$index]->equals([T_STRING, $piece], false)) {
|
|
|
+ if (!$tokens[$index]->isGivenKind(T_NS_SEPARATOR)) {
|
|
|
return null;
|
|
|
}
|
|
|
+ } elseif (!$tokens[$index]->equals([T_STRING, $piece], false)) {
|
|
|
+ return null;
|
|
|
}
|
|
|
}
|
|
|
|