Skip to content

Commit b4491ac

Browse files
alamiraultfabpot
authored andcommitted
Remove usage of empty function when possible
1 parent 0dd5e36 commit b4491ac

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

Diff for: Parser/Parser.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ private function parseSimpleSelector(TokenStream $stream, bool $insideNegation =
242242
}
243243
}
244244

245-
if (empty($arguments)) {
245+
if (!$arguments) {
246246
throw SyntaxErrorException::unexpectedToken('at least one argument', $next);
247247
}
248248

Diff for: Parser/Token.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ public function isDelimiter(array $values = []): bool
6868
return false;
6969
}
7070

71-
if (empty($values)) {
71+
if (!$values) {
7272
return true;
7373
}
7474

Diff for: XPath/Translator.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ private function parseSelectors(string $css): array
220220
foreach ($this->shortcutParsers as $shortcut) {
221221
$tokens = $shortcut->parse($css);
222222

223-
if (!empty($tokens)) {
223+
if ($tokens) {
224224
return $tokens;
225225
}
226226
}

0 commit comments

Comments
 (0)