public function flattenTree(string $propertyName, array &$result, array $level = [], string $messageTypeFilter = null)
    {
        if (count($this->$propertyName) > 0) {
            $propertyPath = implode('.', $level);
            $result[$propertyPath] = $this->filterMessages($this->$propertyName, $messageTypeFilter);
        }
        /** @var Result $subResult */
        foreach ($this->propertyResults as $subPropertyName => $subResult) {
            array_push($level, $subPropertyName);
            $subResult->flattenTree($propertyName, $result, $level, $messageTypeFilter);
            array_pop($level);
        }
    }