Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create metadata and tags validators #6

Open
bgaillard opened this issue Aug 18, 2016 · 0 comments
Open

Create metadata and tags validators #6

bgaillard opened this issue Aug 18, 2016 · 0 comments
Assignees
Milestone

Comments

@bgaillard
Copy link
Member

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.

@bgaillard bgaillard added this to the 1.3.0 milestone Aug 18, 2016
@bgaillard bgaillard self-assigned this Aug 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant