Completed
Push — master ( 0a5fc3...541120 )
by Andrii
02:19
created

Sale   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 41
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Test Coverage

Coverage 0%

Importance

Changes 0
Metric Value
wmc 1
lcom 0
cbo 0
dl 0
loc 41
ccs 0
cts 13
cp 0
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 13 1
1
<?php
2
/**
3
 * PHP Billing Library
4
 *
5
 * @link      https://github.com/hiqdev/php-billing
6
 * @package   php-billing
7
 * @license   BSD-3-Clause
8
 * @copyright Copyright (c) 2017, HiQDev (http://hiqdev.com/)
9
 */
10
11
namespace hiqdev\php\billing\sale;
12
13
use DateTime;
14
use hiqdev\php\billing\customer\CustomerInterface;
15
use hiqdev\php\billing\plan\PlanInterface;
16
use hiqdev\php\billing\target\TargetInterface;
17
18
/**
19
 * Sale.
20
 *
21
 * @author Andrii Vasyliev <[email protected]>
22
 */
23
class Sale implements SaleInterface
24
{
25
    /**
26
     * @var int
27
     */
28
    protected $id;
29
30
    /**
31
     * @var TargetInterface
32
     */
33
    protected $target;
34
35
    /**
36
     * @var CustomerInterface
37
     */
38
    protected $customer;
39
40
    /**
41
     * @var PlanInterface
42
     */
43
    protected $plan;
44
45
    /**
46
     * @var DateTime
47
     */
48
    protected $time;
49
50
    public function __construct(
51
                            $id,
52
        TargetInterface     $target,
53
        CustomerInterface   $customer,
54
        PlanInterface       $plan,
55
        DateTime            $time
56
    ) {
57
        $this->id = $id;
58
        $this->target = $target;
59
        $this->customer = $customer;
60
        $this->plan = $plan;
61
        $this->time = $time;
62
    }
63
}
64