@@ -1678,7 +1678,7 @@ discard block |
||
1678 | 1678 | |
1679 | 1679 | /** |
1680 | 1680 | * |
1681 | - * @return array |
|
1681 | + * @return string |
|
1682 | 1682 | */ |
1683 | 1683 | public function getLabel() |
1684 | 1684 | { |
@@ -1715,7 +1715,7 @@ discard block |
||
1715 | 1715 | /** |
1716 | 1716 | * Creates and returns the klarna client for an event. |
1717 | 1717 | * |
1718 | - * @return \Klarna_Checkout_Connector |
|
1718 | + * @return Klarna_Checkout_ConnectorInterface |
|
1719 | 1719 | */ |
1720 | 1720 | public function onInitResourceKlarnaCheckoutConnector() |
1721 | 1721 | { |
@@ -1768,7 +1768,7 @@ discard block |
||
1768 | 1768 | |
1769 | 1769 | /** |
1770 | 1770 | * @param string $requiredVersion |
1771 | - * @return bool|mixed |
|
1771 | + * @return boolean |
|
1772 | 1772 | */ |
1773 | 1773 | protected function assertMinimumVersion($requiredVersion) |
1774 | 1774 | { |
@@ -1932,6 +1932,7 @@ discard block |
||
1932 | 1932 | * |
1933 | 1933 | * @param $config Enlight_Config |
1934 | 1934 | * @param $lastName string |
1935 | + * @param boolean $userLoggedIn |
|
1935 | 1936 | * @return bool |
1936 | 1937 | */ |
1937 | 1938 | private function getShowLoginConfig($config, $userLoggedIn) |
@@ -2035,7 +2036,7 @@ discard block |
||
2035 | 2036 | * Helper method to get the correct order for the elements |
2036 | 2037 | * |
2037 | 2038 | * @param $config Enlight_Config |
2038 | - * @return array Array with the order of the elements |
|
2039 | + * @return string[] Array with the order of the elements |
|
2039 | 2040 | */ |
2040 | 2041 | private function getPositionOrder($config) |
2041 | 2042 | { |
@@ -2334,7 +2335,7 @@ discard block |
||
2334 | 2335 | /** |
2335 | 2336 | * @param Shopware\Models\Payment\Payment $payment |
2336 | 2337 | * @param $basket |
2337 | - * @return bool |
|
2338 | + * @return double |
|
2338 | 2339 | */ |
2339 | 2340 | private function getFee($payment, $basket) |
2340 | 2341 | { |
@@ -116,20 +116,20 @@ |
||
116 | 116 | public function toHTML() |
117 | 117 | { |
118 | 118 | $html |
119 | - = "<p style='display: none; ". |
|
120 | - "background:url($this->proto://$this->host/fp/clear.png?org_id=". |
|
121 | - "$this->orgID&session_id=$this->sessionID&m=1)'></p>". |
|
122 | - "<script src='$this->proto://$this->host/fp/check.js?org_id=". |
|
123 | - "$this->orgID&session_id=$this->sessionID' ". |
|
124 | - "type='text/javascript'></script>". |
|
125 | - "<img src='$this->proto://$this->host/fp/clear.png?org_id=". |
|
126 | - "$this->orgID&session_id=$this->sessionID&m=2' alt='' >". |
|
127 | - "<object type='application/x-shockwave-flash' style='display: none' ". |
|
128 | - "data='$this->proto://$this->host/fp/fp.swf?org_id=$this->orgID&". |
|
129 | - "session_id=$this->sessionID' width='1' height='1' id='obj_id'>". |
|
130 | - "<param name='movie' value='$this->proto://$this->host/fp/fp.swf?". |
|
131 | - "org_id=$this->orgID&session_id=$this->sessionID' />". |
|
132 | - "<div></div>". |
|
119 | + = "<p style='display: none; " . |
|
120 | + "background:url($this->proto://$this->host/fp/clear.png?org_id=" . |
|
121 | + "$this->orgID&session_id=$this->sessionID&m=1)'></p>" . |
|
122 | + "<script src='$this->proto://$this->host/fp/check.js?org_id=" . |
|
123 | + "$this->orgID&session_id=$this->sessionID' " . |
|
124 | + "type='text/javascript'></script>" . |
|
125 | + "<img src='$this->proto://$this->host/fp/clear.png?org_id=" . |
|
126 | + "$this->orgID&session_id=$this->sessionID&m=2' alt='' >" . |
|
127 | + "<object type='application/x-shockwave-flash' style='display: none' " . |
|
128 | + "data='$this->proto://$this->host/fp/fp.swf?org_id=$this->orgID&" . |
|
129 | + "session_id=$this->sessionID' width='1' height='1' id='obj_id'>" . |
|
130 | + "<param name='movie' value='$this->proto://$this->host/fp/fp.swf?" . |
|
131 | + "org_id=$this->orgID&session_id=$this->sessionID' />" . |
|
132 | + "<div></div>" . |
|
133 | 133 | "</object>"; |
134 | 134 | return $html; |
135 | 135 | } |
@@ -226,7 +226,7 @@ |
||
226 | 226 | $xpath = new DOMXpath($this->dom); |
227 | 227 | |
228 | 228 | foreach ($this->pclasses as $eid => $pclasses) { |
229 | - $estore = $xpath->query('/klarna/estore[@id="'.$eid.'"]'); |
|
229 | + $estore = $xpath->query('/klarna/estore[@id="' . $eid . '"]'); |
|
230 | 230 | |
231 | 231 | if ($estore === false || $estore->length === 0) { |
232 | 232 | //No estore with matching eid, create it. |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $this->link = mysql_connect($this->addr, $this->user, $this->passwd); |
121 | 121 | if ($this->link === false) { |
122 | 122 | throw new Klarna_DatabaseException( |
123 | - 'Failed to connect to database! ('.mysql_error().')' |
|
123 | + 'Failed to connect to database! (' . mysql_error() . ')' |
|
124 | 124 | ); |
125 | 125 | } |
126 | 126 | } |
@@ -140,7 +140,7 @@ discard block |
||
140 | 140 | ) |
141 | 141 | ) { |
142 | 142 | throw new Klarna_DatabaseException( |
143 | - 'Failed to create! ('.mysql_error().')' |
|
143 | + 'Failed to create! (' . mysql_error() . ')' |
|
144 | 144 | ); |
145 | 145 | } |
146 | 146 | |
@@ -163,7 +163,7 @@ discard block |
||
163 | 163 | |
164 | 164 | if (!$create) { |
165 | 165 | throw new Klarna_DatabaseException( |
166 | - 'Table not existing, failed to create! ('.mysql_error().')' |
|
166 | + 'Table not existing, failed to create! (' . mysql_error() . ')' |
|
167 | 167 | ); |
168 | 168 | } |
169 | 169 | } |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | ); |
248 | 248 | if ($result === false) { |
249 | 249 | throw new Klarna_DatabaseException( |
250 | - 'SELECT query failed! ('.mysql_error().')' |
|
250 | + 'SELECT query failed! (' . mysql_error() . ')' |
|
251 | 251 | ); |
252 | 252 | } |
253 | 253 | while ($row = mysql_fetch_assoc($result)) { |
@@ -311,7 +311,7 @@ discard block |
||
311 | 311 | ); |
312 | 312 | if ($result === false) { |
313 | 313 | throw new Klarna_DatabaseException( |
314 | - 'INSERT INTO query failed! ('.mysql_error().')' |
|
314 | + 'INSERT INTO query failed! (' . mysql_error() . ')' |
|
315 | 315 | ); |
316 | 316 | } |
317 | 317 | } |
@@ -337,7 +337,7 @@ discard block |
||
337 | 337 | "DELETE FROM `{$this->dbName}`.`{$this->dbTable}`", |
338 | 338 | $this->link |
339 | 339 | ); |
340 | - } catch(Exception $e) { |
|
340 | + } catch (Exception $e) { |
|
341 | 341 | throw new Klarna_DatabaseException( |
342 | 342 | $e->getMessage(), $e->getCode() |
343 | 343 | ); |
@@ -3,6 +3,8 @@ |
||
3 | 3 | namespace Shopware\Components; |
4 | 4 | |
5 | 5 | if (!interface_exists('\Shopware\Components\CSRFWhitelistAware')) { |
6 | - interface CSRFWhitelistAware {} |
|
6 | + interface CSRFWhitelistAware |
|
7 | + { |
|
8 | +} |
|
7 | 9 | } |
8 | 10 |