private function fetchMessages(\ReflectionClass $reflection, bool $inherit = false)
    {
        $target = $reflection->getDefaultProperties() + $reflection->getConstants();

        foreach ($reflection->getProperties() as $property) {
            if (is_string($property->getDocComment()) && strpos($property->getDocComment(), "@do-not-index")) {
                unset($target[$property->getName()]);
            }
        }

        $strings = [];
        array_walk_recursive($target, function ($value) use (&$strings) {
            if (is_string($value) && Translator::isMessage($value)) {
                $strings[] = $this->prepareMessage($value);
            }
        });

        if ($inherit && $reflection->getParentClass()) {
            //Joining strings data with parent class values (inheritance ON) - resolved into same
            //domain on export
            $strings = array_merge(
                $strings,
                $this->fetchMessages($reflection->getParentClass(), true)
            );
        }

        return $strings;
    }