public function getMatchingCodes()
    {
        $codes = [$this->getCode()];
        foreach ($this->getChildren() as $child) {
            /** @noinspection SlowArrayOperationsInLoopInspection */
            $codes = array_merge($codes, $child->getMatchingCodes());
        }

        return $codes;
    }