Order   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 25
ccs 5
cts 5
cp 1
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 3 1
A serialize() 0 4 1
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: WilliamWard
5
 */
6
7
namespace GivePay\Gateway\Transactions;
8
9
final class Order
10
{
11
12
    /**
13
     * @var string The order ID
14
     */
15
    private $orderId;
16
17
    /**
18
     * Order constructor.
19
     * @param string $orderId The order Id for the order
20
     */
21 1
    public function __construct($orderId)
22
    {
23 1
        $this->orderId = $orderId;
24 1
    }
25
26
    /**
27
     * Serializes the order GPG API object
28
     * @return array serialized object
29
     */
30 1
    public function serialize()
31
    {
32
        return [
33 1
            'order_number' => $this->orderId
34
        ];
35
    }
36
}