app/Statistics.php
private function getTags(string $text): array
    {
        $tags    = [];
        $matches = [];

        preg_match_all('/#([^#]+)#/', $text, $matches, PREG_SET_ORDER);

        foreach ($matches as $match) {
            $params = explode(':', $match[1]);
            $method = array_shift($params);

            if (method_exists($this, $method)) {
                $tags[$match[0]] = $this->$method(...$params);
            }
        }

        return $tags;
    }
private function getTags(string $text): array
    {
        $tags    = [];
        $matches = [];

        preg_match_all('/#([^#]+)#/', $text, $matches, PREG_SET_ORDER);

        foreach ($matches as $match) {
            $params = explode(':', $match[1]);
            $method = array_shift($params);

            if (method_exists($this, $method)) {
                $tags[$match[0]] = $this->$method(...$params);
            }
        }

        return $tags;
    }
private function getTags ( string $ text ) : array { $ tags = [ ] ; $ matches = [ ] ; preg_match_all ( '/#([^#]+)#/' , $ text , $ matches , PREG_SET_ORDER ) ; foreach ( $ matches as $ match ) { $ params = explode ( ':' , $ match [ 1 ] ) ; $ method = array_shift ( $ params ) ; if ( method_exists ( $ this , $ method ) ) { $ tags [ $ match [ 0 ] ] = $ this -> $ method ( ... $ params ) ; } } return $ tags ; }
Get tags and their parsed results.

@param string $text

@return string[]
Get tags and their parsed results .