Code Duplication    Length = 17-17 lines in 2 locations

src/API/BaseApi.php 2 locations

@@ 68-84 (lines=17) @@
65
     *
66
     * @return bool|array 接口返回的结果
67
     */
68
    final protected function _get($node, array $queryStr, $arsort = true)
69
    {
70
        if (!is_array($queryStr)) {
71
            $this->setError('参数必须为一个数组');
72
73
            return false;
74
        }
75
76
        $module  = $this->module;
77
        $apitype = $this->apitype;
78
79
        if ($this->module != $this->className) {
80
            $this->module = $this->className;
81
        }
82
83
        return Api::_get($module, $node, $queryStr, $arsort, $apitype);
84
    }
85
86
    /**
87
     * post发送数据.
@@ 99-115 (lines=17) @@
96
     *
97
     * @return bool|array 接口返回的结果
98
     */
99
    final protected function _post($node, array $data, $jsonEncode = true)
100
    {
101
        if (!is_array($data)) {
102
            $this->setError('参数必须为一个数组');
103
104
            return false;
105
        }
106
107
        $module  = $this->module;
108
        $apitype = $this->apitype;
109
110
        if ($this->module != $this->className) {
111
            $this->module = $this->className;
112
        }
113
114
        return Api::_post($module, $node, $data, $jsonEncode, $apitype);
115
    }
116
117
    /**
118
     * 设置错误信息.