protected function optimizeStringField()
    {
        if (empty($this->field->methodParams) && in_array($this->field->dataType, ['string', 'char']) && !empty($this->parser->getMaxLength())) {
            $this->field->methodParams[] = $this->parser->getMaxLength();
        }

        return $this;
    }
protected function optimizeStringField()
    {
        if (empty($this->field->methodParams) && in_array($this->field->dataType, ['string', 'char']) && !empty($this->parser->getMaxLength())) {
            $this->field->methodParams[] = $this->parser->getMaxLength();
        }

        return $this;
    }
protected function optimizeStringField ( ) { if ( empty ( $ this -> field -> methodParams ) && in_array ( $ this -> field -> dataType , [ 'string' , 'char' ] ) && ! empty ( $ this -> parser -> getMaxLength ( ) ) ) { $ this -> field -> methodParams [ ] = $ this -> parser -> getMaxLength ( ) ; } return $ this ; }
If the "data-type-params" is not set, and the dataType is string,
yet the validation rules has a max value, create data-type-parameter


@return $this
If the data - type - params is not set and the dataType is string yet the validation rules has a max value create data - type - parameter