@param   mixed $value
@param   array $array
@param   bool  $caseSensitive

@return  bool
497458
public function inArray($value, array $array, bool $caseSensitive = false)
    {
        $arrayCopy = $this->arrayCopy($array);

        if ($caseSensitive === false) {
            $function = function ($useInput) {
                return is_string($useInput) ? strtolower($useInput) : $useInput;
            };

            $arrayCopy = array_map($function, $arrayCopy);
        }

        return in_array(is_string($value) && $caseSensitive === false ? strtolower($value) : $value, $arrayCopy);
    }
208072
protected function fixValue(array $value)/*# : array */
    {
        $result = [];
        foreach ($value as $k => $v) {
            if (false !== strpos($k, $this->field_splitter)) {
                $res = &$this->searchTree($k, $result, true);
                $res = is_array($v) ? $this->fixValue($v) : $v;
            } else {
                $result[$k] = is_array($v) ? $this->fixValue($v) : $v;
            }
        }
        return $result;
    }
22402
public static <T> boolean contains(T[] array, T value) {
		return indexOf(array, value) > INDEX_NOT_FOUND;
	}
693188
function contains(arr, value, caseInsensitive) {
		var i;
		if (arr.indexOf && !caseInsensitive) {
			return arr.indexOf(value) >= 0;
		}
		
		for (i = 0; i < arr.length; i++) {
			if (arr[i] === value) {
				return true;
			}

			if (caseInsensitive && typeof(arr[i]) === "string" && typeof(value) === "string" && arr[i].toUpperCase() === value.toUpperCase()) {
				return true;
			}
		}

		return false;
	}
1374103
function match(word, array, caseSensitive) {
		return $.grep(
			array,
			function(w) {
				if (caseSensitive) {
					return !w.indexOf(word);
				} else {
					return !w.toLowerCase().indexOf(word.toLowerCase());
				}
			}
		);
	}
248515
public static function arrayChangeCaseValue($array, $case = CASE_LOWER)
    {
        $return = [];
        foreach ($array as $key => $value) {
            if (self::isReallyArray($value)) {
                $results = array_merge($results, self::arrayChangeCaseValue($value, $case));
            } else {
                $array[$key] = ($case == CASE_UPPER) ? strtoupper($array[$key]) : strtolower($array[$key]);
            }
        }

        return $array;
    }
819572
public static function inArrayCaseInsensitive($needle, $haystack)
    {
        if (!$haystack || !is_array($haystack)) {
            return false;
        }
        $lcase = array();
        foreach ($haystack as $key => $val) {
            $lcase[$key] = strtolower($val);
        }
        return in_array(strtolower($needle), $lcase);
    }
1041063
public static function findByKey($array, $key, $value) {
        foreach ($array as $element)
            if (call_user_func(array($element, $key)) === $value)
                return $element;
        return null;
    }
190502
public static function changeKeyCase(array $array, int $case = CASE_LOWER, bool $recursive = false): array
    {
        if (empty($array)) {
            return $array;
        }

        $array = \array_change_key_case($array, $case);

        if ($recursive) {
            foreach ($array as &$item) {
                if (!empty($item) && is_array($item)) {
                    $item = self::changeKeyCase($item, $case, true);
                }
            }
        }

        return $array;
    }
31510
public static function isArrayAccessible($value): bool
    {
        if (is_array($value)) {
            return true;
        }

        if (is_object($value) && ($value instanceof ArrayAccess)) {
            return true;
        }

        return false;
    }
204758
public static boolean contains(final String value, final String needle, final boolean caseSensitive) {
        validate(value, NULL_STRING_PREDICATE, NULL_STRING_MSG_SUPPLIER);
        if (caseSensitive) {
            return value.contains(needle);
        }
        return value.toLowerCase().contains(needle.toLowerCase());
    }
1257300
private function checkValueIsValidOrThrowException($value)
    {
        if (!\is_array($value) || 1 !== \count($value)) {
            throw new FilterErrorException(
                'Condition parsing failed for "'
                . var_export($value, true)
                . '", it should be something like: "isEqualTo" : "a value"'
            );
        }
    }
693172
private function valid($types, $value) {
        $types = (array) $types;

        foreach($types as $type) {
            switch($type) {
            case self::T_NULL:
                if(is_null($value)) {
                    return true;
                }
                break;
            case self::T_INT:
                if(is_int($value)) {
                    return true;
                }
                break;
            case self::T_STR:
                if(is_string($value)) {
                    return true;
                }
                break;
            case self::T_ARR:
                if(is_array($value)) {
                    return true;
                }
                break;
            }
        }

        return false;
    }
911863
public function validateToArray($value, $constraints = null, $groups = null)
    {
        return $this->formatViolationsToArray($this->validate($value, $constraints, $groups));
    }
1158614
protected function isAssociativeArray($value)
    {
        $numericKeys = true;
        $i = 0;
        foreach ($value as $key => $v) {
            if ($i !== $key) {
                $numericKeys = false;
                break;
            }
            $i++;
        }
        return !$numericKeys;
    }
359703
protected function getPossibleArrayTypes(array $value): array
    {
        $noSubTypes = in_array('array', $this->types);

        $types = array_filter($this->types, function($type) use($noSubTypes) {
            return $type === 'array'
                || (!$noSubTypes && substr($type, -2) === '[]')
                || (class_exists($type) && is_a(Traversable::class, $type, true));
        });

        return $noSubTypes ? $types : $this->removeImpossibleArraySubtypes($types, $value);
    }
754483
public static function set( &$array, $keys , $value ){
		$kArr = explode(".", $keys);
		$cursor = &$array;
		for( $i=0;$i<count( $kArr);$i++ ){
			$k = $kArr[$i];
			if( !isset($cursor[$k] )){
				//throw new \Exception("Undefined index '" . $k . "'");
				$cursor = null;
				break;
			}
			else{
				$cursor= &$cursor[$k];
			}
		}
		if( $cursor != null ){
			$cursor = $value;
			 
		}
		return $array;
	}