@@ -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(); |
@@ -27,5 +27,5 @@ |
||
27 | 27 | * @param string|null $name Name of the controller implementation (Default if null) |
28 | 28 | * @return \Aimeos\Controller\Frontend\Common\Iface Controller object |
29 | 29 | */ |
30 | - public static function createController( \Aimeos\MShop\Context\Item\Iface $context, $name = null ); |
|
30 | + public static function createController(\Aimeos\MShop\Context\Item\Iface $context, $name = null); |
|
31 | 31 | } |
@@ -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 |