Matcher/Dumper/PhpMatcherDumper.php
private function generateMatchMethod(): string
    {
        // Group hosts by same-suffix, re-order when possible
        $routes = new StaticPrefixCollection();
        foreach ($this->getRoutes()->all() as $name => $route) {
            $routes->addRoute('/(.*)', [$name, $route]);
        }

        $routes = $this->getRoutes();

        $code = rtrim($this->compileRoutes($routes), "\n");

        $code = <<<EOF
    {
$code

EOF;

        return "    public function match(string \$channel): array\n".$code."\n        throw new ResourceNotFoundException();\n    }";
    }
private function generateMatchMethod(): string
    {
        // Group hosts by same-suffix, re-order when possible
        $routes = new StaticPrefixCollection();
        foreach ($this->getRoutes()->all() as $name => $route) {
            $routes->addRoute('/(.*)', [$name, $route]);
        }

        $routes = $this->getRoutes();

        $code = rtrim($this->compileRoutes($routes), "\n");

        $code = <<<EOF
    {
$code

EOF;

        return "    public function match(string \$channel): array\n".$code."\n        throw new ResourceNotFoundException();\n    }";
    }
private function generateMatchMethod ( ) : string { // Group hosts by same-suffix, re-order when possible $ routes = new StaticPrefixCollection ( ) ; foreach ( $ this -> getRoutes ( ) -> all ( ) as $ name => $ route ) { $ routes -> addRoute ( '/(.*)' , [ $ name , $ route ] ) ; } $ routes = $ this -> getRoutes ( ) ; $ code = rtrim ( $ this -> compileRoutes ( $ routes ) , "\n" ) ; $ code =  <<<EOF
    {
$code

EOF ; return "    public function match(string \$channel): array\n" . $ code . "\n        throw new ResourceNotFoundException();\n    }" ; }
Generates the code for the match method implementing MatcherInterface.
Generates the code for the match method implementing MatcherInterface .