Validates that the given array contains all valid Meta entries

@param array &$array An array of strings or Meta objects

@return void
@throws Exception if any items are invalid.
174317
public static function validateMeta(array &$array)
    {

        foreach ($array as $key => $tag) {
            if (!($tag instanceof Meta)) {
                $newtag = new Meta($tag);
                $array[$key] = $newtag;
            }
        }
    }
925740
protected function validateRow(array $row)
    {
        foreach ($row as $k => $v)
        {
            if (WF::is_array_like($v))
                throw new InvalidArgumentException("CSVWriter does not support nested arrays");
        }
    }
1046548
protected static function isArrayElementValidArray(array $array, $key, $validIfNotEmpty = true)
    {
        if (!isset($array[$key])) {
            return false;
        }

        if (!is_array($array[$key])) {
            return false;
        }

        return (!$validIfNotEmpty || !empty($array[$key]));
    }
480255
public function fromArray($array) {
        if ($array instanceof Record) {
            $array = $array->toArray('', false);
        }
        foreach ($array as $key => $value) {
            if (isset($value)) {
                if($value instanceof Search){
                    $value=$value->value();
                }
                $this->$key = $value;
            }
        }
    }
1252040
public static function isList(array $array): bool
	{
		$count = count($array);

		$range = $count
			? range(0, $count - 1)
			: [];

		$keys = array_keys($array);

		return $keys === $range;
	}
454314
protected function isPureArray(array $array ) {
            $i=0;
            foreach($array as $k=>$v) {
                if ( $k !== $i ) {
                   return false;
                }
                $i++;
            }

            return true;
        }
1109779
private
    function mapping(&$array)
    {
        foreach ($array as $key => &$item) {
            if ($key[0] == '@' || strpos($key, '_') === 0 || $key == 'dynamic_templates') {
                unset($array[$key]);
                continue;
            }
            if ($key == 'properties') {
                unset($array[$key]);
                $array = array_merge($array, $item);
                $this->mapping($array);
                continue;
            }
            if (is_array($item)) {
                if ($item['type']) {
                    $item = $item['type'];
                } else
                    $this->mapping($item);
            }
        }
    }
1260274
public static function validateActionsConfig(array $json) : void
    {
        foreach ($json as $action) {
            if (!self::keysExist(['action'], $action)) {
                throw new \RuntimeException('Config error: \'action\' missing');
            }
            if (empty($action['action'])) {
                throw new \RuntimeException('Config error: \'action\' can\'t be empty');
            }
            if (!empty($action['conditions'])) {
                self::validateConditionsConfig($action['conditions']);
            }
        }
    }
1156496
public function copyToArray(array &$array)
    {
        parent::copyToArray($array);

        $array['action']            = LanguageUtility::toString($this->action);
        $array['clientId']          = $this->clientId;
        $array['subject']           = $this->subject;
        $array['scopes']            = $this->scopes;
        $array['claims']            = $this->claims;
        $array['token']             = $this->token;
        $array['responseContent']   = $this->responseContent;
        $array['properties']        = LanguageUtility::convertArrayOfArrayCopyableToArray($this->properties);
        $array['clientIdAlias']     = $this->clientIdAlias;
        $array['clientIdAliasUsed'] = $this->clientIdAliasUsed;
    }
65802
public function validate($value): void
    {
        if (in_array($value, $this->values)) {
            return;
        }

        throw new Exception\Invalid(
            $value,
            "Invalid value, expected one of " . implode(",", $this->valuesString())
        );
    }
1110567
public static function containsMultipleTypes(array $array): bool
    {
        if (count($array) > 0) {
            reset($array);
            $previousType = gettype(current($array));
            next($array);
            foreach ($array as $value) {
                if ($previousType !== gettype($value)) {
                    return true;
                }
            }
        }
        return false;
    }
461054
public static function isKeyWithElements($array, $key)
    {
        if (false === is_array($array) || false === isset($array[$key])) {
            return false;
        }

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

        if (0 === count($array[$key])) {
            return false;
        }

        return true;
    }
483198
private function _prepareTables(array $tablesArray)
	{
		if(count($tablesArray) === 0)
		{
			throw new \Exception('"table"-method of the statement have to invoked before!');
		}

		$tables = ' ';
		foreach($tablesArray as $table)
		{
			$tables .= $table->getExpression() . ', ';
		}
		$tables       = substr($tables, 0, strlen($tables) - 2);
		$this->tables = $tables . ' ';
	}
608659
public static function isList($array)
    {
        if( !is_array( $array ) )
            return false;

        // using Stripe's library as a base for this was a cluster fuck of an idea.
        // why? figure this out:
        $keys = array_keys( $array );
        foreach( array_keys( $array ) as $i )
            if( !is_numeric( $i ) )
                return false;

        return true;
    }
70786
public static function isAssoc(array $array): bool
    {
        if (empty($array)) {
            return false;
        }

        foreach (array_keys($array) as $key) {
            if (\is_string($key)) {
                return true;
            }
        }

        return false;
    }
514884
protected function isValidArray(array $array, int $maxSize, ?int $minSize = null): void
    {
        $countArray = \count($array);
        if ($minSize !== null && $countArray < $minSize) {
            throw new InvalidArrayException(sprintf('The minimum number of items for this array is %d.', $minSize));
        }
        if ($countArray > $maxSize) {
            throw new InvalidArrayException(sprintf('The maximum number of items for this array is %d.', $maxSize));
        }
    }
191806
public static function is_numeric_array($array)
    {
        if (!is_array($array)) { return false; }

        $current = 0;
        foreach (array_keys($array) as $key) {
            if ($key !== $current) { return false; }

            $current++;
        }

        return true;
    }