public function contains($value, bool $recursive = false, bool $strict = true): bool
    {
        if ($recursive === true) {
            return $this->in_array_recursive($value, $this->getArray(), $strict);
        }

        foreach ($this->getGenerator() as $valueFromArray) {
            if ($strict) {
                if ($value === $valueFromArray) {
                    return true;
                }
            } else {
                /** @noinspection NestedPositiveIfStatementsInspection */
                if ($value == $valueFromArray) {
                    return true;
                }
            }
        }

        return false;
    }
public function contains($value, bool $recursive = false, bool $strict = true): bool
    {
        if ($recursive === true) {
            return $this->in_array_recursive($value, $this->getArray(), $strict);
        }

        foreach ($this->getGenerator() as $valueFromArray) {
            if ($strict) {
                if ($value === $valueFromArray) {
                    return true;
                }
            } else {
                /** @noinspection NestedPositiveIfStatementsInspection */
                if ($value == $valueFromArray) {
                    return true;
                }
            }
        }

        return false;
    }
public function contains ( $ value , bool $ recursive = false , bool $ strict = true ) : bool { if ( $ recursive === true ) { return $ this -> in_array_recursive ( $ value , $ this -> getArray ( ) , $ strict ) ; } foreach ( $ this -> getGenerator ( ) as $ valueFromArray ) { if ( $ strict ) { if ( $ value === $ valueFromArray ) { return true ; } } else { /** @noinspection NestedPositiveIfStatementsInspection */ if ( $ value == $ valueFromArray ) { return true ; } } } return false ; }
Check if an item is in the current array.

@param float|int|string $value
@param bool             $recursive
@param bool             $strict

@return bool
Check if an item is in the current array .