1 | <?php |
||
60 | $this->prototype = new class($sourceCurrencyCode, $targetCurrencyCode, $ratio) implements ExchangeRateInterface |
||
61 | { |
||
62 | |||
63 | public $id, $sourceCurrencyCode, $targetCurrencyCode, $ratio, $day; |
||
64 | |||
65 | /** |
||
66 | * constructor. |
||
67 | * @param CurrencyInterface $sourceCurrency |
||
|
|||
68 | * @param CurrencyInterface $targetCurrency |
||
69 | * @param float $ratio |
||
70 | * @param \DateTimeInterface|null $day |
||
71 | */ |
||
72 | public function __construct($sourceCurrencyCode = null, $targetCurrencyCode = null, float $ratio = null, \DateTimeInterface $day = null) |
||
73 | { |
||
74 | if (null !== $sourceCurrencyCode && null !== $targetCurrencyCode) { |
||
75 | $this->id = sprintf('%s%s', $sourceCurrencyCode, $targetCurrencyCode); |
||
76 | } |
||
77 | $this->sourceCurrencyCode = $sourceCurrencyCode; |
||
78 | $this->targetCurrencyCode = $targetCurrencyCode; |
||
79 | $this->ratio = $ratio; |
||
80 | $this->day = $day; |
||
81 | } |
||
82 | |||
83 | public function getRatio(): float |
||
87 | |||
88 | public function getSourceCurrency(): CurrencyInterface |
||
92 | |||
93 | public function getTargetCurrency(): CurrencyInterface |
||
97 | |||
98 | public function new($sourceCurrencyCode = null, $targetCurrencyCode = null, float $ratio = null, \DateTimeInterface $day = null): self |
||
102 | |||
103 | }; |
||
104 | return $this->prototype; |
||
109 |
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.