public function getDataTypeParams(array $params)
    {
        $type = $this->getEloquentDataMethod();
        if (in_array($type, ['char', 'string']) && isset($params[0]) && ($length = intval($params[0])) > 0) {
            return [$length];
        }

        if (in_array($type, ['decimal', 'double', 'float'])
            && isset($params[0]) && ($length = intval($params[0])) > 0 && isset($params[1]) && ($decimal = intval($params[1])) > 0) {
            return [$length, $decimal];
        }

        if ($type == 'enum') {
            return $params;
        }

        return [];
    }
public function getDataTypeParams(array $params)
    {
        $type = $this->getEloquentDataMethod();
        if (in_array($type, ['char', 'string']) && isset($params[0]) && ($length = intval($params[0])) > 0) {
            return [$length];
        }

        if (in_array($type, ['decimal', 'double', 'float'])
            && isset($params[0]) && ($length = intval($params[0])) > 0 && isset($params[1]) && ($decimal = intval($params[1])) > 0) {
            return [$length, $decimal];
        }

        if ($type == 'enum') {
            return $params;
        }

        return [];
    }
public function getDataTypeParams ( array $ params ) { $ type = $ this -> getEloquentDataMethod ( ) ; if ( in_array ( $ type , [ 'char' , 'string' ] ) && isset ( $ params [ 0 ] ) && ( $ length = intval ( $ params [ 0 ] ) ) > 0 ) { return [ $ length ] ; } if ( in_array ( $ type , [ 'decimal' , 'double' , 'float' ] ) && isset ( $ params [ 0 ] ) && ( $ length = intval ( $ params [ 0 ] ) ) > 0 && isset ( $ params [ 1 ] ) && ( $ decimal = intval ( $ params [ 1 ] ) ) > 0 ) { return [ $ length , $ decimal ] ; } if ( $ type == 'enum' ) { return $ params ; } return [ ] ; }
Gets the data type parameters for the given type.

@param array $params

@return array
Gets the data type parameters for the given type .