1 | <?php |
||
14 | class Goldenpay |
||
15 | { |
||
16 | /** |
||
17 | * @var Application |
||
18 | */ |
||
19 | private $application; |
||
20 | /** |
||
21 | * @var Repository |
||
22 | */ |
||
23 | private $config; |
||
24 | /** |
||
25 | * @var PaymentEvent |
||
26 | */ |
||
27 | private $event; |
||
28 | /** |
||
29 | * @var Library |
||
30 | */ |
||
31 | private $goldenpay; |
||
32 | |||
33 | /** |
||
34 | * Goldenpay constructor. |
||
35 | * |
||
36 | * @param Application $application |
||
37 | * @param Repository $config |
||
38 | * @param PaymentEvent $event |
||
39 | * @param PaymentInterface $goldenpay |
||
40 | */ |
||
41 | public function __construct( |
||
52 | |||
53 | /** |
||
54 | * Authenticates with Goldenpay using configured "auth_key" and "merchant_name". |
||
55 | * |
||
56 | * @return PaymentInterface |
||
57 | */ |
||
58 | private function authenticate(): PaymentInterface |
||
71 | |||
72 | /** |
||
73 | * Creates new payment base on passed credentials. |
||
74 | * |
||
75 | * @param int $amount |
||
76 | * @param CardType $cardType |
||
77 | * @param string $description |
||
78 | * @param Language|null $lang |
||
79 | * |
||
80 | * @throws \Orkhanahmadov\Goldenpay\Exceptions\GoldenpayPaymentKeyException |
||
81 | * |
||
82 | * @return Payment |
||
83 | */ |
||
84 | public function payment(int $amount, CardType $cardType, string $description, ?Language $lang = null): Payment |
||
102 | |||
103 | /** |
||
104 | * Checks payment result with given payment_key or Payment instance. |
||
105 | * |
||
106 | * @param Payment|string $payment |
||
107 | * |
||
108 | * @return Payment |
||
109 | */ |
||
110 | public function result($payment): Payment |
||
133 | |||
134 | /** |
||
135 | * @return Language |
||
136 | */ |
||
137 | private function languageFromLocale(): Language |
||
147 | } |
||
148 |
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.