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