AutomaticSecondPresentation::toXML()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
nc 1
nop 2
1
<?php
2
declare(strict_types=1);
3
4
namespace Bpost\BpostApiClient\Bpost\Order\Box\Option;
5
6
use Bpost\BpostApiClient\Common\XmlHelper;
7
use DOMDocument;
8
use DOMElement;
9
use SimpleXMLElement;
10
11
/**
12
 * bPost AutomaticSecondPresentation class
13
 *
14
 * @author    Tijs Verkoyen <[email protected]>
15
 *
16
 * @version   3.0.0
17
 *
18
 * @copyright Copyright (c), Tijs Verkoyen. All rights reserved.
19
 * @license   BSD License
20
 */
21
class AutomaticSecondPresentation extends Option
22
{
23
    /**
24
     * @throws \DOMException
25
     */
26
    public function toXML(DOMDocument $document, ?string $prefix = 'common'): DOMElement
27
    {
28
        return $document->createElement(
29
            XmlHelper::getPrefixedTagName('automaticSecondPresentation', $prefix)
30
        );
31
    }
32
33
    public static function createFromXML(SimpleXMLElement $xml): static
0 ignored issues
show
Unused Code introduced by
The parameter $xml is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

33
    public static function createFromXML(/** @scrutinizer ignore-unused */ SimpleXMLElement $xml): static

This check looks for parameters that have been defined for a function or method, but which are not used in the method body.

Loading history...
34
    {
35
        return new static();
36
    }
37
}