Tests if this node matches all of the tests in the array.

@param string|callable[] $tests

@return boolean
508297
public function isAllOf(array $tests) {
    foreach ($tests as $test) {
      if (! $this->is($test)) {
        return FALSE;
      }
    }
    return TRUE;
  }
908699
protected function matchToKeys(array $matches)
    {
        $parameterNames = $this->parameterNames();

        if (count($parameterNames) == 0) {
            return array();
        }

        $parameters = array_intersect_key($matches, array_flip($parameterNames));

        return array_filter($parameters, function ($value)
        {
            return is_string($value) && (strlen($value) > 0);
        });
    }
839919
public static function set(array &$array, $key, $value, array $tests = []) {
        foreach ($tests as $current) {
            if ($current !== $value) {
                continue;
            }
            return;
        }
        $array[$key] = $value;
    }
1328700
public function containsAny($needles): bool
    {
        $needlesBag = $this->transformToBag($needles);

        return !!array_intersect($needlesBag, $this->bag);
    }
719461
public function haveSameParents(array $nodes)
    {
        $firstRes = array_pop($nodes);
        $tmp = $firstRes['parent_id'];

        foreach ($nodes as $node) {
            if ($tmp !== $node['parent_id']) {
                return false;
            }
        }

        return true;
    }
1215839
protected function hasMatchingSuffix(array $strings)
	{
		$suffix = end($strings[1]);
		foreach ($strings as $string)
		{
			if (end($string) !== $suffix)
			{
				return false;
			}
		}

		return ($suffix !== false);
	}
673057
public function equals(Statement $toTest)
    {
        if ($toTest instanceof Statement &&
            $this->getSubject()->equals($toTest->getSubject()) &&
            $this->getPredicate()->equals($toTest->getPredicate()) &&
            $this->getObject()->equals($toTest->getObject())
        ) {
            if ($this->isQuad() && $toTest->isQuad() && $this->getGraph()->equals($toTest->getGraph())) {
                return true;
            } elseif ($this->isTriple() && $toTest->isTriple()) {
                return true;
            }
        }

        return false;
    }
1101849
public function matches(array $values, $strict = false)
    {
        if (empty($values)) {
            return false;
        }

        $claims = $this->getClaims();

        foreach ($values as $key => $value) {
            if (! $claims->has($key) || ! $claims->get($key)->matches($value, $strict)) {
                return false;
            }
        }

        return true;
    }
860573
private function _hasMatchingTarget(Targets $targets): bool
    {
        foreach ($this->_config->targets() as $target) {
            if ($targets->hasTarget($target)) {
                return true;
            }
        }
        return false;
    }
103754
public function hasFlags(array $flags, bool $matchAll = false) : bool
    {
        $matched = false;
        $userFlags = $this->getUserFlags();

        foreach ($flags as $flag) {
            if (in_array($flag, $userFlags)) {
                if ($matchAll) {
                    $matched = true;
                    continue;
                }

                $matched = true;
            } else {
                if ($matchAll) {
                    return false;
                }

                $matched = false;
            }
        }

        return $matched;
    }
831585
public function containsAttributes(array $attributes)
    {
        foreach ($attributes as $attribute) {
            if (!$this->attributes->contains($attribute)) {
                return false;
            }
        }

        return true;
    }
187703
protected function checkFilesArray($files)
    {
        if ($files != null && is_array($files) && !empty($files)) {
            foreach ($files as $file) {
                if ($file != null && is_array($file) && !empty($file)) {
                    return true;
                }
            }
        }
        return false;
    }
224885
public function isMethod($methods)
    {
        if (is_array($methods)) {
            return in_array($this->getMethod(), $methods);
        }

        if (is_string($methods)) {
            return ($this->getMethod() == $methods);
        }

        return false;
    }
747301
private function applyConditions($matches)
    {
        foreach ($this->conditions as $condition) {
            $matches = $this->filter($matches, $condition);
        }

        return $matches;
    }
920167
public function removeAll($elements): bool {
        $removed = false;
        foreach ($elements as $element) {
            $removed |= $this->remove($element);
        }
        return $removed;
    }
198490
public function delete( ... $paths ): bool
	{
		$all = 0;
		$removed = 0;
		if( count($paths) === 1 && is_array($paths[0]) )
		{
			$paths = $paths[0];
		}

		foreach( $paths as $path )
		{
			++ $all;
			$this->deleteOnce( (string) $path ) && ++ $removed;
		}

		return $all === $removed;
	}
1367827
public function isValid(array $values)
    {
        foreach ($values as $value) {
            if (!$this->checkType($value)) {
                return false;
            }
        }

        return true;
    }