Completed
Push — master ( eec074...f2513e )
by Aimeos
03:01
created
admin/jqadm/src/Admin/JQAdm/Dashboard/Order/Standard.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 	 * @category Developer
56 56
 	 */
57 57
 	private $subPartPath = 'admin/jqadm/dashboard/order/standard/subparts';
58
-	private $subPartNames = array( 'paymentstatus' );
58
+	private $subPartNames = array('paymentstatus');
59 59
 
60 60
 
61 61
 	/**
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	 */
66 66
 	public function copy()
67 67
 	{
68
-		throw new \Aimeos\Admin\JQAdm\Exception( 'The resource can not be copied' );
68
+		throw new \Aimeos\Admin\JQAdm\Exception('The resource can not be copied');
69 69
 	}
70 70
 
71 71
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	 */
77 77
 	public function create()
78 78
 	{
79
-		throw new \Aimeos\Admin\JQAdm\Exception( 'New resources can not be created' );
79
+		throw new \Aimeos\Admin\JQAdm\Exception('New resources can not be created');
80 80
 	}
81 81
 
82 82
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 */
88 88
 	public function delete()
89 89
 	{
90
-		throw new \Aimeos\Admin\JQAdm\Exception( 'The resource can not be deleted' );
90
+		throw new \Aimeos\Admin\JQAdm\Exception('The resource can not be deleted');
91 91
 	}
92 92
 
93 93
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	 */
99 99
 	public function get()
100 100
 	{
101
-		throw new \Aimeos\Admin\JQAdm\Exception( 'The resource can not be retrieved' );
101
+		throw new \Aimeos\Admin\JQAdm\Exception('The resource can not be retrieved');
102 102
 	}
103 103
 
104 104
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	 */
110 110
 	public function save()
111 111
 	{
112
-		throw new \Aimeos\Admin\JQAdm\Exception( 'The resource can not be modified' );
112
+		throw new \Aimeos\Admin\JQAdm\Exception('The resource can not be modified');
113 113
 	}
114 114
 
115 115
 
@@ -123,14 +123,14 @@  discard block
 block discarded – undo
123 123
 		$view = $this->getView();
124 124
 		$view->orderBody = '';
125 125
 
126
-		foreach( $this->getSubClients() as $client ) {
126
+		foreach ($this->getSubClients() as $client) {
127 127
 			$view->orderBody .= $client->search();
128 128
 		}
129 129
 
130 130
 		$tplconf = 'admin/jqadm/dashboard/order/template-list';
131 131
 		$default = 'dashboard/list-order-default.php';
132 132
 
133
-		return $view->render( $view->config( $tplconf, $default ) );
133
+		return $view->render($view->config($tplconf, $default));
134 134
 	}
135 135
 
136 136
 
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 	 * @param string|null $name Name of the sub-client (Default if null)
142 142
 	 * @return \Aimeos\Admin\JQAdm\Iface Sub-client object
143 143
 	 */
144
-	public function getSubClient( $type, $name = null )
144
+	public function getSubClient($type, $name = null)
145 145
 	{
146 146
 		/** admin/jqadm/dashboard/order/decorators/excludes
147 147
 		 * Excludes decorators added by the "common" option from the dashboard JQAdm client
@@ -216,7 +216,7 @@  discard block
 block discarded – undo
216 216
 		 * @see admin/jqadm/dashboard/order/decorators/excludes
217 217
 		 * @see admin/jqadm/dashboard/order/decorators/global
218 218
 		 */
219
-		return $this->createSubClient( 'dashboard/order/' . $type, $name );
219
+		return $this->createSubClient('dashboard/order/' . $type, $name);
220 220
 	}
221 221
 
222 222
 
@@ -227,6 +227,6 @@  discard block
 block discarded – undo
227 227
 	 */
228 228
 	protected function getSubClientNames()
229 229
 	{
230
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
230
+		return $this->getContext()->getConfig()->get($this->subPartPath, $this->subPartNames);
231 231
 	}
232 232
 }
Please login to merge, or discard this patch.
admin/jqadm/src/Admin/JQAdm/Dashboard/Order/Paymentstatus/Standard.php 2 patches
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	 */
66 66
 	public function copy()
67 67
 	{
68
-		throw new \Aimeos\Admin\JQAdm\Exception( 'The resource can not be copied' );
68
+		throw new \Aimeos\Admin\JQAdm\Exception('The resource can not be copied');
69 69
 	}
70 70
 
71 71
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	 */
77 77
 	public function create()
78 78
 	{
79
-		throw new \Aimeos\Admin\JQAdm\Exception( 'New resources can not be created' );
79
+		throw new \Aimeos\Admin\JQAdm\Exception('New resources can not be created');
80 80
 	}
81 81
 
82 82
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 */
88 88
 	public function delete()
89 89
 	{
90
-		throw new \Aimeos\Admin\JQAdm\Exception( 'The resource can not be deleted' );
90
+		throw new \Aimeos\Admin\JQAdm\Exception('The resource can not be deleted');
91 91
 	}
92 92
 
93 93
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	 */
99 99
 	public function get()
100 100
 	{
101
-		throw new \Aimeos\Admin\JQAdm\Exception( 'The resource can not be retrieved' );
101
+		throw new \Aimeos\Admin\JQAdm\Exception('The resource can not be retrieved');
102 102
 	}
103 103
 
104 104
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	 */
110 110
 	public function save()
111 111
 	{
112
-		throw new \Aimeos\Admin\JQAdm\Exception( 'The resource can not be modified' );
112
+		throw new \Aimeos\Admin\JQAdm\Exception('The resource can not be modified');
113 113
 	}
114 114
 
115 115
 
@@ -127,25 +127,25 @@  discard block
 block discarded – undo
127 127
 		{
128 128
 			$view->orderpaymentstatusBody = '';
129 129
 
130
-			foreach( $this->getSubClients() as $client ) {
130
+			foreach ($this->getSubClients() as $client) {
131 131
 				$view->orderpaymentstatusBody .= $client->search();
132 132
 			}
133 133
 		}
134
-		catch( \Aimeos\MShop\Exception $e )
134
+		catch (\Aimeos\MShop\Exception $e)
135 135
 		{
136
-			$error = array( 'order-paymentstatus' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
137
-			$view->errors = $view->get( 'errors', array() ) + $error;
136
+			$error = array('order-paymentstatus' => $context->getI18n()->dt('mshop', $e->getMessage()));
137
+			$view->errors = $view->get('errors', array()) + $error;
138 138
 		}
139
-		catch( \Exception $e )
139
+		catch (\Exception $e)
140 140
 		{
141
-			$error = array( 'order-paymentstatus' => $e->getMessage() );
142
-			$view->errors = $view->get( 'errors', array() ) + $error;
141
+			$error = array('order-paymentstatus' => $e->getMessage());
142
+			$view->errors = $view->get('errors', array()) + $error;
143 143
 		}
144 144
 
145 145
 		$tplconf = 'admin/jqadm/dashboard/order/paymentstatus/template-item';
146 146
 		$default = 'dashboard/item-order-paymentstatus-default.php';
147 147
 
148
-		return $view->render( $view->config( $tplconf, $default ) );
148
+		return $view->render($view->config($tplconf, $default));
149 149
 	}
150 150
 
151 151
 
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 	 * @param string|null $name Name of the sub-client (Default if null)
157 157
 	 * @return \Aimeos\Admin\JQAdm\Iface Sub-client object
158 158
 	 */
159
-	public function getSubClient( $type, $name = null )
159
+	public function getSubClient($type, $name = null)
160 160
 	{
161 161
 		/** admin/jqadm/dashboard/order/paymentstatus/decorators/excludes
162 162
 		 * Excludes decorators added by the "common" option from the dashboard JQAdm client
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 		 * @see admin/jqadm/dashboard/order/paymentstatus/decorators/excludes
232 232
 		 * @see admin/jqadm/dashboard/order/paymentstatus/decorators/global
233 233
 		 */
234
-		return $this->createSubClient( 'dashboard/order/paymentstatus/' . $type, $name );
234
+		return $this->createSubClient('dashboard/order/paymentstatus/' . $type, $name);
235 235
 	}
236 236
 
237 237
 
@@ -242,6 +242,6 @@  discard block
 block discarded – undo
242 242
 	 */
243 243
 	protected function getSubClientNames()
244 244
 	{
245
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
245
+		return $this->getContext()->getConfig()->get($this->subPartPath, $this->subPartNames);
246 246
 	}
247 247
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -151,14 +151,12 @@
 block discarded – undo
151 151
 
152 152
 			$manager->commit();
153 153
 			return;
154
-		}
155
-		catch( \Aimeos\MShop\Exception $e )
154
+		} catch( \Aimeos\MShop\Exception $e )
156 155
 		{
157 156
 			$error = array( 'product-item-category' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
158 157
 			$view->errors = $view->get( 'errors', array() ) + $error;
159 158
 			$manager->rollback();
160
-		}
161
-		catch( \Exception $e )
159
+		} catch( \Exception $e )
162 160
 		{
163 161
 			$context->getLogger()->log( $e->getMessage() . ' - ' . $e->getTraceAsString() );
164 162
 			$error = array( 'product-item-category' => $e->getMessage() );
Please login to merge, or discard this patch.
admin/jqadm/src/Admin/JQAdm/Dashboard/Order/Latest/Standard.php 2 patches
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 	 */
66 66
 	public function copy()
67 67
 	{
68
-		throw new \Aimeos\Admin\JQAdm\Exception( 'The resource can not be copied' );
68
+		throw new \Aimeos\Admin\JQAdm\Exception('The resource can not be copied');
69 69
 	}
70 70
 
71 71
 
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 	 */
77 77
 	public function create()
78 78
 	{
79
-		throw new \Aimeos\Admin\JQAdm\Exception( 'New resources can not be created' );
79
+		throw new \Aimeos\Admin\JQAdm\Exception('New resources can not be created');
80 80
 	}
81 81
 
82 82
 
@@ -87,7 +87,7 @@  discard block
 block discarded – undo
87 87
 	 */
88 88
 	public function delete()
89 89
 	{
90
-		throw new \Aimeos\Admin\JQAdm\Exception( 'The resource can not be deleted' );
90
+		throw new \Aimeos\Admin\JQAdm\Exception('The resource can not be deleted');
91 91
 	}
92 92
 
93 93
 
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	 */
99 99
 	public function get()
100 100
 	{
101
-		throw new \Aimeos\Admin\JQAdm\Exception( 'The resource can not be retrieved' );
101
+		throw new \Aimeos\Admin\JQAdm\Exception('The resource can not be retrieved');
102 102
 	}
103 103
 
104 104
 
@@ -109,7 +109,7 @@  discard block
 block discarded – undo
109 109
 	 */
110 110
 	public function save()
111 111
 	{
112
-		throw new \Aimeos\Admin\JQAdm\Exception( 'The resource can not be modified' );
112
+		throw new \Aimeos\Admin\JQAdm\Exception('The resource can not be modified');
113 113
 	}
114 114
 
115 115
 
@@ -124,28 +124,28 @@  discard block
 block discarded – undo
124 124
 
125 125
 		try
126 126
 		{
127
-			$this->addOrders( $view );
127
+			$this->addOrders($view);
128 128
 			$view->orderlatestBody = '';
129 129
 
130
-			foreach( $this->getSubClients() as $client ) {
130
+			foreach ($this->getSubClients() as $client) {
131 131
 				$view->orderlatestBody .= $client->search();
132 132
 			}
133 133
 		}
134
-		catch( \Aimeos\MShop\Exception $e )
134
+		catch (\Aimeos\MShop\Exception $e)
135 135
 		{
136
-			$error = array( 'order-latest' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) );
137
-			$view->errors = $view->get( 'errors', array() ) + $error;
136
+			$error = array('order-latest' => $this->getContext()->getI18n()->dt('mshop', $e->getMessage()));
137
+			$view->errors = $view->get('errors', array()) + $error;
138 138
 		}
139
-		catch( \Exception $e )
139
+		catch (\Exception $e)
140 140
 		{
141
-			$error = array( 'order-latest' => $e->getMessage() );
142
-			$view->errors = $view->get( 'errors', array() ) + $error;
141
+			$error = array('order-latest' => $e->getMessage());
142
+			$view->errors = $view->get('errors', array()) + $error;
143 143
 		}
144 144
 
145 145
 		$tplconf = 'admin/jqadm/dashboard/order/latest/template-item';
146 146
 		$default = 'dashboard/item-order-latest-default.php';
147 147
 
148
-		return $view->render( $view->config( $tplconf, $default ) );
148
+		return $view->render($view->config($tplconf, $default));
149 149
 	}
150 150
 
151 151
 
@@ -156,7 +156,7 @@  discard block
 block discarded – undo
156 156
 	 * @param string|null $name Name of the sub-client (Default if null)
157 157
 	 * @return \Aimeos\Admin\JQAdm\Iface Sub-client object
158 158
 	 */
159
-	public function getSubClient( $type, $name = null )
159
+	public function getSubClient($type, $name = null)
160 160
 	{
161 161
 		/** admin/jqadm/dashboard/order/latest/decorators/excludes
162 162
 		 * Excludes decorators added by the "common" option from the dashboard JQAdm client
@@ -231,7 +231,7 @@  discard block
 block discarded – undo
231 231
 		 * @see admin/jqadm/dashboard/order/latest/decorators/excludes
232 232
 		 * @see admin/jqadm/dashboard/order/latest/decorators/global
233 233
 		 */
234
-		return $this->createSubClient( 'dashboard/order/latest/' . $type, $name );
234
+		return $this->createSubClient('dashboard/order/latest/' . $type, $name);
235 235
 	}
236 236
 
237 237
 
@@ -240,23 +240,23 @@  discard block
 block discarded – undo
240 240
 	 *
241 241
 	 * @param \Aimeos\MW\View\Iface $view View object to add the parameters to
242 242
 	 */
243
-	protected function addOrders( \Aimeos\MW\View\Iface $view )
243
+	protected function addOrders(\Aimeos\MW\View\Iface $view)
244 244
 	{
245
-		$manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'order/base' );
245
+		$manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'order/base');
246 246
 
247 247
 		$search = $manager->createSearch();
248
-		$search->setSortations( array( $search->sort( '-', 'order.base.ctime' ) ) );
249
-		$search->setSlice( 0, 10 );
248
+		$search->setSortations(array($search->sort('-', 'order.base.ctime')));
249
+		$search->setSlice(0, 10);
250 250
 
251
-		$orders = $manager->searchItems( $search );
251
+		$orders = $manager->searchItems($search);
252 252
 
253 253
 
254
-		$manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'order' );
254
+		$manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'order');
255 255
 
256 256
 		$search = $manager->createSearch();
257
-		$search->setConditions( $search->compare( '==', 'order.baseid', array_keys( $orders ) ) );
257
+		$search->setConditions($search->compare('==', 'order.baseid', array_keys($orders)));
258 258
 
259
-		$items = $manager->searchItems( $search );
259
+		$items = $manager->searchItems($search);
260 260
 
261 261
 
262 262
 		$view->orderlatestOrders = $orders;
@@ -271,6 +271,6 @@  discard block
 block discarded – undo
271 271
 	 */
272 272
 	protected function getSubClientNames()
273 273
 	{
274
-		return $this->getContext()->getConfig()->get( $this->subPartPath, $this->subPartNames );
274
+		return $this->getContext()->getConfig()->get($this->subPartPath, $this->subPartNames);
275 275
 	}
276 276
 }
Please login to merge, or discard this patch.
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -151,14 +151,12 @@
 block discarded – undo
151 151
 
152 152
 			$manager->commit();
153 153
 			return;
154
-		}
155
-		catch( \Aimeos\MShop\Exception $e )
154
+		} catch( \Aimeos\MShop\Exception $e )
156 155
 		{
157 156
 			$error = array( 'product-item-category' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
158 157
 			$view->errors = $view->get( 'errors', array() ) + $error;
159 158
 			$manager->rollback();
160
-		}
161
-		catch( \Exception $e )
159
+		} catch( \Exception $e )
162 160
 		{
163 161
 			$context->getLogger()->log( $e->getMessage() . ' - ' . $e->getTraceAsString() );
164 162
 			$error = array( 'product-item-category' => $e->getMessage() );
Please login to merge, or discard this patch.
admin/jqadm/src/Admin/JQAdm/Dashboard/Factory.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -30,7 +30,7 @@  discard block
 block discarded – undo
30 30
 	 * @return \Aimeos\Admin\JQAdm\Iface Filter part implementing \Aimeos\Admin\JQAdm\Iface
31 31
 	 * @throws \Aimeos\Admin\JQAdm\Exception If requested client implementation couldn't be found or initialisation fails
32 32
 	 */
33
-	public static function createClient( \Aimeos\MShop\Context\Item\Iface $context, array $templatePaths, $name = null )
33
+	public static function createClient(\Aimeos\MShop\Context\Item\Iface $context, array $templatePaths, $name = null)
34 34
 	{
35 35
 		/** admin/jqadm/dashboard/name
36 36
 		 * Class name of the used account favorite client implementation
@@ -65,22 +65,22 @@  discard block
 block discarded – undo
65 65
 		 * @since 2016.01
66 66
 		 * @category Developer
67 67
 		 */
68
-		if( $name === null ) {
69
-			$name = $context->getConfig()->get( 'admin/jqadm/dashboard/name', 'Standard' );
68
+		if ($name === null) {
69
+			$name = $context->getConfig()->get('admin/jqadm/dashboard/name', 'Standard');
70 70
 		}
71 71
 
72
-		if( ctype_alnum( $name ) === false )
72
+		if (ctype_alnum($name) === false)
73 73
 		{
74
-			$classname = is_string( $name ) ? '\\Aimeos\\Admin\\JQAdm\\Dashboard\\' . $name : '<not a string>';
75
-			throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
74
+			$classname = is_string($name) ? '\\Aimeos\\Admin\\JQAdm\\Dashboard\\' . $name : '<not a string>';
75
+			throw new \Aimeos\Admin\JQAdm\Exception(sprintf('Invalid characters in class name "%1$s"', $classname));
76 76
 		}
77 77
 
78 78
 		$iface = '\\Aimeos\\Admin\\JQAdm\\Iface';
79 79
 		$classname = '\\Aimeos\\Admin\\JQAdm\\Dashboard\\' . $name;
80 80
 
81
-		$client = self::createClientBase( $context, $classname, $iface, $templatePaths );
81
+		$client = self::createClientBase($context, $classname, $iface, $templatePaths);
82 82
 
83
-		return self::addClientDecorators( $context, $client, $templatePaths, 'dashboard' );
83
+		return self::addClientDecorators($context, $client, $templatePaths, 'dashboard');
84 84
 	}
85 85
 
86 86
 }
Please login to merge, or discard this patch.
admin/jqadm/tests/Admin/JQAdm/Product/StandardTest.php 1 patch
Spacing   +145 added lines, -145 removed lines patch added patch discarded remove patch
@@ -17,21 +17,21 @@  discard block
 block discarded – undo
17 17
 	protected function setUp()
18 18
 	{
19 19
 		$this->view = \TestHelperJqadm::getView();
20
-		$request = $this->getMockBuilder( '\Psr\Http\Message\ServerRequestInterface' )->getMock();
21
-		$helper = new \Aimeos\MW\View\Helper\Request\Standard( $this->view, $request, '127.0.0.1', 'test' );
22
-		$this->view ->addHelper( 'request', $helper );
20
+		$request = $this->getMockBuilder('\Psr\Http\Message\ServerRequestInterface')->getMock();
21
+		$helper = new \Aimeos\MW\View\Helper\Request\Standard($this->view, $request, '127.0.0.1', 'test');
22
+		$this->view ->addHelper('request', $helper);
23 23
 
24 24
 		$this->context = \TestHelperJqadm::getContext();
25 25
 		$templatePaths = \TestHelperJqadm::getTemplatePaths();
26 26
 
27
-		$this->object = new \Aimeos\Admin\JQAdm\Product\Standard( $this->context, $templatePaths );
28
-		$this->object->setView( $this->view );
27
+		$this->object = new \Aimeos\Admin\JQAdm\Product\Standard($this->context, $templatePaths);
28
+		$this->object->setView($this->view);
29 29
 	}
30 30
 
31 31
 
32 32
 	protected function tearDown()
33 33
 	{
34
-		unset( $this->object );
34
+		unset($this->object);
35 35
 	}
36 36
 
37 37
 
@@ -43,15 +43,15 @@  discard block
 block discarded – undo
43 43
 
44 44
 	public function testCreateException()
45 45
 	{
46
-		$object = $this->getMockBuilder( '\Aimeos\Admin\JQAdm\Product\Standard' )
47
-			->setConstructorArgs( array( $this->context, \TestHelperJqadm::getTemplatePaths() ) )
48
-			->setMethods( array( 'getSubClients' ) )
46
+		$object = $this->getMockBuilder('\Aimeos\Admin\JQAdm\Product\Standard')
47
+			->setConstructorArgs(array($this->context, \TestHelperJqadm::getTemplatePaths()))
48
+			->setMethods(array('getSubClients'))
49 49
 			->getMock();
50 50
 
51
-		$object->expects( $this->once() )->method( 'getSubClients' )
52
-			->will( $this->throwException( new \Exception() ) );
51
+		$object->expects($this->once())->method('getSubClients')
52
+			->will($this->throwException(new \Exception()));
53 53
 
54
-		$object->setView( $this->getViewNoRender() );
54
+		$object->setView($this->getViewNoRender());
55 55
 
56 56
 		$object->create();
57 57
 	}
@@ -59,15 +59,15 @@  discard block
 block discarded – undo
59 59
 
60 60
 	public function testCreateMShopException()
61 61
 	{
62
-		$object = $this->getMockBuilder( '\Aimeos\Admin\JQAdm\Product\Standard' )
63
-			->setConstructorArgs( array( $this->context, \TestHelperJqadm::getTemplatePaths() ) )
64
-			->setMethods( array( 'getSubClients' ) )
62
+		$object = $this->getMockBuilder('\Aimeos\Admin\JQAdm\Product\Standard')
63
+			->setConstructorArgs(array($this->context, \TestHelperJqadm::getTemplatePaths()))
64
+			->setMethods(array('getSubClients'))
65 65
 			->getMock();
66 66
 
67
-		$object->expects( $this->once() )->method( 'getSubClients' )
68
-			->will( $this->throwException( new \Aimeos\MShop\Exception() ) );
67
+		$object->expects($this->once())->method('getSubClients')
68
+			->will($this->throwException(new \Aimeos\MShop\Exception()));
69 69
 
70
-		$object->setView( $this->getViewNoRender() );
70
+		$object->setView($this->getViewNoRender());
71 71
 
72 72
 		$object->create();
73 73
 	}
@@ -75,29 +75,29 @@  discard block
 block discarded – undo
75 75
 
76 76
 	public function testCopy()
77 77
 	{
78
-		$manager = \Aimeos\MShop\Factory::createManager( $this->context, 'product' );
78
+		$manager = \Aimeos\MShop\Factory::createManager($this->context, 'product');
79 79
 
80
-		$param = array( 'id' => $manager->findItem( 'CNC' )->getId() );
81
-		$helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $param );
82
-		$this->view->addHelper( 'param', $helper );
80
+		$param = array('id' => $manager->findItem('CNC')->getId());
81
+		$helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $param);
82
+		$this->view->addHelper('param', $helper);
83 83
 
84 84
 		$result = $this->object->copy();
85 85
 
86
-		$this->assertContains( 'CNC_copy', $result );
86
+		$this->assertContains('CNC_copy', $result);
87 87
 	}
88 88
 
89 89
 
90 90
 	public function testCopyException()
91 91
 	{
92
-		$object = $this->getMockBuilder( '\Aimeos\Admin\JQAdm\Product\Standard' )
93
-			->setConstructorArgs( array( $this->context, \TestHelperJqadm::getTemplatePaths() ) )
94
-			->setMethods( array( 'getSubClients' ) )
92
+		$object = $this->getMockBuilder('\Aimeos\Admin\JQAdm\Product\Standard')
93
+			->setConstructorArgs(array($this->context, \TestHelperJqadm::getTemplatePaths()))
94
+			->setMethods(array('getSubClients'))
95 95
 			->getMock();
96 96
 
97
-		$object->expects( $this->once() )->method( 'getSubClients' )
98
-			->will( $this->throwException( new \Exception() ) );
97
+		$object->expects($this->once())->method('getSubClients')
98
+			->will($this->throwException(new \Exception()));
99 99
 
100
-		$object->setView( $this->getViewNoRender() );
100
+		$object->setView($this->getViewNoRender());
101 101
 
102 102
 		$object->copy();
103 103
 	}
@@ -105,15 +105,15 @@  discard block
 block discarded – undo
105 105
 
106 106
 	public function testCopyMShopException()
107 107
 	{
108
-		$object = $this->getMockBuilder( '\Aimeos\Admin\JQAdm\Product\Standard' )
109
-			->setConstructorArgs( array( $this->context, \TestHelperJqadm::getTemplatePaths() ) )
110
-			->setMethods( array( 'getSubClients' ) )
108
+		$object = $this->getMockBuilder('\Aimeos\Admin\JQAdm\Product\Standard')
109
+			->setConstructorArgs(array($this->context, \TestHelperJqadm::getTemplatePaths()))
110
+			->setMethods(array('getSubClients'))
111 111
 			->getMock();
112 112
 
113
-		$object->expects( $this->once() )->method( 'getSubClients' )
114
-			->will( $this->throwException( new \Aimeos\MShop\Exception() ) );
113
+		$object->expects($this->once())->method('getSubClients')
114
+			->will($this->throwException(new \Aimeos\MShop\Exception()));
115 115
 
116
-		$object->setView( $this->getViewNoRender() );
116
+		$object->setView($this->getViewNoRender());
117 117
 
118 118
 		$object->copy();
119 119
 	}
@@ -121,21 +121,21 @@  discard block
 block discarded – undo
121 121
 
122 122
 	public function testDelete()
123 123
 	{
124
-		$this->assertNull( $this->object->delete() );
124
+		$this->assertNull($this->object->delete());
125 125
 	}
126 126
 
127 127
 
128 128
 	public function testDeleteException()
129 129
 	{
130
-		$object = $this->getMockBuilder( '\Aimeos\Admin\JQAdm\Product\Standard' )
131
-			->setConstructorArgs( array( $this->context, \TestHelperJqadm::getTemplatePaths() ) )
132
-			->setMethods( array( 'getSubClients' ) )
130
+		$object = $this->getMockBuilder('\Aimeos\Admin\JQAdm\Product\Standard')
131
+			->setConstructorArgs(array($this->context, \TestHelperJqadm::getTemplatePaths()))
132
+			->setMethods(array('getSubClients'))
133 133
 			->getMock();
134 134
 
135
-		$object->expects( $this->once() )->method( 'getSubClients' )
136
-			->will( $this->throwException( new \Exception() ) );
135
+		$object->expects($this->once())->method('getSubClients')
136
+			->will($this->throwException(new \Exception()));
137 137
 
138
-		$object->setView( $this->getViewNoRender() );
138
+		$object->setView($this->getViewNoRender());
139 139
 
140 140
 		$object->delete();
141 141
 	}
@@ -143,15 +143,15 @@  discard block
 block discarded – undo
143 143
 
144 144
 	public function testDeleteMShopException()
145 145
 	{
146
-		$object = $this->getMockBuilder( '\Aimeos\Admin\JQAdm\Product\Standard' )
147
-			->setConstructorArgs( array( $this->context, \TestHelperJqadm::getTemplatePaths() ) )
148
-			->setMethods( array( 'getSubClients' ) )
146
+		$object = $this->getMockBuilder('\Aimeos\Admin\JQAdm\Product\Standard')
147
+			->setConstructorArgs(array($this->context, \TestHelperJqadm::getTemplatePaths()))
148
+			->setMethods(array('getSubClients'))
149 149
 			->getMock();
150 150
 
151
-		$object->expects( $this->once() )->method( 'getSubClients' )
152
-			->will( $this->throwException( new \Aimeos\MShop\Exception() ) );
151
+		$object->expects($this->once())->method('getSubClients')
152
+			->will($this->throwException(new \Aimeos\MShop\Exception()));
153 153
 
154
-		$object->setView( $this->getViewNoRender() );
154
+		$object->setView($this->getViewNoRender());
155 155
 
156 156
 		$object->delete();
157 157
 	}
@@ -159,29 +159,29 @@  discard block
 block discarded – undo
159 159
 
160 160
 	public function testGet()
161 161
 	{
162
-		$manager = \Aimeos\MShop\Factory::createManager( $this->context, 'product' );
162
+		$manager = \Aimeos\MShop\Factory::createManager($this->context, 'product');
163 163
 
164
-		$param = array( 'id' => $manager->findItem( 'CNC' )->getId() );
165
-		$helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $param );
166
-		$this->view->addHelper( 'param', $helper );
164
+		$param = array('id' => $manager->findItem('CNC')->getId());
165
+		$helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $param);
166
+		$this->view->addHelper('param', $helper);
167 167
 
168 168
 		$result = $this->object->get();
169 169
 
170
-		$this->assertContains( 'CNC', $result );
170
+		$this->assertContains('CNC', $result);
171 171
 	}
172 172
 
173 173
 
174 174
 	public function testGetException()
175 175
 	{
176
-		$object = $this->getMockBuilder( '\Aimeos\Admin\JQAdm\Product\Standard' )
177
-			->setConstructorArgs( array( $this->context, \TestHelperJqadm::getTemplatePaths() ) )
178
-			->setMethods( array( 'getSubClients' ) )
176
+		$object = $this->getMockBuilder('\Aimeos\Admin\JQAdm\Product\Standard')
177
+			->setConstructorArgs(array($this->context, \TestHelperJqadm::getTemplatePaths()))
178
+			->setMethods(array('getSubClients'))
179 179
 			->getMock();
180 180
 
181
-		$object->expects( $this->once() )->method( 'getSubClients' )
182
-			->will( $this->throwException( new \Exception() ) );
181
+		$object->expects($this->once())->method('getSubClients')
182
+			->will($this->throwException(new \Exception()));
183 183
 
184
-		$object->setView( $this->getViewNoRender() );
184
+		$object->setView($this->getViewNoRender());
185 185
 
186 186
 		$object->get();
187 187
 	}
@@ -189,15 +189,15 @@  discard block
 block discarded – undo
189 189
 
190 190
 	public function testGetMShopException()
191 191
 	{
192
-		$object = $this->getMockBuilder( '\Aimeos\Admin\JQAdm\Product\Standard' )
193
-			->setConstructorArgs( array( $this->context, \TestHelperJqadm::getTemplatePaths() ) )
194
-			->setMethods( array( 'getSubClients' ) )
192
+		$object = $this->getMockBuilder('\Aimeos\Admin\JQAdm\Product\Standard')
193
+			->setConstructorArgs(array($this->context, \TestHelperJqadm::getTemplatePaths()))
194
+			->setMethods(array('getSubClients'))
195 195
 			->getMock();
196 196
 
197
-		$object->expects( $this->once() )->method( 'getSubClients' )
198
-			->will( $this->throwException( new \Aimeos\MShop\Exception() ) );
197
+		$object->expects($this->once())->method('getSubClients')
198
+			->will($this->throwException(new \Aimeos\MShop\Exception()));
199 199
 
200
-		$object->setView( $this->getViewNoRender() );
200
+		$object->setView($this->getViewNoRender());
201 201
 
202 202
 		$object->get();
203 203
 	}
@@ -205,24 +205,24 @@  discard block
 block discarded – undo
205 205
 
206 206
 	public function testGetViewException()
207 207
 	{
208
-		$object = new \Aimeos\Admin\JQAdm\Product\Standard( $this->context, array() );
208
+		$object = new \Aimeos\Admin\JQAdm\Product\Standard($this->context, array());
209 209
 
210
-		$this->setExpectedException( '\Aimeos\Admin\JQAdm\Exception' );
210
+		$this->setExpectedException('\Aimeos\Admin\JQAdm\Exception');
211 211
 		$object->getView();
212 212
 	}
213 213
 
214 214
 
215 215
 	public function testSave()
216 216
 	{
217
-		$manager = \Aimeos\MShop\Factory::createManager( $this->context, 'product' );
218
-		$typeManager = \Aimeos\MShop\Factory::createManager( $this->context, 'product/type' );
217
+		$manager = \Aimeos\MShop\Factory::createManager($this->context, 'product');
218
+		$typeManager = \Aimeos\MShop\Factory::createManager($this->context, 'product/type');
219 219
 
220 220
 		$search = $typeManager->createSearch();
221
-		$search->setSlice( 0, 1 );
222
-		$typeItems = $typeManager->searchItems( $search );
221
+		$search->setSlice(0, 1);
222
+		$typeItems = $typeManager->searchItems($search);
223 223
 
224
-		if( ( $typeItem = reset( $typeItems ) ) === false ) {
225
-			throw new \Exception( 'No product type item found' );
224
+		if (($typeItem = reset($typeItems)) === false) {
225
+			throw new \Exception('No product type item found');
226 226
 		}
227 227
 
228 228
 
@@ -235,42 +235,42 @@  discard block
 block discarded – undo
235 235
 				'product.datestart' => null,
236 236
 				'product.dateend' => null,
237 237
 				'config' => array(
238
-					'key' => array( 0 => 'test key' ),
239
-					'val' => array( 0 => 'test value' ),
238
+					'key' => array(0 => 'test key'),
239
+					'val' => array(0 => 'test value'),
240 240
 				),
241 241
 			),
242 242
 		);
243 243
 
244
-		$helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $param );
245
-		$this->view->addHelper( 'param', $helper );
244
+		$helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $param);
245
+		$this->view->addHelper('param', $helper);
246 246
 
247 247
 		$this->object->save();
248 248
 
249
-		$manager->deleteItem( $manager->findItem( 'test' )->getId() );
249
+		$manager->deleteItem($manager->findItem('test')->getId());
250 250
 	}
251 251
 
252 252
 
253 253
 	public function testSaveException()
254 254
 	{
255
-		$object = $this->getMockBuilder( '\Aimeos\Admin\JQAdm\Product\Standard' )
256
-			->setConstructorArgs( array( $this->context, \TestHelperJqadm::getTemplatePaths() ) )
257
-			->setMethods( array( 'getSubClients' ) )
255
+		$object = $this->getMockBuilder('\Aimeos\Admin\JQAdm\Product\Standard')
256
+			->setConstructorArgs(array($this->context, \TestHelperJqadm::getTemplatePaths()))
257
+			->setMethods(array('getSubClients'))
258 258
 			->getMock();
259 259
 
260 260
 		$name = 'AdminJQAdmStandard';
261
-		$this->context->getConfig()->set( 'mshop/product/manager/name', $name );
261
+		$this->context->getConfig()->set('mshop/product/manager/name', $name);
262 262
 
263
-		$mock = $this->getMockBuilder( '\Aimeos\MShop\Product\Manager\Standard' )
264
-			->setConstructorArgs( array( $this->context ) )
265
-			->setMethods( array( 'createItem' ) )
263
+		$mock = $this->getMockBuilder('\Aimeos\MShop\Product\Manager\Standard')
264
+			->setConstructorArgs(array($this->context))
265
+			->setMethods(array('createItem'))
266 266
 			->getMock();
267 267
 
268
-		$mock->expects( $this->exactly( 2 ) )->method( 'createItem' )
269
-			->will( $this->throwException( new \Exception() ) );
268
+		$mock->expects($this->exactly(2))->method('createItem')
269
+			->will($this->throwException(new \Exception()));
270 270
 
271
-		\Aimeos\MShop\Product\Manager\Factory::injectManager( '\\Aimeos\\MShop\\Product\\Manager\\' . $name, $mock );
271
+		\Aimeos\MShop\Product\Manager\Factory::injectManager('\\Aimeos\\MShop\\Product\\Manager\\' . $name, $mock);
272 272
 
273
-		$object->setView( $this->getViewNoRender() );
273
+		$object->setView($this->getViewNoRender());
274 274
 
275 275
 		$object->save();
276 276
 	}
@@ -278,25 +278,25 @@  discard block
 block discarded – undo
278 278
 
279 279
 	public function testSaveMShopException()
280 280
 	{
281
-		$object = $this->getMockBuilder( '\Aimeos\Admin\JQAdm\Product\Standard' )
282
-			->setConstructorArgs( array( $this->context, \TestHelperJqadm::getTemplatePaths() ) )
283
-			->setMethods( array( 'getSubClients' ) )
281
+		$object = $this->getMockBuilder('\Aimeos\Admin\JQAdm\Product\Standard')
282
+			->setConstructorArgs(array($this->context, \TestHelperJqadm::getTemplatePaths()))
283
+			->setMethods(array('getSubClients'))
284 284
 			->getMock();
285 285
 
286 286
 		$name = 'AdminJQAdmStandard';
287
-		$this->context->getConfig()->set( 'mshop/product/manager/name', $name );
287
+		$this->context->getConfig()->set('mshop/product/manager/name', $name);
288 288
 
289
-		$mock = $this->getMockBuilder( '\Aimeos\MShop\Product\Manager\Standard' )
290
-			->setConstructorArgs( array( $this->context ) )
291
-			->setMethods( array( 'createItem' ) )
289
+		$mock = $this->getMockBuilder('\Aimeos\MShop\Product\Manager\Standard')
290
+			->setConstructorArgs(array($this->context))
291
+			->setMethods(array('createItem'))
292 292
 			->getMock();
293 293
 
294
-		$mock->expects( $this->exactly( 2 ) )->method( 'createItem' )
295
-			->will( $this->throwException( new \Aimeos\MShop\Exception() ) );
294
+		$mock->expects($this->exactly(2))->method('createItem')
295
+			->will($this->throwException(new \Aimeos\MShop\Exception()));
296 296
 
297
-		\Aimeos\MShop\Product\Manager\Factory::injectManager( '\\Aimeos\\MShop\\Product\\Manager\\' . $name, $mock );
297
+		\Aimeos\MShop\Product\Manager\Factory::injectManager('\\Aimeos\\MShop\\Product\\Manager\\' . $name, $mock);
298 298
 
299
-		$object->setView( $this->getViewNoRender() );
299
+		$object->setView($this->getViewNoRender());
300 300
 
301 301
 		$object->save();
302 302
 	}
@@ -304,25 +304,25 @@  discard block
 block discarded – undo
304 304
 
305 305
 	public function testSaveJQAdmException()
306 306
 	{
307
-		$object = $this->getMockBuilder( '\Aimeos\Admin\JQAdm\Product\Standard' )
308
-			->setConstructorArgs( array( $this->context, \TestHelperJqadm::getTemplatePaths() ) )
309
-			->setMethods( array( 'getSubClients' ) )
307
+		$object = $this->getMockBuilder('\Aimeos\Admin\JQAdm\Product\Standard')
308
+			->setConstructorArgs(array($this->context, \TestHelperJqadm::getTemplatePaths()))
309
+			->setMethods(array('getSubClients'))
310 310
 			->getMock();
311 311
 
312 312
 		$name = 'AdminJQAdmStandard';
313
-		$this->context->getConfig()->set( 'mshop/product/manager/name', $name );
313
+		$this->context->getConfig()->set('mshop/product/manager/name', $name);
314 314
 
315
-		$mock = $this->getMockBuilder( '\Aimeos\MShop\Product\Manager\Standard' )
316
-			->setConstructorArgs( array( $this->context ) )
317
-			->setMethods( array( 'createItem' ) )
315
+		$mock = $this->getMockBuilder('\Aimeos\MShop\Product\Manager\Standard')
316
+			->setConstructorArgs(array($this->context))
317
+			->setMethods(array('createItem'))
318 318
 			->getMock();
319 319
 
320
-		$mock->expects( $this->exactly( 2 ) )->method( 'createItem' )
321
-			->will( $this->throwException( new \Aimeos\Admin\JQAdm\Exception() ) );
320
+		$mock->expects($this->exactly(2))->method('createItem')
321
+			->will($this->throwException(new \Aimeos\Admin\JQAdm\Exception()));
322 322
 
323
-		\Aimeos\MShop\Product\Manager\Factory::injectManager( '\\Aimeos\\MShop\\Product\\Manager\\' . $name, $mock );
323
+		\Aimeos\MShop\Product\Manager\Factory::injectManager('\\Aimeos\\MShop\\Product\\Manager\\' . $name, $mock);
324 324
 
325
-		$object->setView( $this->getViewNoRender() );
325
+		$object->setView($this->getViewNoRender());
326 326
 
327 327
 		$object->save();
328 328
 	}
@@ -333,32 +333,32 @@  discard block
 block discarded – undo
333 333
 		$param = array(
334 334
 			'site' => 'unittest', 'lang' => 'de',
335 335
 			'filter' => array(
336
-				'key' => array( 0 => 'product.code' ),
337
-				'op' => array( 0 => '==' ),
338
-				'val' => array( 0 => 'CNE' ),
336
+				'key' => array(0 => 'product.code'),
337
+				'op' => array(0 => '=='),
338
+				'val' => array(0 => 'CNE'),
339 339
 			),
340
-			'sort' => array( 'product.label', '-product.id' ),
340
+			'sort' => array('product.label', '-product.id'),
341 341
 		);
342
-		$helper = new \Aimeos\MW\View\Helper\Param\Standard( $this->view, $param );
343
-		$this->view->addHelper( 'param', $helper );
342
+		$helper = new \Aimeos\MW\View\Helper\Param\Standard($this->view, $param);
343
+		$this->view->addHelper('param', $helper);
344 344
 
345 345
 		$result = $this->object->search();
346 346
 
347
-		$this->assertContains( '>CNE<', $result );
347
+		$this->assertContains('>CNE<', $result);
348 348
 	}
349 349
 
350 350
 
351 351
 	public function testSearchException()
352 352
 	{
353
-		$object = $this->getMockBuilder( '\Aimeos\Admin\JQAdm\Product\Standard' )
354
-			->setConstructorArgs( array( $this->context, \TestHelperJqadm::getTemplatePaths() ) )
355
-			->setMethods( array( 'getSubClients' ) )
353
+		$object = $this->getMockBuilder('\Aimeos\Admin\JQAdm\Product\Standard')
354
+			->setConstructorArgs(array($this->context, \TestHelperJqadm::getTemplatePaths()))
355
+			->setMethods(array('getSubClients'))
356 356
 			->getMock();
357 357
 
358
-		$object->expects( $this->once() )->method( 'getSubClients' )
359
-			->will( $this->throwException( new \Exception() ) );
358
+		$object->expects($this->once())->method('getSubClients')
359
+			->will($this->throwException(new \Exception()));
360 360
 
361
-		$object->setView( $this->getViewNoRender() );
361
+		$object->setView($this->getViewNoRender());
362 362
 
363 363
 		$object->search();
364 364
 	}
@@ -366,15 +366,15 @@  discard block
 block discarded – undo
366 366
 
367 367
 	public function testSearchMShopException()
368 368
 	{
369
-		$object = $this->getMockBuilder( '\Aimeos\Admin\JQAdm\Product\Standard' )
370
-			->setConstructorArgs( array( $this->context, \TestHelperJqadm::getTemplatePaths() ) )
371
-			->setMethods( array( 'getSubClients' ) )
369
+		$object = $this->getMockBuilder('\Aimeos\Admin\JQAdm\Product\Standard')
370
+			->setConstructorArgs(array($this->context, \TestHelperJqadm::getTemplatePaths()))
371
+			->setMethods(array('getSubClients'))
372 372
 			->getMock();
373 373
 
374
-		$object->expects( $this->once() )->method( 'getSubClients' )
375
-			->will( $this->throwException( new \Aimeos\MShop\Exception() ) );
374
+		$object->expects($this->once())->method('getSubClients')
375
+			->will($this->throwException(new \Aimeos\MShop\Exception()));
376 376
 
377
-		$object->setView( $this->getViewNoRender() );
377
+		$object->setView($this->getViewNoRender());
378 378
 
379 379
 		$object->search();
380 380
 	}
@@ -382,48 +382,48 @@  discard block
 block discarded – undo
382 382
 
383 383
 	public function testGetSubClient()
384 384
 	{
385
-		$result = $this->object->getSubClient( 'image' );
386
-		$this->assertInstanceOf( '\Aimeos\Admin\JQAdm\Iface', $result );
385
+		$result = $this->object->getSubClient('image');
386
+		$this->assertInstanceOf('\Aimeos\Admin\JQAdm\Iface', $result);
387 387
 	}
388 388
 
389 389
 
390 390
 	public function testGetSubClientEmpty()
391 391
 	{
392
-		$this->setExpectedException( '\Aimeos\Admin\JQAdm\Exception' );
393
-		$this->object->getSubClient( '' );
392
+		$this->setExpectedException('\Aimeos\Admin\JQAdm\Exception');
393
+		$this->object->getSubClient('');
394 394
 	}
395 395
 
396 396
 
397 397
 	public function testGetSubClientInvalid()
398 398
 	{
399
-		$this->setExpectedException( '\Aimeos\Admin\JQAdm\Exception' );
400
-		$this->object->getSubClient( 'invalid' );
399
+		$this->setExpectedException('\Aimeos\Admin\JQAdm\Exception');
400
+		$this->object->getSubClient('invalid');
401 401
 	}
402 402
 
403 403
 
404 404
 	public function testGetSubClientDecorators()
405 405
 	{
406
-		$this->context->getConfig()->set( 'admin/jqadm/product/image/decorators/global', array( 'Cache' ) );
406
+		$this->context->getConfig()->set('admin/jqadm/product/image/decorators/global', array('Cache'));
407 407
 
408
-		$result = $this->object->getSubClient( 'image' );
409
-		$this->assertInstanceOf( '\Aimeos\Admin\JQAdm\Iface', $result );
408
+		$result = $this->object->getSubClient('image');
409
+		$this->assertInstanceOf('\Aimeos\Admin\JQAdm\Iface', $result);
410 410
 	}
411 411
 
412 412
 
413 413
 	public function testGetSubClientDecoratorInvalid()
414 414
 	{
415
-		$this->context->getConfig()->set( 'admin/jqadm/product/image/decorators/global', array( 'Invalid' ) );
415
+		$this->context->getConfig()->set('admin/jqadm/product/image/decorators/global', array('Invalid'));
416 416
 
417
-		$this->setExpectedException( '\Aimeos\Admin\JQAdm\Exception' );
418
-		$this->object->getSubClient( 'image' );
417
+		$this->setExpectedException('\Aimeos\Admin\JQAdm\Exception');
418
+		$this->object->getSubClient('image');
419 419
 	}
420 420
 
421 421
 
422 422
 	protected function getViewNoRender()
423 423
 	{
424
-		return $this->getMockBuilder( '\Aimeos\MW\View\Standard' )
425
-			->setConstructorArgs( array( array() ) )
426
-			->setMethods( array( 'render', 'config' ) )
424
+		return $this->getMockBuilder('\Aimeos\MW\View\Standard')
425
+			->setConstructorArgs(array(array()))
426
+			->setMethods(array('render', 'config'))
427 427
 			->getMock();
428 428
 	}
429 429
 }
Please login to merge, or discard this patch.
admin/jqadm/tests/Admin/JQAdm/Dashboard/StandardTest.php 1 patch
Spacing   +29 added lines, -29 removed lines patch added patch discarded remove patch
@@ -19,55 +19,55 @@  discard block
 block discarded – undo
19 19
 	protected function setUp()
20 20
 	{
21 21
 		$this->view = \TestHelperJqadm::getView();
22
-		$request = $this->getMockBuilder( '\Psr\Http\Message\ServerRequestInterface' )->getMock();
23
-		$helper = new \Aimeos\MW\View\Helper\Request\Standard( $this->view, $request, '127.0.0.1', 'test' );
24
-		$this->view ->addHelper( 'request', $helper );
22
+		$request = $this->getMockBuilder('\Psr\Http\Message\ServerRequestInterface')->getMock();
23
+		$helper = new \Aimeos\MW\View\Helper\Request\Standard($this->view, $request, '127.0.0.1', 'test');
24
+		$this->view ->addHelper('request', $helper);
25 25
 
26 26
 		$this->context = \TestHelperJqadm::getContext();
27 27
 		$templatePaths = \TestHelperJqadm::getTemplatePaths();
28 28
 
29
-		$this->object = new \Aimeos\Admin\JQAdm\Dashboard\Standard( $this->context, $templatePaths );
30
-		$this->object->setView( $this->view );
29
+		$this->object = new \Aimeos\Admin\JQAdm\Dashboard\Standard($this->context, $templatePaths);
30
+		$this->object->setView($this->view);
31 31
 	}
32 32
 
33 33
 
34 34
 	protected function tearDown()
35 35
 	{
36
-		unset( $this->object );
36
+		unset($this->object);
37 37
 	}
38 38
 
39 39
 
40 40
 	public function testCreate()
41 41
 	{
42
-		$this->setExpectedException( '\Aimeos\Admin\JQAdm\Exception' );
42
+		$this->setExpectedException('\Aimeos\Admin\JQAdm\Exception');
43 43
 		$this->object->create();
44 44
 	}
45 45
 
46 46
 
47 47
 	public function testCopy()
48 48
 	{
49
-		$this->setExpectedException( '\Aimeos\Admin\JQAdm\Exception' );
49
+		$this->setExpectedException('\Aimeos\Admin\JQAdm\Exception');
50 50
 		$this->object->copy();
51 51
 	}
52 52
 
53 53
 
54 54
 	public function testDelete()
55 55
 	{
56
-		$this->setExpectedException( '\Aimeos\Admin\JQAdm\Exception' );
56
+		$this->setExpectedException('\Aimeos\Admin\JQAdm\Exception');
57 57
 		$this->object->delete();
58 58
 	}
59 59
 
60 60
 
61 61
 	public function testGet()
62 62
 	{
63
-		$this->setExpectedException( '\Aimeos\Admin\JQAdm\Exception' );
63
+		$this->setExpectedException('\Aimeos\Admin\JQAdm\Exception');
64 64
 		$this->object->get();
65 65
 	}
66 66
 
67 67
 
68 68
 	public function testSave()
69 69
 	{
70
-		$this->setExpectedException( '\Aimeos\Admin\JQAdm\Exception' );
70
+		$this->setExpectedException('\Aimeos\Admin\JQAdm\Exception');
71 71
 		$this->object->save();
72 72
 	}
73 73
 
@@ -76,21 +76,21 @@  discard block
 block discarded – undo
76 76
 	{
77 77
 		$result = $this->object->search();
78 78
 
79
-		$this->assertContains( '<div class="dashboard">', $result );
79
+		$this->assertContains('<div class="dashboard">', $result);
80 80
 	}
81 81
 
82 82
 
83 83
 	public function testSearchException()
84 84
 	{
85
-		$object = $this->getMockBuilder( '\Aimeos\Admin\JQAdm\Dashboard\Standard' )
86
-			->setConstructorArgs( array( $this->context, \TestHelperJqadm::getTemplatePaths() ) )
87
-			->setMethods( array( 'getSubClients' ) )
85
+		$object = $this->getMockBuilder('\Aimeos\Admin\JQAdm\Dashboard\Standard')
86
+			->setConstructorArgs(array($this->context, \TestHelperJqadm::getTemplatePaths()))
87
+			->setMethods(array('getSubClients'))
88 88
 			->getMock();
89 89
 
90
-		$object->expects( $this->once() )->method( 'getSubClients' )
91
-			->will( $this->throwException( new \Exception() ) );
90
+		$object->expects($this->once())->method('getSubClients')
91
+			->will($this->throwException(new \Exception()));
92 92
 
93
-		$object->setView( $this->getViewNoRender() );
93
+		$object->setView($this->getViewNoRender());
94 94
 
95 95
 		$object->search();
96 96
 	}
@@ -98,15 +98,15 @@  discard block
 block discarded – undo
98 98
 
99 99
 	public function testSearchMShopException()
100 100
 	{
101
-		$object = $this->getMockBuilder( '\Aimeos\Admin\JQAdm\Dashboard\Standard' )
102
-			->setConstructorArgs( array( $this->context, \TestHelperJqadm::getTemplatePaths() ) )
103
-			->setMethods( array( 'getSubClients' ) )
101
+		$object = $this->getMockBuilder('\Aimeos\Admin\JQAdm\Dashboard\Standard')
102
+			->setConstructorArgs(array($this->context, \TestHelperJqadm::getTemplatePaths()))
103
+			->setMethods(array('getSubClients'))
104 104
 			->getMock();
105 105
 
106
-		$object->expects( $this->once() )->method( 'getSubClients' )
107
-			->will( $this->throwException( new \Aimeos\MShop\Exception() ) );
106
+		$object->expects($this->once())->method('getSubClients')
107
+			->will($this->throwException(new \Aimeos\MShop\Exception()));
108 108
 
109
-		$object->setView( $this->getViewNoRender() );
109
+		$object->setView($this->getViewNoRender());
110 110
 
111 111
 		$object->search();
112 112
 	}
@@ -114,16 +114,16 @@  discard block
 block discarded – undo
114 114
 
115 115
 	public function testGetSubClient()
116 116
 	{
117
-		$result = $this->object->getSubClient( 'order' );
118
-		$this->assertInstanceOf( '\Aimeos\Admin\JQAdm\Iface', $result );
117
+		$result = $this->object->getSubClient('order');
118
+		$this->assertInstanceOf('\Aimeos\Admin\JQAdm\Iface', $result);
119 119
 	}
120 120
 
121 121
 
122 122
 	protected function getViewNoRender()
123 123
 	{
124
-		return $this->getMockBuilder( '\Aimeos\MW\View\Standard' )
125
-			->setConstructorArgs( array( array() ) )
126
-			->setMethods( array( 'render', 'config' ) )
124
+		return $this->getMockBuilder('\Aimeos\MW\View\Standard')
125
+			->setConstructorArgs(array(array()))
126
+			->setMethods(array('render', 'config'))
127 127
 			->getMock();
128 128
 	}
129 129
 }
Please login to merge, or discard this patch.