Code Duplication    Length = 18-19 lines in 2 locations

src/EcpayLogisticsApi.php 2 locations

@@ 138-156 (lines=19) @@
135
     * @param array $params
136
     * @return array
137
     */
138
    public function createPrintUnimartC2CBillTransaction(array $params)
139
    {
140
        // 參數初始化
141
        $this->sdk->Send = array_merge($this->sdk->Send, [
142
            'AllPayLogisticsID' => '',
143
            'CVSPaymentNo' => '',
144
            'CVSValidationNo' => '',
145
            'PlatformID' => '',
146
        ]);
147
148
        $this->sdk->Send = array_replace(
149
            $this->sdk->Send,
150
            array_intersect_key($params, $this->sdk->Send)
151
        );
152
153
        return $this->sdk->formToArray(
154
            $this->sdk->PrintUnimartC2CBill()
155
        );
156
    }
157
158
    /**
159
     * 全家列印小白單(全家超商C2C).
@@ 164-181 (lines=18) @@
161
     * @param array $params
162
     * @return array
163
     */
164
    public function createPrintFamilyC2CBillTransaction(array $params)
165
    {
166
        // 參數初始化
167
        $this->sdk->Send = array_merge($this->sdk->Send, [
168
            'AllPayLogisticsID' => '',
169
            'CVSPaymentNo' => '',
170
            'PlatformID' => '',
171
        ]);
172
173
        $this->sdk->Send = array_replace(
174
            $this->sdk->Send,
175
            array_intersect_key($params, $this->sdk->Send)
176
        );
177
178
        return $this->sdk->formToArray(
179
            $this->sdk->PrintUnimartC2CBill()
180
        );
181
    }
182
183
    /**
184
     * createTransaction.