Skip to content

Commit a55c3a0

Browse files
derrabusnicolas-grekas
authored andcommitted
Leverage str_contains/str_starts_with
Signed-off-by: Alexander M. Turek <[email protected]>
1 parent 6381ec2 commit a55c3a0

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

Link.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,6 @@ public function withoutAttribute($attribute)
159159

160160
private function hrefIsTemplated(string $href): bool
161161
{
162-
return false !== strpos($href, '{') || false !== strpos($href, '}');
162+
return str_contains($href, '{') || str_contains($href, '}');
163163
}
164164
}

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,8 @@
2121
"require": {
2222
"php": ">=7.1.3",
2323
"psr/link": "^1.0",
24-
"symfony/polyfill-php72": "^1.5"
24+
"symfony/polyfill-php72": "^1.5",
25+
"symfony/polyfill-php80": "^1.16"
2526
},
2627
"suggest": {
2728
"symfony/http-kernel": ""

0 commit comments

Comments
 (0)