mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
Dummy protect
This commit is contained in:
parent
fb544b10e8
commit
5d87060f42
@ -170,11 +170,13 @@ class Modifier
|
|||||||
*/
|
*/
|
||||||
public static function in($value, $haystack)
|
public static function in($value, $haystack)
|
||||||
{
|
{
|
||||||
|
if(is_scalar($value)) {
|
||||||
if (is_array($haystack)) {
|
if (is_array($haystack)) {
|
||||||
return in_array($value, $haystack) || array_key_exists($value, $haystack);
|
return in_array($value, $haystack) || array_key_exists($value, $haystack);
|
||||||
} elseif (is_string($haystack)) {
|
} elseif (is_string($haystack)) {
|
||||||
return strpos($haystack, $value) !== false;
|
return strpos($haystack, $value) !== false;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user