Code Duplication    Length = 13-13 lines in 3 locations

app/Vendor/PagSeguro/source/PagSeguroLibrary/parser/PagSeguroAuthorizationParser.class.php 1 location

@@ 66-78 (lines=13) @@
63
        }
64
65
        // parameter
66
        if (count($authorization->getParameter()->getItems()) > 0) {
67
            foreach ($authorization->getParameter()->getItems() as $item) {
68
                if ($item instanceof PagSeguroParameterItem) {
69
                    if (!PagSeguroHelper::isEmpty($item->getKey()) && !PagSeguroHelper::isEmpty($item->getValue())) {
70
                        if (!PagSeguroHelper::isEmpty($item->getGroup())) {
71
                            $data[$item->getKey() . '' . $item->getGroup()] = $item->getValue();
72
                        } else {
73
                            $data[$item->getKey()] = $item->getValue();
74
                        }
75
                    }
76
                }
77
            }
78
        }
79
        
80
        return $data;
81
    }

app/Vendor/PagSeguro/source/PagSeguroLibrary/parser/PagSeguroDirectPaymentParser.class.php 1 location

@@ 299-311 (lines=13) @@
296
        }
297
298
        // parameter
299
        if (count($payment->getParameter()->getItems()) > 0) {
300
            foreach ($payment->getParameter()->getItems() as $item) {
301
                if ($item instanceof PagSeguroParameterItem) {
302
                    if (!PagSeguroHelper::isEmpty($item->getKey()) && !PagSeguroHelper::isEmpty($item->getValue())) {
303
                        if (!PagSeguroHelper::isEmpty($item->getGroup())) {
304
                            $data[$item->getKey() . '' . $item->getGroup()] = $item->getValue();
305
                        } else {
306
                            $data[$item->getKey()] = $item->getValue();
307
                        }
308
                    }
309
                }
310
            }
311
        }
312
        return $data;   
313
    }
314

app/Vendor/PagSeguro/source/PagSeguroLibrary/parser/PagSeguroPaymentParser.class.php 1 location

@@ 216-228 (lines=13) @@
213
        }
214
215
        // parameter
216
        if (count($payment->getParameter()->getItems()) > 0) {
217
            foreach ($payment->getParameter()->getItems() as $item) {
218
                if ($item instanceof PagSeguroParameterItem) {
219
                    if (!PagSeguroHelper::isEmpty($item->getKey()) && !PagSeguroHelper::isEmpty($item->getValue())) {
220
                        if (!PagSeguroHelper::isEmpty($item->getGroup())) {
221
                            $data[$item->getKey() . '' . $item->getGroup()] = $item->getValue();
222
                        } else {
223
                            $data[$item->getKey()] = $item->getValue();
224
                        }
225
                    }
226
                }
227
            }
228
        }
229
        return $data;
230
    }
231