@param string|array

@return bool
439186
public function isPrimitive($types) : bool
    {
        if (!is_array($types)) {
            $types = [$types];
        }

        $primitive = false;
        $primitiveType = [
            'int',
            'int32',
            'integer',
            'float',
            'double',
            'string',
            'bool',
            'boolean',
            'array',
            '\\Cawa\\SwaggerServer\\DateTime',
        ];

        foreach ($types as $type) {
            if (in_array($type, $primitiveType)) {
                $primitive = true;
            }
        }

        return $primitive;
    }
1104252
public static function has($array, $keys)
	{
		if(is_null($keys) || !$array)
			return false;

		$keys = static::toArray($keys);

		if($keys === [])
			return false;

		foreach ($keys as $key) {
			$subKeyArray = $array;

			if (static::exists($array, $key))
				continue;

			foreach (static::toKey($key) as $segment) {
				if (static::accessible($subKeyArray) && static::exists($subKeyArray, $segment))
					$subKeyArray = $subKeyArray[$segment];
				else
					return false;
			}
		}

		return true;
	}
920787
public function has(string $index, array $options = []) : bool
    {
        $separator = isset($options['separator']) ?
            $options['separator'] :
            $this->getOption('separator', '.');
        $value = $this->getData();
        $keys = explode($separator, $index);

        foreach ($keys as $key) {
            if (!is_array($value) || !array_key_exists($key, $value)) {
                return false;
            }

            $value = $value[$key];
        }

        return true;
    }
555466
public static function has($array, $keys, $wildcard = null)
    {
        // If the keys are null or the array is not accessible
        if (null === $keys || empty($array) || !Arr::accessible($array)) {
            return false;
        }

        // Check that every key exists in $array
        $originalArray = $array;
        foreach ((array) $keys as $key) {
            $array = $originalArray;

            // If the array has the key carry on
            if (Arr::exists($array, $key)) {
                continue;
            }

            // Break up the key into segments and drill into the array
            $segments = explode('.', $key);
            foreach ($segments as $k => $segment) {
                // If the segment is a wildcard
                if ($segment === $wildcard && !empty($array)) {
                    // If this is the last segment then the array has the key
                    if ($k + 1 === count($segments)) {
                        break;
                    }
                    // If we are still considering an array, drill into every possibility
                    if (Arr::accessible($array)) {
                        // Check that at least one possibility contains the (sub)key
                        $subKey = implode('.', array_slice($segments, $k + 1));
                        $found  = array_reduce($array, function ($f, $item) use ($subKey, $wildcard) {
                            return $f || static::has($item, $subKey, $wildcard);
                        }, false);
                        if (!$found) {
                            return false;
                        } else {
                            break;
                        }
                    }
                }
                // Otherwise continue to drill into $array
                if (!empty($array) && Arr::accessible($array) && Arr::exists($array, $segment)) {
                    $array = $array[$segment];
                    continue;
                }
                return false;
            }
        }

        return true;
    }
675409
final public static function hasValue (...$values) : bool
	{
		foreach ($values as $value):
			if (is_array($value)):
				if (!(isset($value) AND (!empty($value)))):
					return FALSE; break;
				endif;
			else:
				$trimmedValue = trim($value);
				if (!(isset($trimmedValue) AND ($trimmedValue !== ""))):
					return FALSE; break;
				endif;
			endif;
		endforeach;
		return TRUE;
	}
727210
public function isSequentialArray($array)
    {
        $counter = 0;
        foreach ($array as $key => $value) {
            if ($counter !== $key) {
                return false;
            }
            $counter++;
        }

        return true;
    }
1079163
private function boolToString($var)
    {
        $copy = is_array($var) ? $var : [$var];

        foreach ($copy as $key => $value) {
            if (is_bool($value)) {
                $copy[$key] = $value ? '1' : '0';
            }
        }

        return is_array($var) ? $copy : $copy[0];
    }
784144
public static function isMap($val): bool
    {
        if (!\is_array($val)) {
            return false;
        }

        /** @var array $val */
        $keys = \array_keys($val);

        return \array_keys($keys) !== $keys;
    }
1020151
public static function has($array, $keys)
	{
		if(is_null($keys) || ! $array)
		{
			return false;
		}

		$keys = (array) $keys;
		if($keys === [])
		{
			return false;
		}

		foreach($keys as $key)
		{
			if(static::exists($array, $key))
			{
				continue;
			}

			if( strpos($key, ".") !== false )
			{
				$subKeyArray = $array;
				for($i = 0, $map = explode('.', $key), $len = count($map); $i < $len; $i++)
				{
					$segment = $map[$i];
					if( ($i < 1 || static::accessible($subKeyArray)) && static::exists($subKeyArray, $segment) )
					{
						if( $i + 1 < $len )
						{
							$subKeyArray = $subKeyArray[$segment];
						}
					}
					else
					{
						return false;
					}
				}
			}
		}

		return true;
	}
737509
public function execute($string)
    {
        $string = strtolower((string) $string);
        if (!preg_match(self::PATTERN, $string)) {
            return null;
        }

        if ($string{0} === 't' || $string{0} === '1') {
            return true;
        } else {
            return false;
        }
    }
505780
private function check($value) {

		$values = ['yes', 'on', '1', 'true'];
		
		if(true === is_string($value)) {
			return true === in_array($value, $values);
		}

		return false;
	}
33277
public static function is_multi($arr, $all_keys = false)
    {
        $values = array_filter($arr, 'is_array');
        return $all_keys ? count($arr) === count($values) : count($values) > 0;
    }
1221618
protected function expression(&$out)
    {
        $s = $this->seek();

        if ($this->literal('(')) {
            if ($this->literal(')')) {
                $out = [Type::T_LIST, '', []];

                return true;
            }

            if ($this->valueList($out) && $this->literal(')') && $out[0] === Type::T_LIST) {
                return true;
            }

            $this->seek($s);

            if ($this->map($out)) {
                return true;
            }

            $this->seek($s);
        }

        if ($this->value($lhs)) {
            $out = $this->expHelper($lhs, 0);

            return true;
        }

        return false;
    }
913370
public static function isArray($value)
    {
        if (is_array($value)) {
            return !$value || array_keys($value)[0] === 0;
        }

        // Handle array-like values. Must be empty or offset 0 exists.
        return $value instanceof \Countable && $value instanceof \ArrayAccess
            ? count($value) == 0 || $value->offsetExists(0)
            : false;
    }
696534
function matches($names)
    {
        //Check every argument supplied
        foreach (func_get_args() as $name)
        {
            //Check for any possible match
            if (
                0 === strcasecmp($name, $this->name) ||
                0 === strcasecmp($name, $this->property->getName()) ||
                0 === strcasecmp($name, Reflection::normalizeProperty($this->property->getName()))
            )
            {
                return true;
            }
        }

        return false;
    }
661278
public function equals($string)
    {
        $string = StdObjectWrapper::toString($string);

        // we double-cast the $string param to string, because integer is also a string, but in strcmp function integer
        // can cause unwanted mismatches if it's not strictly casted to string
        $result = strcmp((string)$string, $this->val());
        if ($result !== 0) {
            return false;
        }

        return true;
    }
1019985
public function isArray(): bool
    {
        return (bool) $this->docBlockUtility->getConstraint($this->property, All::class, false);
    }