protected function getData($command)
    {
        $data = [];

        foreach ((new ReflectionClass($command))->getProperties(ReflectionProperty::IS_PUBLIC) as $property) {
            $name = $property->getName();
            $value = $property->getValue($command);

            if (in_array($name, ['rules', 'validationMessages'], true)) {
                continue;
            }

            $data[$name] = $value;
        }

        return $data;
    }