Receiver   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 12
Duplicated Lines 0 %

Importance

Changes 2
Bugs 0 Features 0
Metric Value
wmc 1
eloc 4
c 2
b 0
f 0
dl 0
loc 12
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A createFromXML() 0 5 1
1
<?php
2
declare(strict_types=1);
3
4
namespace Bpost\BpostApiClient\Bpost\Order;
5
6
use Bpost\BpostApiClient\Exception\BpostLogicException\BpostInvalidLengthException;
7
use SimpleXMLElement;
8
9
/**
10
 * bPost Receiver class
11
 *
12
 * @author Tijs Verkoyen <[email protected]>
13
 */
14
class Receiver extends Customer
15
{
16
    public const TAG_NAME = 'receiver';
17
18
    /**
19
     * @throws BpostInvalidLengthException
20
     */
21
    public static function createFromXML(SimpleXMLElement $xml): self
22
    {
23
        /** @var self $receiver */
24
        $receiver = parent::createFromXMLHelper($xml, new self());
25
        return $receiver;
26
    }
27
}