public static function createDefault(string $class): Rule
    {
        $rule = new Rule($class);

        $reflection = new \ReflectionClass($class);
        $properties = $reflection->getProperties();

        foreach ($properties as $property) {
            /** @var \ReflectionProperty $property */
            $rule->assign($property->getName(), $property->getName());
        }

        return $rule;
    }
public static function createDefault(string $class): Rule
    {
        $rule = new Rule($class);

        $reflection = new \ReflectionClass($class);
        $properties = $reflection->getProperties();

        foreach ($properties as $property) {
            /** @var \ReflectionProperty $property */
            $rule->assign($property->getName(), $property->getName());
        }

        return $rule;
    }
public static function createDefault ( string $ class ) : Rule { $ rule = new Rule ( $ class ) ; $ reflection = new \ ReflectionClass ( $ class ) ; $ properties = $ reflection -> getProperties ( ) ; foreach ( $ properties as $ property ) { /** @var \ReflectionProperty $property */ $ rule -> assign ( $ property -> getName ( ) , $ property -> getName ( ) ) ; } return $ rule ; }
Create rule with one-to-one mapping

@param string $class

@return Rule
Create rule with one - to - one mapping