1 | <?php |
||
8 | class lightConnector { |
||
9 | |||
10 | /** |
||
11 | * Connecting method |
||
12 | * @var string |
||
13 | */ |
||
14 | protected $method = null; |
||
15 | |||
16 | /** |
||
17 | * URI part for API calls |
||
18 | * @var string |
||
19 | */ |
||
20 | protected $uri = null; |
||
21 | |||
22 | /** |
||
23 | * Instance of shop configuration |
||
24 | * @var object |
||
25 | */ |
||
26 | protected $config = null; |
||
27 | |||
28 | /** |
||
29 | * Holds the klarna orderid |
||
30 | * @var string |
||
31 | */ |
||
32 | protected $klarnaOrderId = null; |
||
33 | |||
34 | /** |
||
35 | * TransactionId of an existing order |
||
36 | * @var string |
||
37 | */ |
||
38 | protected $transactionId = null; |
||
39 | |||
40 | protected $apiUrl = array('live'=>'https://api.klarna.com/','test'=>'https://api.playground.klarna.com/'); |
||
41 | |||
42 | /** |
||
43 | * Creates an instance of light connector |
||
44 | * |
||
45 | * @param type $config |
||
46 | * @param type $method |
||
|
|||
47 | */ |
||
48 | public function __construct($config, $method = null) { |
||
53 | |||
54 | /** |
||
55 | * Sets method of requesting API |
||
56 | * |
||
57 | * @param string $method |
||
58 | * @return void |
||
59 | */ |
||
60 | public function setMethod($method) { |
||
63 | |||
64 | /** |
||
65 | * Sets klarna order id |
||
66 | * |
||
67 | * @param string $klarnaOrderId |
||
68 | * @return void |
||
69 | */ |
||
70 | public function setKlarnaOrderId($klarnaOrderId) { |
||
73 | |||
74 | /** |
||
75 | * Adds transactionId |
||
76 | * |
||
77 | * @param string $transactionId |
||
78 | */ |
||
79 | public function setTransactionId($transactionId) { |
||
82 | |||
83 | /** |
||
84 | * Updates customer addresses |
||
85 | * |
||
86 | * @param array $billingAddress |
||
87 | * @param array $shippingAddress |
||
88 | * @return void |
||
89 | */ |
||
90 | public function updateCustomerAddress($billingAddress, $shippingAddress = false) { |
||
93 | |||
94 | /** |
||
95 | * Performs an API-Call |
||
96 | * |
||
97 | * @param array $data |
||
98 | */ |
||
99 | protected function setCall($data) { |
||
114 | |||
115 | } |
||
116 |
This check looks for
@param
annotations where the type inferred by our type inference engine differs from the declared type.It makes a suggestion as to what type it considers more descriptive.
Most often this is a case of a parameter that can be null in addition to its declared types.