mirror of
https://github.com/twigphp/Twig.git
synced 2026-09-08 16:36:58 +00:00
Use str_* when possible
This commit is contained in:
@@ -71,7 +71,7 @@ final class HtmlExtension extends AbstractExtension
|
||||
$repr .= ';'.$key.'='.rawurlencode($value);
|
||||
}
|
||||
|
||||
if (0 === strpos($mime, 'text/')) {
|
||||
if (str_starts_with($mime, 'text/')) {
|
||||
$repr .= ','.rawurlencode($data);
|
||||
} else {
|
||||
$repr .= ';base64,'.base64_encode($data);
|
||||
|
||||
@@ -265,7 +265,7 @@ class TwigTestExtension extends AbstractExtension
|
||||
|
||||
public function is_multi_word($value)
|
||||
{
|
||||
return false !== strpos($value, ' ');
|
||||
return str_contains($value, ' ');
|
||||
}
|
||||
|
||||
public function __call($method, $arguments)
|
||||
|
||||
Reference in New Issue
Block a user