src/Action.php
public function setFields(array $fields)
    {
        foreach ($fields as $key => $field) {
            if (!($field instanceof Field)) {
                $exMsg = sprintf(
                    'Array key `%s` is not an instance of Field',
                    $key
                );
                throw new LogicException($exMsg);
            }
        }

        $this->fields = $fields;

        return $this;
    }
public function setFields(array $fields)
    {
        foreach ($fields as $key => $field) {
            if (!($field instanceof Field)) {
                $exMsg = sprintf(
                    'Array key `%s` is not an instance of Field',
                    $key
                );
                throw new LogicException($exMsg);
            }
        }

        $this->fields = $fields;

        return $this;
    }
Set fields

@param Field[] $fields
@return $this
@throws LogicException