public function assertValid()
    {
        parent::assertValid();

        Utils::invariant(
            ! empty($this->getFields()),
            sprintf(
                '%s fields must be an associative array with field names as keys or a callable which returns such an array.',
                $this->name
            )
        );

        foreach ($this->getFields() as $field) {
            $field->assertValid($this);
        }
    }
public function assertValid()
    {
        parent::assertValid();

        Utils::invariant(
            ! empty($this->getFields()),
            sprintf(
                '%s fields must be an associative array with field names as keys or a callable which returns such an array.',
                $this->name
            )
        );

        foreach ($this->getFields() as $field) {
            $field->assertValid($this);
        }
    }
public function assertValid ( ) { parent :: assertValid ( ) ; Utils :: invariant ( ! empty ( $ this -> getFields ( ) ) , sprintf ( '%s fields must be an associative array with field names as keys or a callable which returns such an array.' , $ this -> name ) ) ; foreach ( $ this -> getFields ( ) as $ field ) { $ field -> assertValid ( $ this ) ; } }
Validates type config and throws if one of type options is invalid.
Note: this method is shallow, it won't validate object fields and their arguments.

@throws InvariantViolation
Validates type config and throws if one of type options is invalid . Note : this method is shallow it won t validate object fields and their arguments .