Code Duplication    Length = 7-7 lines in 3 locations

src/WSDL/XML/XMLStyle/XMLDocumentStyle.php 2 locations

@@ 71-77 (lines=7) @@
68
        $types = [];
69
        foreach ($parameters as $parameter) {
70
            $node = $parameter->getNode();
71
            if ($node->isArray()) {
72
                $attributes = ['name' => $node->getSanitizedName(), 'type' => 'ns:' . $node->getNameForArray()];
73
            } elseif ($node->isObject()) {
74
                $attributes = ['name' => $node->getSanitizedName(), 'type' => 'ns:' . $node->getNameForObject()];
75
            } else {
76
                $attributes = ['name' => $node->getSanitizedName(), 'type' => 'xsd:' . $node->getType()];
77
            }
78
            $element = XMLAttributeHelper::forDOM($DOMDocument)->createElementWithAttributes('xsd:element', $attributes);
79
            $types[] = $element;
80
            $complexIfNeeded = $this->generateComplexIfNeeded($DOMDocument, $node, null, $soapVersion);
@@ 92-98 (lines=7) @@
89
    {
90
        $result = [];
91
        if ($sequenceElement) {
92
            if ($node->isArray()) {
93
                $attributes = ['name' => $node->getSanitizedName(), 'type' => 'ns:' . $node->getNameForArray()];
94
            } elseif ($node->isObject()) {
95
                $attributes = ['name' => $node->getSanitizedName(), 'type' => 'ns:' . $node->getNameForObject()];
96
            } else {
97
                $attributes = ['name' => $node->getSanitizedName(), 'type' => 'xsd:' . $node->getType()];
98
            }
99
            $elementPartElement = XMLAttributeHelper::forDOM($DOMDocument)->createElementWithAttributes('xsd:element', $attributes);
100
            $sequenceElement->appendChild($elementPartElement);
101
        }

src/WSDL/XML/XMLStyle/XMLRpcStyle.php 1 location

@@ 136-142 (lines=7) @@
133
     */
134
    private function attributes(Node $node, $nameForObject)
135
    {
136
        if ($node->isArray()) {
137
            $attributes = ['name' => $node->getSanitizedName(), 'type' => 'ns:' . $node->getNameForArray()];
138
        } elseif ($node->isObject()) {
139
            $attributes = ['name' => $nameForObject, 'element' => 'ns:' . $node->getNameForObject()];
140
        } else {
141
            $attributes = ['name' => $node->getSanitizedName(), 'type' => 'xsd:' . $node->getType()];
142
        }
143
        return $attributes;
144
    }
145
}