src/Metadata/Property/PropertyMetadata.php
public function withRequired(bool $required): self
    {
        $metadata = clone $this;
        $metadata->required = $required;

        return $metadata;
    }
public function withRequired(bool $required): self
    {
        $metadata = clone $this;
        $metadata->required = $required;

        return $metadata;
    }
public function withRequired ( bool $ required ) : self { $ metadata = clone $ this ; $ metadata -> required = $ required ; return $ metadata ; }
Returns a new instance with the given required flag.
Returns a new instance with the given required flag .