1 | <?php |
||
13 | class Goldenpay |
||
14 | { |
||
15 | /** |
||
16 | * @var Application |
||
17 | */ |
||
18 | private $application; |
||
19 | /** |
||
20 | * @var Library |
||
21 | */ |
||
22 | private $goldenpay; |
||
23 | |||
24 | /** |
||
25 | * Goldenpay constructor. |
||
26 | * |
||
27 | * @param Application $application |
||
28 | * @param Repository $config |
||
29 | * @param PaymentInterface $goldenpay |
||
30 | */ |
||
31 | public function __construct(Application $application, Repository $config, PaymentInterface $goldenpay) |
||
41 | |||
42 | /** |
||
43 | * @param int $amount |
||
44 | * @param CardType $cardType |
||
45 | * @param string $description |
||
46 | * @param Language|null $lang |
||
47 | * |
||
48 | * @throws \Orkhanahmadov\Goldenpay\Exceptions\GoldenpayPaymentKeyException |
||
49 | * |
||
50 | * @return Payment |
||
51 | */ |
||
52 | public function payment(int $amount, CardType $cardType, string $description, ?Language $lang = null): Payment |
||
66 | |||
67 | /** |
||
68 | * @param Payment|string $payment |
||
69 | * |
||
70 | * @return Payment |
||
71 | */ |
||
72 | public function result($payment): Payment |
||
90 | |||
91 | /** |
||
92 | * @return Language |
||
93 | */ |
||
94 | private function languageFromLocale(): Language |
||
104 | } |
||
105 |
Our type inference engine has found a suspicous assignment of a value to a property. This check raises an issue when a value that can be of a given class or a super-class is assigned to a property that is type hinted more strictly.
Either this assignment is in error or an instanceof check should be added for that assignment.