Skip to content

Create metadata and tags validators #6

@bgaillard

Description

@bgaillard

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions