1 | <?php |
||
15 | class Goldenpay |
||
16 | { |
||
17 | /** |
||
18 | * @var Application |
||
19 | */ |
||
20 | private $application; |
||
21 | /** |
||
22 | * @var Library |
||
23 | */ |
||
24 | private $goldenpay; |
||
25 | |||
26 | /** |
||
27 | * Goldenpay constructor. |
||
28 | * |
||
29 | * @param Application $application |
||
30 | * @param Repository $config |
||
31 | * @param PaymentInterface $goldenpay |
||
32 | */ |
||
33 | public function __construct(Application $application, Repository $config, PaymentInterface $goldenpay) |
||
43 | |||
44 | /** |
||
45 | * @param int $amount |
||
46 | * @param CardType $cardType |
||
47 | * @param string $description |
||
48 | * @param Language|null $lang |
||
49 | * |
||
50 | * @throws \Orkhanahmadov\Goldenpay\Exceptions\GoldenpayPaymentKeyException |
||
51 | * |
||
52 | * @return PaymentKey |
||
53 | */ |
||
54 | public function paymentKey(int $amount, CardType $cardType, string $description, ?Language $lang = null): PaymentKey |
||
70 | |||
71 | public function paymentResult($paymentKey): PaymentResult |
||
75 | |||
76 | /** |
||
77 | * @return Language |
||
78 | */ |
||
79 | private function languageFromLocale(): Language |
||
89 | } |
||
90 |
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.