1 | <?php declare(strict_types = 1); |
||
12 | final class PaymentService |
||
13 | { |
||
14 | /** |
||
15 | * @var Client |
||
16 | */ |
||
17 | private $client; |
||
18 | |||
19 | /** |
||
20 | * @var Id |
||
21 | */ |
||
22 | private $userId; |
||
23 | |||
24 | /** |
||
25 | * @var Id |
||
26 | */ |
||
27 | private $monetaryAccountId; |
||
28 | |||
29 | /** |
||
30 | * @param Client $client |
||
31 | */ |
||
32 | public function __construct(Client $client, Id $userId, Id $monetaryAccountId) |
||
38 | |||
39 | /** |
||
40 | * @return Payment[] |
||
41 | */ |
||
42 | public function all(): array |
||
50 | |||
51 | /** |
||
52 | * This method performs a payment and returns a payment Id |
||
53 | * |
||
54 | * @param Money $money |
||
55 | * @param Alias $alias |
||
56 | * @param string $description |
||
57 | * @param Id[] $attachments, |
||
|
|||
58 | * @param string $merchantReference |
||
59 | * @return Id |
||
60 | */ |
||
61 | public function pay( |
||
94 | } |
||
95 |
This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function. It has, however, found a similar but not annotated parameter which might be a good fit.
Consider the following example. The parameter
$ireland
is not defined by the methodfinale(...)
.The most likely cause is that the parameter was changed, but the annotation was not.