gpupo/adyen-sdk

View on GitHub
src/Payment/Request/Decorator/BoletoDecorator.php

Summary

Maintainability
A
0 mins
Test Coverage

Duplicated array key shopperName, first declared at line 34.
Open

            $data = array_merge($data, [
                'shopperName'          => $this->getOrder()->getShopper()->getFullName(),
                'socialSecurityNumber' => $socialSecurityNumber,
                'billingAddress'       => $this->getOrder()->getBillingAddress()->toArray(),
                'shopperName'          => $this->getOrder()->getShopper()->getArrayName(),

DuplicatedArrayKey

Defining another value for the same key in an array literal overrides the previous key/value, which makes it effectively an unused code. If it's known from the beginning that the key will have different value, there is usually no point in defining first one.

Example

function createArray() {
    return [
        'non-associative 0element', // not applied
        0 => 'associative 0-element', // applied
        false => 'associative 0-element', // applied
        'foo' => 'bar', // not applied
        "foo" => 'baz', // applied
    ];
}

Source http://phpmd.org/rules/cleancode.html#duplicatedarraykey

There are no issues that match your filters.

Category
Status