@@ -18,7 +18,7 @@ |
||
18 | 18 | |
19 | 19 | function getSubscribers() |
20 | 20 | { |
21 | - for ($i = 0; $i<10000; $i++) { |
|
21 | + for ($i = 0; $i < 10000; $i++) { |
|
22 | 22 | $array[] = array( |
23 | 23 | 'contact_id' => '1', |
24 | 24 | 'contact_email' => '[email protected]' |
@@ -61,7 +61,7 @@ |
||
61 | 61 | INTRAFACE_INTRANETMAINTENANCE_SHOP_ID, |
62 | 62 | INTRAFACE_XMLRPC_DEBUG, |
63 | 63 | $xmlrpc_shop_url); |
64 | - } catch(Exception $e) { |
|
64 | + } catch (Exception $e) { |
|
65 | 65 | $this->shop = NULL; |
66 | 66 | throw new Exception('Unable to connect to the intranet maintenance webshop '.$e->getMessage()); |
67 | 67 | } |
@@ -61,7 +61,7 @@ |
||
61 | 61 | INTRAFACE_INTRANETMAINTENANCE_SHOP_ID, |
62 | 62 | INTRAFACE_XMLRPC_DEBUG, |
63 | 63 | $xmlrpc_shop_url); |
64 | - } catch(Exception $e) { |
|
64 | + } catch (Exception $e) { |
|
65 | 65 | $this->shop = NULL; |
66 | 66 | throw new Exception('Unable to connect to the intranet maintenance webshop '.$e->getMessage()); |
67 | 67 | } |
@@ -101,7 +101,7 @@ |
||
101 | 101 | |
102 | 102 | protected function getClient() |
103 | 103 | { |
104 | - require_once dirname(__FILE__) . '/../../../install/Install.php'; |
|
104 | + require_once dirname(__FILE__).'/../../../install/Install.php'; |
|
105 | 105 | |
106 | 106 | if (!defined('SERVER_STATUS')) { |
107 | 107 | define('SERVER_STATUS', 'TEST'); |
@@ -1,5 +1,5 @@ |
||
1 | 1 | <?php |
2 | -require_once dirname(__FILE__) . '/../../vendor/autoload.php'; |
|
2 | +require_once dirname(__FILE__).'/../../vendor/autoload.php'; |
|
3 | 3 | |
4 | 4 | $writer = new Ilib_Testing_Selenium_Selenese_TestSuiteGenerator; |
5 | 5 | $writer->addReplacement('##path_test_root##', dirname(__FILE__)); |
@@ -5,6 +5,9 @@ |
||
5 | 5 | class Intraface_modules_cms_element_Pagelist extends CMS_Element |
6 | 6 | { |
7 | 7 | |
8 | + /** |
|
9 | + * @param FakeCMSSection $section |
|
10 | + */ |
|
8 | 11 | function __construct($section, $id = 0) |
9 | 12 | { |
10 | 13 | $this->value['type'] = 'pagelist'; |
@@ -212,7 +212,6 @@ discard block |
||
212 | 212 | * |
213 | 213 | * @param struct $credentials Credentials to use the server |
214 | 214 | * @param integer $shop_id Id for the shop |
215 | - * @param integer $id Product id |
|
216 | 215 | * |
217 | 216 | * @return array |
218 | 217 | */ |
@@ -328,7 +327,7 @@ discard block |
||
328 | 327 | * |
329 | 328 | * @param struct $credentials Credentials to use the server |
330 | 329 | * @param integer $shop_id Id for the shop |
331 | - * @param integer $produt_id Product id to add |
|
330 | + * @param integer $product_id Product id to add |
|
332 | 331 | * @param integer $product_variation_id Product variation id to change |
333 | 332 | * @param integer $quantity Optional quantity |
334 | 333 | * @param string $text Extra text to the itemline |
@@ -371,7 +370,7 @@ discard block |
||
371 | 370 | * @param string $text Extra text to the itemline |
372 | 371 | * @param integer $product_detail_id Product detail id |
373 | 372 | * |
374 | - * @return mixed |
|
373 | + * @return boolean |
|
375 | 374 | */ |
376 | 375 | public function changeProductInBasket($credentials, $shop_id, $product_id, $product_variation_id, $quantity, $text = '', $product_detail_id = 0) |
377 | 376 | { |
@@ -791,6 +790,7 @@ discard block |
||
791 | 790 | /** |
792 | 791 | * Initialize the webshop |
793 | 792 | * |
793 | + * @param integer $shop_id |
|
794 | 794 | * @return void |
795 | 795 | */ |
796 | 796 | private function _factoryWebshop($shop_id) |
@@ -233,7 +233,7 @@ discard block |
||
233 | 233 | return $this->prepareResponseData($product->getRelatedProducts()); |
234 | 234 | } |
235 | 235 | |
236 | - /** |
|
236 | + /** |
|
237 | 237 | * Gets featured products |
238 | 238 | * |
239 | 239 | * Method is experimental and only used by discimport.dk. If you need to use it |
@@ -278,7 +278,7 @@ discard block |
||
278 | 278 | |
279 | 279 | } |
280 | 280 | |
281 | - /** |
|
281 | + /** |
|
282 | 282 | * Gets product keywords which can be used to sort ones webshop |
283 | 283 | * |
284 | 284 | * |
@@ -74,40 +74,40 @@ discard block |
||
74 | 74 | } |
75 | 75 | |
76 | 76 | // sublevel has to be used so other searches are not overwritten |
77 | - $product->getDBQuery()->storeResult('use_stored', 'webshop_' . $area . '_' . md5($this->credentials['session_id']), 'sublevel'); |
|
77 | + $product->getDBQuery()->storeResult('use_stored', 'webshop_'.$area.'_'.md5($this->credentials['session_id']), 'sublevel'); |
|
78 | 78 | $debug2 = serialize($mixed); |
79 | 79 | if (isset($mixed['offset']) and is_numeric($mixed['offset']) and $mixed['offset'] > 0) { |
80 | 80 | $product->getDBQuery()->useStored(true); |
81 | 81 | $product->getDBQuery()->setPagingOffset((int)$mixed['offset']); |
82 | - $debug2 .= 'offset ' . $mixed['offset']; |
|
82 | + $debug2 .= 'offset '.$mixed['offset']; |
|
83 | 83 | } elseif (isset($mixed['use_stored']) and array_key_exists('use_stored', $mixed) and $mixed['use_stored'] == 'true') { |
84 | 84 | $product->getDBQuery()->useStored(true); |
85 | 85 | $debug2 .= 'use_stored true'; |
86 | 86 | } else { |
87 | 87 | if (array_key_exists('search', $mixed) and !empty($mixed['search'])) { |
88 | 88 | $product->getDBQuery()->setFilter('search', $mixed['search']); |
89 | - $debug2 .= 'search ' . $mixed['search']; |
|
89 | + $debug2 .= 'search '.$mixed['search']; |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | if (array_key_exists('keywords', $mixed) and !empty($mixed['keywords'])) { |
93 | 93 | $product->getDBQuery()->setFilter('keywords', $mixed['keywords']); |
94 | - $debug2 .= 'keyword ' . $mixed['keywords']; |
|
94 | + $debug2 .= 'keyword '.$mixed['keywords']; |
|
95 | 95 | } |
96 | 96 | |
97 | 97 | if (array_key_exists('category', $mixed) and !empty($mixed['category'])) { |
98 | 98 | $product->getDBQuery()->setFilter('shop_id', $shop_id); |
99 | 99 | $product->getDBQuery()->setFilter('category', $mixed['category']); |
100 | - $debug2 .= 'category ' . $mixed['category']; |
|
100 | + $debug2 .= 'category '.$mixed['category']; |
|
101 | 101 | } |
102 | 102 | |
103 | 103 | if (isset($mixed['ids']) and array_key_exists('ids', $mixed) and is_array($mixed['ids'])) { |
104 | 104 | $product->getDBQuery()->setFilter('ids', $mixed['ids']); |
105 | - $debug2 .= 'ids ' . implode(', ', $mixed['ids']); |
|
105 | + $debug2 .= 'ids '.implode(', ', $mixed['ids']); |
|
106 | 106 | } |
107 | 107 | |
108 | 108 | if (array_key_exists('sorting', $mixed) and !empty($mixed['sorting'])) { |
109 | 109 | $product->getDBQuery()->setFilter('sorting', $mixed['sorting']); |
110 | - $debug2 .= 'sorting ' . $mixed['sorting']; |
|
110 | + $debug2 .= 'sorting '.$mixed['sorting']; |
|
111 | 111 | } |
112 | 112 | } |
113 | 113 | |
@@ -613,7 +613,7 @@ discard block |
||
613 | 613 | |
614 | 614 | if (PEAR::isError($db)) { |
615 | 615 | require_once 'XML/RPC2/Exception.php'; |
616 | - throw new XML_RPC2_FaultException($db->getMessage() . $db->getUserInfo(), -1); |
|
616 | + throw new XML_RPC2_FaultException($db->getMessage().$db->getUserInfo(), -1); |
|
617 | 617 | } |
618 | 618 | |
619 | 619 | $featured = new Intraface_modules_shop_FeaturedProducts($this->kernel->intranet, $this->webshop->getShop(), $db); |
@@ -878,7 +878,7 @@ discard block |
||
878 | 878 | |
879 | 879 | if (!$order_id = $this->webshop->placeOrder($values)) { |
880 | 880 | require_once 'XML/RPC2/Exception.php'; |
881 | - throw new XML_RPC2_FaultException('order could not be placed. It returned the following error: ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
881 | + throw new XML_RPC2_FaultException('order could not be placed. It returned the following error: '.strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
882 | 882 | } |
883 | 883 | |
884 | 884 | return $this->prepareResponseData($this->webshop->getOrderIdentifierKey()); |
@@ -908,7 +908,7 @@ discard block |
||
908 | 908 | |
909 | 909 | if (!$this->webshop->getBasket()->saveAddress($values)) { |
910 | 910 | require_once 'XML/RPC2/Exception.php'; |
911 | - throw new XML_RPC2_FaultException('datails could not be saved ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
911 | + throw new XML_RPC2_FaultException('datails could not be saved '.strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
912 | 912 | } |
913 | 913 | |
914 | 914 | return $this->prepareResponseData(true); |
@@ -949,7 +949,7 @@ discard block |
||
949 | 949 | $customer_coupon = $this->processRequestData($customer_coupon); |
950 | 950 | if (!$this->webshop->getBasket()->saveCustomerCoupon($customer_coupon)) { |
951 | 951 | require_once 'XML/RPC2/Exception.php'; |
952 | - throw new XML_RPC2_FaultException('datails could not be saved ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
952 | + throw new XML_RPC2_FaultException('datails could not be saved '.strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
953 | 953 | } |
954 | 954 | |
955 | 955 | return $this->prepareResponseData(true); |
@@ -990,7 +990,7 @@ discard block |
||
990 | 990 | $customer_ean = $this->processRequestData($customer_ean); |
991 | 991 | if (!$this->webshop->getBasket()->saveCustomerEan($customer_ean)) { |
992 | 992 | require_once 'XML/RPC2/Exception.php'; |
993 | - throw new XML_RPC2_FaultException('ean could not be saved ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
993 | + throw new XML_RPC2_FaultException('ean could not be saved '.strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
994 | 994 | } |
995 | 995 | |
996 | 996 | return $this->prepareResponseData(true); |
@@ -1032,7 +1032,7 @@ discard block |
||
1032 | 1032 | $customer_comment = $this->processRequestData($customer_comment); |
1033 | 1033 | if (!$this->webshop->getBasket()->saveCustomerComment($customer_comment)) { |
1034 | 1034 | require_once 'XML/RPC2/Exception.php'; |
1035 | - throw new XML_RPC2_FaultException('datails could not be saved ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
1035 | + throw new XML_RPC2_FaultException('datails could not be saved '.strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
1036 | 1036 | } |
1037 | 1037 | |
1038 | 1038 | return $this->prepareResponseData(true); |
@@ -1091,7 +1091,7 @@ discard block |
||
1091 | 1091 | $payment_method = $this->processRequestData($payment_method); |
1092 | 1092 | if (!$this->webshop->getBasket()->savePaymentMethod($payment_method)) { |
1093 | 1093 | require_once 'XML/RPC2/Exception.php'; |
1094 | - throw new XML_RPC2_FaultException('datails could not be saved ' . strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
1094 | + throw new XML_RPC2_FaultException('datails could not be saved '.strtolower(implode(', ', $this->webshop->error->getMessage())), -4); |
|
1095 | 1095 | } |
1096 | 1096 | |
1097 | 1097 | return $this->prepareResponseData(true); |
@@ -9,6 +9,9 @@ |
||
9 | 9 | public $kernel; |
10 | 10 | public $cmssite; |
11 | 11 | |
12 | + /** |
|
13 | + * @param Stub_Kernel $kernel |
|
14 | + */ |
|
12 | 15 | function __construct($kernel) |
13 | 16 | { |
14 | 17 | $this->kernel = $kernel; |
@@ -6,6 +6,10 @@ |
||
6 | 6 | class FakeStockProduct |
7 | 7 | { |
8 | 8 | public $kernel; |
9 | + |
|
10 | + /** |
|
11 | + * @param Stub_Kernel $kernel |
|
12 | + */ |
|
9 | 13 | function __construct($kernel) |
10 | 14 | { |
11 | 15 | $this->kernel = $kernel; |