1 | <?php |
||
12 | class Invoice |
||
13 | { |
||
14 | use AttributesTrait; |
||
15 | |||
16 | /** |
||
17 | * @var string Invoice serial number |
||
18 | */ |
||
19 | private $serial; |
||
20 | |||
21 | /** |
||
22 | * @var AgentInterface Registered seller |
||
23 | */ |
||
24 | private $seller; |
||
25 | |||
26 | /** |
||
27 | * @var AgentInterface Registered buyer |
||
28 | */ |
||
29 | private $buyer; |
||
30 | |||
31 | /** |
||
32 | * @var string Payment reference number |
||
33 | */ |
||
34 | private $ocr; |
||
35 | |||
36 | /** |
||
37 | * @var ItemBasket Container for charged items |
||
38 | */ |
||
39 | private $itemBasket = []; |
||
40 | |||
41 | /** |
||
42 | * @var \DateTimeImmutable Creation date |
||
43 | */ |
||
44 | private $billDate; |
||
45 | |||
46 | /** |
||
47 | * @var integer Number of days before invoice expires |
||
48 | */ |
||
49 | private $expiresAfter; |
||
50 | |||
51 | /** |
||
52 | * @var Amount Prepaid amound to deduct |
||
53 | */ |
||
54 | private $deduction; |
||
55 | |||
56 | /** |
||
57 | * Construct invoice |
||
58 | * |
||
59 | * @param string $serial Invoice serial number |
||
60 | * @param AgentInterface $seller Registered seller |
||
61 | * @param AgentInterface $buyer Registered buyer |
||
62 | * @param string $message Invoice message |
||
|
|||
63 | * @param string $ocr Payment reference number |
||
64 | * @param ItemBasket $itemBasket Container for charged items |
||
65 | * @param \DateTimeImmutable $billDate Date of invoice creation |
||
66 | * @param integer $expiresAfter Nr of days before invoice expires |
||
67 | * @param Amount $deduction Prepaid amound to deduct |
||
68 | */ |
||
69 | 15 | public function __construct( |
|
88 | |||
89 | /** |
||
90 | * Get invoice serial number |
||
91 | */ |
||
92 | 1 | public function getSerial(): string |
|
96 | |||
97 | /** |
||
98 | * Get seller |
||
99 | */ |
||
100 | 1 | public function getSeller(): AgentInterface |
|
104 | |||
105 | /** |
||
106 | * Get buyer |
||
107 | */ |
||
108 | 1 | public function getBuyer(): AgentInterface |
|
112 | |||
113 | /** |
||
114 | * Get invoice reference number |
||
115 | */ |
||
116 | 4 | public function getOcr(): string |
|
120 | |||
121 | /** |
||
122 | * Get item container |
||
123 | */ |
||
124 | 4 | public function getItems(): ItemBasket |
|
128 | |||
129 | /** |
||
130 | * Get charged amount (including VAT and deduction) |
||
131 | */ |
||
132 | 3 | public function getInvoiceTotal(): Amount |
|
136 | |||
137 | /** |
||
138 | * Get date of invoice creation |
||
139 | */ |
||
140 | 3 | public function getBillDate(): \DateTimeImmutable |
|
144 | |||
145 | /** |
||
146 | * Get number of days before invoice expires |
||
147 | */ |
||
148 | 1 | public function getExpiresAfter(): int |
|
152 | |||
153 | /** |
||
154 | * Get date when invoice expires |
||
155 | */ |
||
156 | 1 | public function getExpirationDate(): \DateTimeImmutable |
|
164 | |||
165 | /** |
||
166 | * Get prepaid amound to deduct |
||
167 | */ |
||
168 | 5 | public function getDeduction(): Amount |
|
176 | } |
||
177 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.
Consider the following example. The parameter
$italy
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was removed, but the annotation was not.