mirror of
https://github.com/fenom-template/fenom.git
synced 2023-08-10 21:13:07 +03:00
Update to 1.1
Read CHANGELOG.md#1.1.0
This commit is contained in:
@@ -147,13 +147,15 @@ class Modifier {
|
||||
|
||||
/**
|
||||
*
|
||||
* @param $value
|
||||
* @param $list
|
||||
* @param mixed $value
|
||||
* @param mixed $haystack
|
||||
* @return bool
|
||||
*/
|
||||
public static function in($value, $list) {
|
||||
if(is_array($list)) {
|
||||
return in_array($value, $list);
|
||||
public static function in($value, $haystack) {
|
||||
if(is_array($haystack)) {
|
||||
return in_array($value, $haystack) || array_key_exists($value, $haystack);
|
||||
} elseif(is_string($haystack)) {
|
||||
return strpos($haystack, $value) !== false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user