noMatch

@return \Lucid\Mux\Matcher\ContextInterface
351128
protected function noMatch(Request $context, $reason = self::NOMATCH, $name = null)
    {
        return new Match($reason, $name, $context, null);
    }
1109883
public function nextMatchingBracket()
    {
        if (!$this->valid()) {
            return;
        }

        $matches = ['(' => ')', '{' => '}', '[' => ']'];

        $token = $this->current();
        $content = $open = $token[0];

        if (!isset($matches[$open])) {
            return;
        }
        $level = 1;
        $close = $matches[$open];

        $start = $this->_current;
        $count = $this->count();
        $this->_current++;

        while ($this->_current < $count) {
            $type = $this->_data[$this->_current][0];
            if ($type === $close) {
                $level--;
            } elseif ($type === $open) {
                $level++;
            }
            $content .= $this->_data[$this->_current][1];
            if ($level === 0) {
                return $content;
            }
            $this->_current++;
        }
        $this->_current = $start;
    }
541263
protected function matchRegex()
    {
        // Match request against route table
        foreach ($this->routes as $route => $endpoint) {
            $result = $this->routeParser->parse($route);

            // Get regex
            $regex = $result[0];
            // Get param names
            $paramNames = $result[1];

            if (preg_match($regex, $this->requestUri, $matches)) {
                // Check if endpoint class exists
                if (!$this->endpointExists($endpoint)) {
                    // Endpoint class not found
                    throw new NotFound();
                } elseif (!$this->endpointMethodExists($endpoint, $this->requestMethod)) {
                    // Route found but method can't be found
                    throw new MethodNotAllowed();
                }

                // Set matched route
                $this->matchedRoute = $route;
                // Set matched endpoint
                $this->matchedEndpoint = $endpoint;
                // Set matched request method
                $this->matchedMethod = $this->requestMethod;

                // Remove all slashes from param values/matches
                $matches = array_diff($matches, ['/']);

                // Remove first value in the matches array since it wont be used
                array_shift($matches);

                // Loop through all params and match them with values and save the result
                // to the params array
                foreach ($paramNames as $key => $name) {
                    $this->params[$name] = (isset($matches[$key])) ? $matches[$key]: null;
                }

                // Match found, add it to the cache for later use
                $this->addToCache($this->requestUri);

                // Time to stop looking for more matches
                return true;
            }
        }

        return false;
    }
1046720
public function match() {
		$result = false;

		$this->matchedStatus = $this->result->getStatus();

		if ($this->result->hasHandler()) {
			$result = true;
			$this->matchedHandler = $this->result->getHandler();
		} else {
			$this->matchedHandler = $this->notFoundHandler;
		}

		return $result;
	}
656634
public function replace() {

		if(null !== $this -> match) {

			foreach($this -> match[0] as $index => $match) {

				$match 		= new MatchVariable($this -> match[1][$index]);
				$variables  = $match -> replace() -> getLine();

				$code = '<?php echo $this -> partial('. $variables .'); ?>';
				$this -> line = preg_replace('/' . preg_quote($this -> match[0][$index], '/') . '/', $code, $this -> line , 1);
			}
		}

		return $this;
	}
1153341
protected function getMatchHash()
    {
        $hashes = [];

        foreach($this->matchers as $matcher) {
            $hashes[] = $matcher->getHash();
        }

        return implode('::', $hashes);
    }
1016598
public function matchQuantity($min, $max = null)
	{
		$match = '{'.$min;

		if ($max !== null)
		{
			$match .= ',' . $max;
		}

		$match .= '}';

		$this->value($match);

		return $this;
	}
801974
public function validate()
    {
        $matchers = [];

        // #1: find matchers.
        foreach ($this->getFluent()->getCalls() as $key) {
            // Keyword "not" inverses the end result.
            // Using it twice in the same assertion will have no effect (see the code).
            if ("not" == $key) {
                $this->inverse = true;

                continue;
            }

            if (is_array($key)) {
                // Handle "matcher+link+arguments" (instead of "matcher+arguments") cases.
                if (in_array($key[0], $this->links) and count($matchers) > 0) {
                    $lastIndex = count($matchers) - 1;
                    $matchers[$lastIndex] = [$matchers[$lastIndex], $key[1]];
                } else {
                    $matchers[] = $key;
                }

                continue;
            }

            // If the given keyword is NEITHER a link NOR "should", it must be a matcher name.
            if ( ! in_array($key, $this->links) && "should" != $key) {
                $matchers[] = $key;
            }
        }

        // If no matchers were found, just return "true" (there is no way it can be "false").
        if (count($matchers) == 0) {
            return true;
        }

        // Think of "{{link}}(smth)" as "equal(smth)".
        if (is_array($matchers[0]) and in_array($matchers[0][0], $this->links)) {
            $matchers[0][0] = "equal";
        }

        // #2: initialize the matchers.
        foreach ($matchers as $key => $matcher) {
            $class = $this->aliasToMatcher(is_array($matcher) ? $matcher[0] : $matcher);

            if ( ! class_exists($class)) {
                throw new Exceptions\NoMatcherFoundException($class);
            }

            $matchers[$key] = new $class(
                // @codeCoverageIgnoreStart
                $this->value, // The value we're working with.
                (is_array($matcher) ? $matcher[1] : []), // The matcher arguments.
                // Whether it should be in "configuration" or "normal" mode.
                (count($matchers) - 1 != $key) && count($matchers) != 1
            );
            // @codeCoverageIgnoreEnd
        }

        $result = true;

        // #3: run the matchers!
        foreach ($matchers as $matcher) {
            $this->lastMatcher = $matcher;

            if ( ! $matcher->run()) {
                $this->message = $matcher->getMessage();
                $result = false;

                break;
            }

            // We want to grab the message anyway.
            $this->message = $matcher->getMessage();
        }

        // #4: if the result should be inversed, do it.
        if ($this->inverse) {
            $this->inverse = false;
            $result = ! $result;

            $this->message = "NOT keyword (failed): ".$this->message;
        }

        return $result;
    }
1085804
protected function matchDirect()
    {
        // Create variable used to keep track on progress
        $endpoint = false;

        // check without a trailing slash
        if (isset($this->routes[$this->requestUri])) {
            $endpoint = $this->routes[$this->requestUri];
        } else {
            // no match return false
            return false;
        }

        // check if endpoint class exists
        if (!$this->endpointExists($endpoint)) {
            throw new NotFound();
        } elseif (!$this->endpointMethodExists($endpoint, $this->requestMethod)) {
            // route found but method can't be found
            throw new MethodNotAllowed();
        }

        // found a direct match, set needed properties
        $this->matchedRoute = $this->requestUri;
        $this->matchedEndpoint = $endpoint;
        $this->matchedMethod = $this->requestMethod;

        // we found our match, stop looking for more
        return true;
    }
429017
public function process(MinifyContext $context)
    {
        return $context->setContents(preg_replace_callback(
            '/
                =           # start matching by a equal sign
                \s*         # its valid to use whitespaces after the equals sign
                (["\'])?    # match a single or double quote and make it a capturing group for backreferencing
                    (
                            (?:(?=\1)|[^\\\\])*             # normal part of "unrolling the loop". Match no quote nor escaped char
                            (?:\\\\\1                       # match the escaped quote
                                (?:(?=\1)|[^\\\\])*         # normal part again
                            )*                              # special part of "unrolling the loop"
                    )       # use a the "unrolling the loop" technique to be able to skip escaped quotes like ="\""
                \1?         # match the same quote symbol as matched before
            /x', function ($match) {
            return $this->minifyAttribute($match);
        }, $context->getContents()));
    }
894513
public function getMatch($params = array())
    {
        $resource = 'model/match.json';
        $resource .= '?' . $this->buildQueryString($params);
        $response = $this->getServiceResponse($resource);

        $getModelMatchResponse = new Models\ResponseModelMatchGet($response);

        return $getModelMatchResponse;
    }
1337278
public function matchAction($matchAction = null)
    {
        if ($matchAction === null) {
            return $this->_matchAction;
        }
        $this->_matchAction = $matchAction;

        return $this;
    }
882783
private function MatchName( $nav, $context )
	{
		return ( $this->NameTest->IsNamespaceWildcard() || $this->NameTest->namespaceURI == $nav->getNamespaceURI() ) &&
		   ($this->NameTest->IsNameWildcard() || $this->NameTest->localName == $nav->getLocalName() );
	}
107365
private function checkContextMatch($Input, $Backtrack, $Lookahead, $ignore, $ptr)
	{
		// Input etc are single numbers - GSUB Format 6.1
		// Input starts with (1=>xxx)
		// return false if no match, else an array of ptr for matches (0=>0, 1=>3,...)

		$current_syllable = (isset($this->OTLdata[$ptr]['syllable']) ? $this->OTLdata[$ptr]['syllable'] : 0);

		// BACKTRACK
		$checkpos = $ptr;
		for ($i = 0; $i < count($Backtrack); $i++) {
			$checkpos--;
			while (isset($this->OTLdata[$checkpos]) && strpos($ignore, $this->OTLdata[$checkpos]['hex']) !== false) {
				$checkpos--;
			}
			// If outside scope of current syllable - return no match
			if ($this->restrictToSyllable && isset($this->OTLdata[$checkpos]['syllable']) && $this->OTLdata[$checkpos]['syllable'] != $current_syllable) {
				return false;
			} elseif (!isset($this->OTLdata[$checkpos]) || $this->OTLdata[$checkpos]['uni'] != $Backtrack[$i]) {
				return false;
			}
		}

		// INPUT
		$matched = [0 => $ptr];
		$checkpos = $ptr;
		for ($i = 1; $i < count($Input); $i++) {
			$checkpos++;
			while (isset($this->OTLdata[$checkpos]) && strpos($ignore, $this->OTLdata[$checkpos]['hex']) !== false) {
				$checkpos++;
			}
			// If outside scope of current syllable - return no match
			if ($this->restrictToSyllable && isset($this->OTLdata[$checkpos]['syllable']) && $this->OTLdata[$checkpos]['syllable'] != $current_syllable) {
				return false;
			} elseif (isset($this->OTLdata[$checkpos]) && $this->OTLdata[$checkpos]['uni'] == $Input[$i]) {
				$matched[] = $checkpos;
			} else {
				return false;
			}
		}

		// LOOKAHEAD
		for ($i = 0; $i < count($Lookahead); $i++) {
			$checkpos++;
			while (isset($this->OTLdata[$checkpos]) && strpos($ignore, $this->OTLdata[$checkpos]['hex']) !== false) {
				$checkpos++;
			}
			// If outside scope of current syllable - return no match
			if ($this->restrictToSyllable && isset($this->OTLdata[$checkpos]['syllable']) && $this->OTLdata[$checkpos]['syllable'] != $current_syllable) {
				return false;
			} elseif (!isset($this->OTLdata[$checkpos]) || $this->OTLdata[$checkpos]['uni'] != $Lookahead[$i]) {
				return false;
			}
		}

		return $matched;
	}
433980
public function matchesRequest()
    {
        return $this->event->get('token') === $this->config->get('token') && $this->event->get('type') === 'MESSAGE';
    }
276159
public function match() {
        $matchedInterceptors = [];
        foreach ($this->interceptors as $interceptor => $rawPatterns) {
            if ($this->isMatch($rawPatterns)) {
                $matchedInterceptors[] = $interceptor;
            }
        }

        return $matchedInterceptors;
    }
214277
public function accept()
    {
        if ($this->mode & self::FILTER_BY_PATH) {
            $value = $this->getCurrentResource()->getPath();
        } else {
            $value = $this->getCurrentResource()->getName();
        }

        if ($this->mode & self::MATCH_PREFIX) {
            return 0 === strpos($value, $this->pattern);
        } elseif ($this->mode & self::MATCH_SUFFIX) {
            return $this->pattern === substr($value, -$this->patternLength);
        } else {
            return preg_match($this->pattern, $value);
        }
    }