Code Duplication    Length = 5-5 lines in 4 locations

src/vnpayment/PaymentGateway.php 1 location

@@ 184-188 (lines=5) @@
181
        ];
182
183
        $data = [];
184
        foreach ($params as $param) {
185
            if (($value = $request->get($param)) !== null) {
186
                $data[$param] = $value;
187
            }
188
        }
189
190
        return $data;
191
    }

src/onepay/PaymentGateway.php 1 location

@@ 178-182 (lines=5) @@
175
176
        $data = [];
177
178
        foreach ($params as $param) {
179
            if (($value = $request->get($param)) !== null) {
180
                $data[$param] = $value;
181
            }
182
        }
183
184
        return $data;
185
    }

src/vtcpay/PaymentGateway.php 1 location

@@ 137-141 (lines=5) @@
134
135
        $data = [];
136
137
        foreach ($params as $param) {
138
            if (($value = call_user_func([$request, $requestMethod], $param)) !== null) {
139
                $data[$param] = $value;
140
            }
141
        }
142
143
        return $data;
144
    }

src/baokim/PaymentGateway.php 1 location

@@ 317-321 (lines=5) @@
314
        $requestMethod = $commandRequestMethods[$command];
315
        $data = [];
316
317
        foreach ($params as $param) {
318
            if (($value = call_user_func([$request, $requestMethod], $param)) !== null) {
319
                $data[$param] = $value;
320
            }
321
        }
322
323
        return $data;
324
    }