Code Duplication    Length = 19-19 lines in 3 locations

src/Bpost/Order/Box/Option/AutomaticSecondPresentation.php 1 location

@@ 12-30 (lines=19) @@
9
 * @copyright Copyright (c), Tijs Verkoyen. All rights reserved.
10
 * @license   BSD License
11
 */
12
class AutomaticSecondPresentation extends Option
13
{
14
    /**
15
     * Return the object as an array for usage in the XML
16
     *
17
     * @param  \DomDocument $document
18
     * @param  string       $prefix
19
     * @return \DomElement
20
     */
21
    public function toXML(\DOMDocument $document, $prefix = null)
22
    {
23
        $tagName = 'automaticSecondPresentation';
24
        if ($prefix !== null) {
25
            $tagName = $prefix . ':' . $tagName;
26
        }
27
28
        return $document->createElement($tagName);
29
    }
30
}
31

src/Bpost/Order/Box/Option/SaturdayDelivery.php 1 location

@@ 15-33 (lines=19) @@
12
 * @copyright Copyright (c), Tijs Verkoyen. All rights reserved.
13
 * @license   BSD License
14
 */
15
class SaturdayDelivery extends Option
16
{
17
    /**
18
     * Return the object as an array for usage in the XML
19
     *
20
     * @param  DomDocument $document
21
     * @param  string      $prefix
22
     * @return DomElement
23
     */
24
    public function toXML(DOMDocument $document, $prefix = 'common')
25
    {
26
        $tagName = 'saturdayDelivery';
27
        if ($prefix !== null) {
28
            $tagName = $prefix . ':' . $tagName;
29
        }
30
31
        return $document->createElement($tagName);
32
    }
33
}
34

src/Bpost/Order/Box/Option/Signature.php 1 location

@@ 12-30 (lines=19) @@
9
 * @copyright Copyright (c), Tijs Verkoyen. All rights reserved.
10
 * @license   BSD License
11
 */
12
class Signature extends Option
13
{
14
    /**
15
     * Return the object as an array for usage in the XML
16
     *
17
     * @param  \DomDocument $document
18
     * @param  string       $prefix
19
     * @return \DomElement
20
     */
21
    public function toXML(\DOMDocument $document, $prefix = null)
22
    {
23
        $tagName = 'signed';
24
        if ($prefix !== null) {
25
            $tagName = $prefix . ':' . $tagName;
26
        }
27
28
        return $document->createElement($tagName);
29
    }
30
}
31