@@ -15,7 +15,7 @@ discard block |
||
15 | 15 | |
16 | 16 | protected function setUp() |
17 | 17 | { |
18 | - $this->object = new \Aimeos\Controller\Frontend\Exception( 'msg', 1, null, array( 'key' => 'value' ) ); |
|
18 | + $this->object = new \Aimeos\Controller\Frontend\Exception('msg', 1, null, array('key' => 'value')); |
|
19 | 19 | } |
20 | 20 | |
21 | 21 | |
@@ -26,18 +26,18 @@ discard block |
||
26 | 26 | |
27 | 27 | public function testGetMessage() |
28 | 28 | { |
29 | - $this->assertEquals( 'msg', $this->object->getMessage() ); |
|
29 | + $this->assertEquals('msg', $this->object->getMessage()); |
|
30 | 30 | } |
31 | 31 | |
32 | 32 | |
33 | 33 | public function testGetCode() |
34 | 34 | { |
35 | - $this->assertEquals( 1, $this->object->getCode() ); |
|
35 | + $this->assertEquals(1, $this->object->getCode()); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | |
39 | 39 | public function testGetErrorList() |
40 | 40 | { |
41 | - $this->assertEquals( array( 'key' => 'value' ), $this->object->getErrorList() ); |
|
41 | + $this->assertEquals(array('key' => 'value'), $this->object->getErrorList()); |
|
42 | 42 | } |
43 | 43 | } |
@@ -11,22 +11,22 @@ |
||
11 | 11 | * Set error reporting to maximum |
12 | 12 | */ |
13 | 13 | error_reporting( -1 ); |
14 | -ini_set( 'display_errors', '1' ); |
|
14 | +ini_set('display_errors', '1'); |
|
15 | 15 | |
16 | -date_default_timezone_set( 'UTC' ); |
|
16 | +date_default_timezone_set('UTC'); |
|
17 | 17 | |
18 | 18 | /** |
19 | 19 | * Set locale settings to reasonable defaults |
20 | 20 | */ |
21 | -setlocale( LC_ALL, 'en_US.UTF-8' ); |
|
22 | -setlocale( LC_NUMERIC, 'POSIX' ); |
|
23 | -setlocale( LC_CTYPE, 'en_US.UTF-8' ); |
|
24 | -setlocale( LC_TIME, 'POSIX' ); |
|
21 | +setlocale(LC_ALL, 'en_US.UTF-8'); |
|
22 | +setlocale(LC_NUMERIC, 'POSIX'); |
|
23 | +setlocale(LC_CTYPE, 'en_US.UTF-8'); |
|
24 | +setlocale(LC_TIME, 'POSIX'); |
|
25 | 25 | |
26 | 26 | /* |
27 | 27 | * Set include path for tests |
28 | 28 | */ |
29 | -define( 'PATH_TESTS', __DIR__ ); |
|
29 | +define('PATH_TESTS', __DIR__); |
|
30 | 30 | |
31 | 31 | require_once 'TestHelperFrontend.php'; |
32 | 32 | \TestHelperFrontend::bootstrap(); |
@@ -21,7 +21,7 @@ |
||
21 | 21 | class Example |
22 | 22 | implements \Aimeos\Controller\Frontend\Common\Decorator\Iface |
23 | 23 | { |
24 | - public function __construct( \Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context ) |
|
24 | + public function __construct(\Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context) |
|
25 | 25 | { |
26 | 26 | } |
27 | 27 | } |
@@ -26,5 +26,5 @@ |
||
26 | 26 | * @param \Aimeos\Controller\Frontend\Iface $controller Controller object |
27 | 27 | * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects |
28 | 28 | */ |
29 | - public function __construct( \Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context ); |
|
29 | + public function __construct(\Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context); |
|
30 | 30 | } |
@@ -26,6 +26,6 @@ |
||
26 | 26 | * |
27 | 27 | * @param \Aimeos\MShop\Context\Item\Iface $context MShop context object |
28 | 28 | */ |
29 | - public function __construct( \Aimeos\MShop\Context\Item\Iface $context ); |
|
29 | + public function __construct(\Aimeos\MShop\Context\Item\Iface $context); |
|
30 | 30 | |
31 | 31 | } |
@@ -4,7 +4,7 @@ |
||
4 | 4 | 'frontend' => array( |
5 | 5 | 'basket' => array( |
6 | 6 | 'decorators' => array( |
7 | - 'local' => array( 'Category', 'Bundle', 'Select' ), |
|
7 | + 'local' => array('Category', 'Bundle', 'Select'), |
|
8 | 8 | ), |
9 | 9 | ), |
10 | 10 | ), |
@@ -278,7 +278,7 @@ |
||
278 | 278 | /** |
279 | 279 | * Returns the frontend controller |
280 | 280 | * |
281 | - * @return \Aimeos\Controller\Frontend\Catalog\Iface Frontend controller object |
|
281 | + * @return \Aimeos\Controller\Frontend\Iface Frontend controller object |
|
282 | 282 | */ |
283 | 283 | protected function getController() |
284 | 284 | { |
@@ -30,13 +30,13 @@ discard block |
||
30 | 30 | * @param \Aimeos\Controller\Frontend\Iface $controller Controller object |
31 | 31 | * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects |
32 | 32 | */ |
33 | - public function __construct( \Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context ) |
|
33 | + public function __construct(\Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context) |
|
34 | 34 | { |
35 | - \Aimeos\MW\Common\Base::checkClass( '\\Aimeos\\Controller\\Frontend\\Catalog\\Iface', $controller ); |
|
35 | + \Aimeos\MW\Common\Base::checkClass('\\Aimeos\\Controller\\Frontend\\Catalog\\Iface', $controller); |
|
36 | 36 | |
37 | 37 | $this->controller = $controller; |
38 | 38 | |
39 | - parent::__construct( $context ); |
|
39 | + parent::__construct($context); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | |
@@ -48,9 +48,9 @@ discard block |
||
48 | 48 | * @return mixed Returns the value of the called method |
49 | 49 | * @throws \Aimeos\Controller\Frontend\Exception If method call failed |
50 | 50 | */ |
51 | - public function __call( $name, array $param ) |
|
51 | + public function __call($name, array $param) |
|
52 | 52 | { |
53 | - return @call_user_func_array( array( $this->controller, $name ), $param ); |
|
53 | + return @call_user_func_array(array($this->controller, $name), $param); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | |
@@ -76,9 +76,9 @@ discard block |
||
76 | 76 | * @return array Associative list of items implementing \Aimeos\MShop\Catalog\Item\Iface with their IDs as keys |
77 | 77 | * @since 2017.03 |
78 | 78 | */ |
79 | - public function getPath( $id, array $domains = array( 'text', 'media' ) ) |
|
79 | + public function getPath($id, array $domains = array('text', 'media')) |
|
80 | 80 | { |
81 | - return $this->controller->getPath( $id, $domains ); |
|
81 | + return $this->controller->getPath($id, $domains); |
|
82 | 82 | } |
83 | 83 | |
84 | 84 | |
@@ -93,10 +93,10 @@ discard block |
||
93 | 93 | * @return \Aimeos\MShop\Catalog\Item\Iface Catalog node, maybe with children depending on the level constant |
94 | 94 | * @since 2017.03 |
95 | 95 | */ |
96 | - public function getTree( $id = null, array $domains = array( 'text', 'media' ), |
|
97 | - $level = \Aimeos\MW\Tree\Manager\Base::LEVEL_TREE, \Aimeos\MW\Criteria\Iface $search = null ) |
|
96 | + public function getTree($id = null, array $domains = array('text', 'media'), |
|
97 | + $level = \Aimeos\MW\Tree\Manager\Base::LEVEL_TREE, \Aimeos\MW\Criteria\Iface $search = null) |
|
98 | 98 | { |
99 | - return $this->controller->getTree( $id, $domains, $level, $search ); |
|
99 | + return $this->controller->getTree($id, $domains, $level, $search); |
|
100 | 100 | } |
101 | 101 | |
102 | 102 |
@@ -152,7 +152,7 @@ |
||
152 | 152 | /** |
153 | 153 | * Returns the frontend controller |
154 | 154 | * |
155 | - * @return \Aimeos\Controller\Frontend\Order\Iface Frontend controller object |
|
155 | + * @return \Aimeos\Controller\Frontend\Iface Frontend controller object |
|
156 | 156 | */ |
157 | 157 | protected function getController() |
158 | 158 | { |
@@ -30,13 +30,13 @@ discard block |
||
30 | 30 | * @param \Aimeos\Controller\Frontend\Iface $controller Controller object |
31 | 31 | * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects |
32 | 32 | */ |
33 | - public function __construct( \Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context ) |
|
33 | + public function __construct(\Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context) |
|
34 | 34 | { |
35 | - \Aimeos\MW\Common\Base::checkClass( '\\Aimeos\\Controller\\Frontend\\Order\\Iface', $controller ); |
|
35 | + \Aimeos\MW\Common\Base::checkClass('\\Aimeos\\Controller\\Frontend\\Order\\Iface', $controller); |
|
36 | 36 | |
37 | 37 | $this->controller = $controller; |
38 | 38 | |
39 | - parent::__construct( $context ); |
|
39 | + parent::__construct($context); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | |
@@ -48,9 +48,9 @@ discard block |
||
48 | 48 | * @return mixed Returns the value of the called method |
49 | 49 | * @throws \Aimeos\Controller\Frontend\Exception If method call failed |
50 | 50 | */ |
51 | - public function __call( $name, array $param ) |
|
51 | + public function __call($name, array $param) |
|
52 | 52 | { |
53 | - return @call_user_func_array( array( $this->controller, $name ), $param ); |
|
53 | + return @call_user_func_array(array($this->controller, $name), $param); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | |
@@ -61,9 +61,9 @@ discard block |
||
61 | 61 | * @param string $type Arbitrary order type (max. eight chars) |
62 | 62 | * @return \Aimeos\MShop\Order\Item\Iface Created order object |
63 | 63 | */ |
64 | - public function addItem( $baseId, $type ) |
|
64 | + public function addItem($baseId, $type) |
|
65 | 65 | { |
66 | - return $this->controller->addItem( $baseId, $type ); |
|
66 | + return $this->controller->addItem($baseId, $type); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | |
@@ -85,9 +85,9 @@ discard block |
||
85 | 85 | * @param boolean $default Use default criteria to limit orders |
86 | 86 | * @return \Aimeos\MShop\Order\Item\Iface Order object |
87 | 87 | */ |
88 | - public function getItem( $id, $default = true ) |
|
88 | + public function getItem($id, $default = true) |
|
89 | 89 | { |
90 | - return $this->controller->getItem( $id, $default ); |
|
90 | + return $this->controller->getItem($id, $default); |
|
91 | 91 | } |
92 | 92 | |
93 | 93 | |
@@ -97,9 +97,9 @@ discard block |
||
97 | 97 | * @param \Aimeos\MShop\Order\Item\Iface $item Order object |
98 | 98 | * @return \Aimeos\MShop\Order\Item\Iface Saved order item |
99 | 99 | */ |
100 | - public function saveItem( \Aimeos\MShop\Order\Item\Iface $item ) |
|
100 | + public function saveItem(\Aimeos\MShop\Order\Item\Iface $item) |
|
101 | 101 | { |
102 | - return $this->controller->saveItem( $item ); |
|
102 | + return $this->controller->saveItem($item); |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | |
@@ -110,9 +110,9 @@ discard block |
||
110 | 110 | * @param integer &$total|null Variable that will contain the total number of available items |
111 | 111 | * @return \Aimeos\MShop\Order\Item\Iface[] Associative list of IDs as keys and order objects as values |
112 | 112 | */ |
113 | - public function searchItems( \Aimeos\MW\Criteria\Iface $filter, &$total = null ) |
|
113 | + public function searchItems(\Aimeos\MW\Criteria\Iface $filter, &$total = null) |
|
114 | 114 | { |
115 | - return $this->controller->searchItems( $filter, $total ); |
|
115 | + return $this->controller->searchItems($filter, $total); |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | |
@@ -135,9 +135,9 @@ discard block |
||
135 | 135 | * @param \Aimeos\MShop\Order\Item\Iface $orderItem Order item object |
136 | 136 | * @return void |
137 | 137 | */ |
138 | - public function block( \Aimeos\MShop\Order\Item\Iface $orderItem ) |
|
138 | + public function block(\Aimeos\MShop\Order\Item\Iface $orderItem) |
|
139 | 139 | { |
140 | - $this->getController()->block( $orderItem ); |
|
140 | + $this->getController()->block($orderItem); |
|
141 | 141 | } |
142 | 142 | |
143 | 143 | |
@@ -160,9 +160,9 @@ discard block |
||
160 | 160 | * @param \Aimeos\MShop\Order\Item\Iface $orderItem Order item object |
161 | 161 | * @return void |
162 | 162 | */ |
163 | - public function unblock( \Aimeos\MShop\Order\Item\Iface $orderItem ) |
|
163 | + public function unblock(\Aimeos\MShop\Order\Item\Iface $orderItem) |
|
164 | 164 | { |
165 | - $this->getController()->unblock( $orderItem ); |
|
165 | + $this->getController()->unblock($orderItem); |
|
166 | 166 | } |
167 | 167 | |
168 | 168 | |
@@ -181,9 +181,9 @@ discard block |
||
181 | 181 | * @param \Aimeos\MShop\Order\Item\Iface $orderItem Order item object |
182 | 182 | * @return void |
183 | 183 | */ |
184 | - public function update( \Aimeos\MShop\Order\Item\Iface $orderItem ) |
|
184 | + public function update(\Aimeos\MShop\Order\Item\Iface $orderItem) |
|
185 | 185 | { |
186 | - $this->getController()->update( $orderItem ); |
|
186 | + $this->getController()->update($orderItem); |
|
187 | 187 | } |
188 | 188 | |
189 | 189 |
@@ -191,7 +191,7 @@ |
||
191 | 191 | /** |
192 | 192 | * Returns the frontend controller |
193 | 193 | * |
194 | - * @return \Aimeos\Controller\Frontend\Product\Iface Frontend controller object |
|
194 | + * @return \Aimeos\Controller\Frontend\Iface Frontend controller object |
|
195 | 195 | */ |
196 | 196 | protected function getController() |
197 | 197 | { |
@@ -30,13 +30,13 @@ discard block |
||
30 | 30 | * @param \Aimeos\Controller\Frontend\Iface $controller Controller object |
31 | 31 | * @param \Aimeos\MShop\Context\Item\Iface $context Context object with required objects |
32 | 32 | */ |
33 | - public function __construct( \Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context ) |
|
33 | + public function __construct(\Aimeos\Controller\Frontend\Iface $controller, \Aimeos\MShop\Context\Item\Iface $context) |
|
34 | 34 | { |
35 | - \Aimeos\MW\Common\Base::checkClass( '\\Aimeos\\Controller\\Frontend\\Product\\Iface', $controller ); |
|
35 | + \Aimeos\MW\Common\Base::checkClass('\\Aimeos\\Controller\\Frontend\\Product\\Iface', $controller); |
|
36 | 36 | |
37 | 37 | $this->controller = $controller; |
38 | 38 | |
39 | - parent::__construct( $context ); |
|
39 | + parent::__construct($context); |
|
40 | 40 | } |
41 | 41 | |
42 | 42 | |
@@ -48,9 +48,9 @@ discard block |
||
48 | 48 | * @return mixed Returns the value of the called method |
49 | 49 | * @throws \Aimeos\Controller\Frontend\Exception If method call failed |
50 | 50 | */ |
51 | - public function __call( $name, array $param ) |
|
51 | + public function __call($name, array $param) |
|
52 | 52 | { |
53 | - return @call_user_func_array( array( $this->controller, $name ), $param ); |
|
53 | + return @call_user_func_array(array($this->controller, $name), $param); |
|
54 | 54 | } |
55 | 55 | |
56 | 56 | |
@@ -64,9 +64,9 @@ discard block |
||
64 | 64 | * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching |
65 | 65 | * @since 2017.03 |
66 | 66 | */ |
67 | - public function addFilterAttribute( \Aimeos\MW\Criteria\Iface $filter, array $attrIds, array $optIds, array $oneIds ) |
|
67 | + public function addFilterAttribute(\Aimeos\MW\Criteria\Iface $filter, array $attrIds, array $optIds, array $oneIds) |
|
68 | 68 | { |
69 | - return $this->controller->addFilterAttribute( $filter, $attrIds, $optIds, $oneIds ); |
|
69 | + return $this->controller->addFilterAttribute($filter, $attrIds, $optIds, $oneIds); |
|
70 | 70 | } |
71 | 71 | |
72 | 72 | |
@@ -80,10 +80,10 @@ discard block |
||
80 | 80 | * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching |
81 | 81 | * @since 2017.03 |
82 | 82 | */ |
83 | - public function addFilterCategory( \Aimeos\MW\Criteria\Iface $filter, $catIds, $listtype = 'default', |
|
84 | - $level = \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE ) |
|
83 | + public function addFilterCategory(\Aimeos\MW\Criteria\Iface $filter, $catIds, $listtype = 'default', |
|
84 | + $level = \Aimeos\MW\Tree\Manager\Base::LEVEL_ONE) |
|
85 | 85 | { |
86 | - return $this->controller->addFilterCategory( $filter, $catIds, $listtype, $level ); |
|
86 | + return $this->controller->addFilterCategory($filter, $catIds, $listtype, $level); |
|
87 | 87 | } |
88 | 88 | |
89 | 89 | |
@@ -96,9 +96,9 @@ discard block |
||
96 | 96 | * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching |
97 | 97 | * @since 2018.07 |
98 | 98 | */ |
99 | - public function addFilterSupplier( \Aimeos\MW\Criteria\Iface $filter, $supIds, $listtype = 'default' ) |
|
99 | + public function addFilterSupplier(\Aimeos\MW\Criteria\Iface $filter, $supIds, $listtype = 'default') |
|
100 | 100 | { |
101 | - return $this->controller->addFilterSupplier( $filter, $supIds, $listtype ); |
|
101 | + return $this->controller->addFilterSupplier($filter, $supIds, $listtype); |
|
102 | 102 | } |
103 | 103 | |
104 | 104 | |
@@ -110,9 +110,9 @@ discard block |
||
110 | 110 | * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching |
111 | 111 | * @since 2017.03 |
112 | 112 | */ |
113 | - public function addFilterText( \Aimeos\MW\Criteria\Iface $filter, $input ) |
|
113 | + public function addFilterText(\Aimeos\MW\Criteria\Iface $filter, $input) |
|
114 | 114 | { |
115 | - return $this->controller->addFilterText( $filter, $input ); |
|
115 | + return $this->controller->addFilterText($filter, $input); |
|
116 | 116 | } |
117 | 117 | |
118 | 118 | |
@@ -124,9 +124,9 @@ discard block |
||
124 | 124 | * @return array Associative list of key values as key and the product count for this key as value |
125 | 125 | * @since 2015.08 |
126 | 126 | */ |
127 | - public function aggregate( \Aimeos\MW\Criteria\Iface $filter, $key ) |
|
127 | + public function aggregate(\Aimeos\MW\Criteria\Iface $filter, $key) |
|
128 | 128 | { |
129 | - return $this->controller->aggregate( $filter, $key ); |
|
129 | + return $this->controller->aggregate($filter, $key); |
|
130 | 130 | } |
131 | 131 | |
132 | 132 | |
@@ -140,9 +140,9 @@ discard block |
||
140 | 140 | * @return \Aimeos\MW\Criteria\Iface Criteria object containing the conditions for searching |
141 | 141 | * @since 2015.08 |
142 | 142 | */ |
143 | - public function createFilter( $sort = null, $direction = '+', $start = 0, $size = 100 ) |
|
143 | + public function createFilter($sort = null, $direction = '+', $start = 0, $size = 100) |
|
144 | 144 | { |
145 | - return $this->controller->createFilter( $sort, $direction, $start, $size ); |
|
145 | + return $this->controller->createFilter($sort, $direction, $start, $size); |
|
146 | 146 | } |
147 | 147 | |
148 | 148 | |
@@ -154,9 +154,9 @@ discard block |
||
154 | 154 | * @return \Aimeos\MShop\Product\Item\Iface Product item including the referenced domains items |
155 | 155 | * @since 2017.03 |
156 | 156 | */ |
157 | - public function getItem( $productId, array $domains = array( 'attribute', 'media', 'price', 'product', 'product/property', 'text' ) ) |
|
157 | + public function getItem($productId, array $domains = array('attribute', 'media', 'price', 'product', 'product/property', 'text')) |
|
158 | 158 | { |
159 | - return $this->controller->getItem( $productId, $domains ); |
|
159 | + return $this->controller->getItem($productId, $domains); |
|
160 | 160 | } |
161 | 161 | |
162 | 162 | |
@@ -168,9 +168,9 @@ discard block |
||
168 | 168 | * @return \Aimeos\MShop\Product\Item\Iface[] Associative list of product IDs as keys and product items as values |
169 | 169 | * @since 2017.03 |
170 | 170 | */ |
171 | - public function getItems( array $productIds, array $domains = array( 'media', 'price', 'text' ) ) |
|
171 | + public function getItems(array $productIds, array $domains = array('media', 'price', 'text')) |
|
172 | 172 | { |
173 | - return $this->controller->getItems( $productIds, $domains ); |
|
173 | + return $this->controller->getItems($productIds, $domains); |
|
174 | 174 | } |
175 | 175 | |
176 | 176 | |
@@ -183,9 +183,9 @@ discard block |
||
183 | 183 | * @return array Ordered list of product items implementing \Aimeos\MShop\Product\Item\Iface |
184 | 184 | * @since 2015.08 |
185 | 185 | */ |
186 | - public function searchItems( \Aimeos\MW\Criteria\Iface $filter, array $domains = array( 'media', 'price', 'text' ), &$total = null ) |
|
186 | + public function searchItems(\Aimeos\MW\Criteria\Iface $filter, array $domains = array('media', 'price', 'text'), &$total = null) |
|
187 | 187 | { |
188 | - return $this->controller->searchItems( $filter, $domains, $total ); |
|
188 | + return $this->controller->searchItems($filter, $domains, $total); |
|
189 | 189 | } |
190 | 190 | |
191 | 191 |