src/Object/PropertiesValidator.php
public function addProperty(
        string $property,
        ValidatorInterface $validator,
        bool $optional = null
    ): PropertiesValidator {
        $this->properties[$property] = new Property($property, $validator, $optional);

        return $this;
    }
public function addProperty(
        string $property,
        ValidatorInterface $validator,
        bool $optional = null
    ): PropertiesValidator {
        $this->properties[$property] = new Property($property, $validator, $optional);

        return $this;
    }
Add $validator for $property.

An existing validator for $property will be overwritten.

@param string             $property
@param ValidatorInterface $validator
@param bool|null          $optional
@return PropertiesValidator