public static function hydrate(stdClass $validator)
    {
        $hydrated = new ValidatorEntity();

        if (isset($validator->id)) {
            $hydrated->setId($validator->id);
        }

        if (isset($validator->class)) {
            $hydrated->setClass($validator->class);
        }

        if (isset($validator->method)) {
            $hydrated->setMethod($validator->method);
        }

        if (isset($validator->parameter)) {
            $hydrated->setParameter($validator->parameter);
        }

        if (isset($validator->characters)) {
            $hydrated->setCharacters($validator->characters);
        }

        if (isset($validator->issueType)) {
            $hydrated->setIssueType(TypeHydrator::hydrate($validator->issueType));
        }

        return $hydrated;
    }
public static function hydrate(stdClass $validator)
    {
        $hydrated = new ValidatorEntity();

        if (isset($validator->id)) {
            $hydrated->setId($validator->id);
        }

        if (isset($validator->class)) {
            $hydrated->setClass($validator->class);
        }

        if (isset($validator->method)) {
            $hydrated->setMethod($validator->method);
        }

        if (isset($validator->parameter)) {
            $hydrated->setParameter($validator->parameter);
        }

        if (isset($validator->characters)) {
            $hydrated->setCharacters($validator->characters);
        }

        if (isset($validator->issueType)) {
            $hydrated->setIssueType(TypeHydrator::hydrate($validator->issueType));
        }

        return $hydrated;
    }
public static function hydrate ( stdClass $ validator ) { $ hydrated = new ValidatorEntity ( ) ; if ( isset ( $ validator -> id ) ) { $ hydrated -> setId ( $ validator -> id ) ; } if ( isset ( $ validator -> class ) ) { $ hydrated -> setClass ( $ validator -> class ) ; } if ( isset ( $ validator -> method ) ) { $ hydrated -> setMethod ( $ validator -> method ) ; } if ( isset ( $ validator -> parameter ) ) { $ hydrated -> setParameter ( $ validator -> parameter ) ; } if ( isset ( $ validator -> characters ) ) { $ hydrated -> setCharacters ( $ validator -> characters ) ; } if ( isset ( $ validator -> issueType ) ) { $ hydrated -> setIssueType ( TypeHydrator :: hydrate ( $ validator -> issueType ) ) ; } return $ hydrated ; }
Hydrate a validator object into a ValidatorEntity object

@param stdClass $validator
@return ValidatorEntity
Hydrate a validator object into a ValidatorEntity object