We have several set*Metadata(...) and set*Tags(...) method in the source code.
We should improve those methods by calling a validator for the metadata and tags property, for example.
public function setMetadata(array $metadata = [])
{
// Validates the metadata
$this->metadataValidator->validate($metadata);
// Sets the metadata
$this->metadata = $metadata;
// Returns this instance
return $this;
}
So we should create a \Gomoob\WebSocket\Validator\MetadataValidator class and a \Gomoob\WebSocket\Validator\TagsValidator class.
We have several
set*Metadata(...)andset*Tags(...)method in the source code.We should improve those methods by calling a validator for the
metadataandtagsproperty, for example.So we should create a
\Gomoob\WebSocket\Validator\MetadataValidatorclass and a\Gomoob\WebSocket\Validator\TagsValidatorclass.