Skip to content

Commit 5fd56a0

Browse files
Merge branch '5.4' into 6.0
* 5.4: Leverage str_contains/str_starts_with Leverage str_ends_with
2 parents 4742e79 + 7fb120a commit 5fd56a0

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Parser/Parser.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public static function parseSeries(array $tokens): array
7979
return [2, 0];
8080
case 'n' === $joined:
8181
return [1, 0];
82-
case false === strpos($joined, 'n'):
82+
case !str_contains($joined, 'n'):
8383
return [0, $int($joined)];
8484
}
8585

XPath/Translator.php

+2-2
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ public function __construct(ParserInterface $parser = null)
6363

6464
public static function getXpathLiteral(string $element): string
6565
{
66-
if (false === strpos($element, "'")) {
66+
if (!str_contains($element, "'")) {
6767
return "'".$element."'";
6868
}
6969

70-
if (false === strpos($element, '"')) {
70+
if (!str_contains($element, '"')) {
7171
return '"'.$element.'"';
7272
}
7373

0 commit comments

Comments
 (0)