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;
    }
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;
    }
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 ; }
Get the data to be validated.

@param object $command

@return array
Get the data to be validated .