public function getPatterns()
    {
        if (!$this->patternsCache) {
            $this->patternsCache = $this->getOption('patterns');
            usort($this->patternsCache, function (Pattern $first, Pattern $second) {
                return $first->priority - $second->priority;
            });
        }

        return $this->patternsCache;
    }