Completed
Push — master ( 6e8b10...d2a4bf )
by Aimeos
04:17
created
admin/jqadm/src/Admin/JQAdm/Product/Characteristic/Standard.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -166,14 +166,12 @@
 block discarded – undo
166 166
 			}
167 167
 
168 168
 			return;
169
-		}
170
-		catch( \Aimeos\MShop\Exception $e )
169
+		} catch( \Aimeos\MShop\Exception $e )
171 170
 		{
172 171
 			$error = array( 'product-item-characteristic' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) );
173 172
 			$view->errors = $view->get( 'errors', [] ) + $error;
174 173
 			$this->logException( $e );
175
-		}
176
-		catch( \Exception $e )
174
+		} catch( \Exception $e )
177 175
 		{
178 176
 			$error = array( 'product-item-characteristic' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
179 177
 			$view->errors = $view->get( 'errors', [] ) + $error;
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
 namespace Aimeos\Admin\JQAdm\Product\Characteristic;
12 12
 
13
-sprintf( 'characteristic' ); // for translation
13
+sprintf('characteristic'); // for translation
14 14
 
15 15
 
16 16
 /**
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
 
47 47
 		$view->characteristicBody = '';
48 48
 
49
-		foreach( $this->getSubClients() as $client ) {
49
+		foreach ($this->getSubClients() as $client) {
50 50
 			$view->characteristicBody .= $client->copy();
51 51
 		}
52 52
 
53
-		return $this->render( $view );
53
+		return $this->render($view);
54 54
 	}
55 55
 
56 56
 
@@ -65,11 +65,11 @@  discard block
 block discarded – undo
65 65
 
66 66
 		$view->characteristicBody = '';
67 67
 
68
-		foreach( $this->getSubClients() as $client ) {
68
+		foreach ($this->getSubClients() as $client) {
69 69
 			$view->characteristicBody .= $client->create();
70 70
 		}
71 71
 
72
-		return $this->render( $view );
72
+		return $this->render($view);
73 73
 	}
74 74
 
75 75
 
@@ -84,11 +84,11 @@  discard block
 block discarded – undo
84 84
 
85 85
 		$view->characteristicBody = '';
86 86
 
87
-		foreach( $this->getSubClients() as $client ) {
87
+		foreach ($this->getSubClients() as $client) {
88 88
 			$view->characteristicBody .= $client->get();
89 89
 		}
90 90
 
91
-		return $this->render( $view );
91
+		return $this->render($view);
92 92
 	}
93 93
 
94 94
 
@@ -103,23 +103,23 @@  discard block
 block discarded – undo
103 103
 		{
104 104
 			$view->characteristicBody = '';
105 105
 
106
-			foreach( $this->getSubClients() as $client ) {
106
+			foreach ($this->getSubClients() as $client) {
107 107
 				$view->characteristicBody .= $client->save();
108 108
 			}
109 109
 
110 110
 			return;
111 111
 		}
112
-		catch( \Aimeos\MShop\Exception $e )
112
+		catch (\Aimeos\MShop\Exception $e)
113 113
 		{
114
-			$error = array( 'product-item-characteristic' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) );
115
-			$view->errors = $view->get( 'errors', [] ) + $error;
116
-			$this->logException( $e );
114
+			$error = array('product-item-characteristic' => $this->getContext()->getI18n()->dt('mshop', $e->getMessage()));
115
+			$view->errors = $view->get('errors', []) + $error;
116
+			$this->logException($e);
117 117
 		}
118
-		catch( \Exception $e )
118
+		catch (\Exception $e)
119 119
 		{
120
-			$error = array( 'product-item-characteristic' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
121
-			$view->errors = $view->get( 'errors', [] ) + $error;
122
-			$this->logException( $e );
120
+			$error = array('product-item-characteristic' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
121
+			$view->errors = $view->get('errors', []) + $error;
122
+			$this->logException($e);
123 123
 		}
124 124
 
125 125
 		throw new \Aimeos\Admin\JQAdm\Exception();
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 * @param string|null $name Name of the sub-client (Default if null)
134 134
 	 * @return \Aimeos\Admin\JQAdm\Iface Sub-client object
135 135
 	 */
136
-	public function getSubClient( $type, $name = null )
136
+	public function getSubClient($type, $name = null)
137 137
 	{
138 138
 		/** admin/jqadm/product/characteristic/decorators/excludes
139 139
 		 * Excludes decorators added by the "common" option from the product JQAdm client
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 		 * @see admin/jqadm/product/characteristic/decorators/excludes
209 209
 		 * @see admin/jqadm/product/characteristic/decorators/global
210 210
 		 */
211
-		return $this->createSubClient( 'product/characteristic/' . $type, $name );
211
+		return $this->createSubClient('product/characteristic/' . $type, $name);
212 212
 	}
213 213
 
214 214
 
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 		 * @since 2016.01
253 253
 		 * @category Developer
254 254
 		 */
255
-		return $this->getContext()->getConfig()->get( 'admin/jqadm/product/characteristic/standard/subparts', [] );
255
+		return $this->getContext()->getConfig()->get('admin/jqadm/product/characteristic/standard/subparts', []);
256 256
 	}
257 257
 
258 258
 
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 	 * @param \Aimeos\MW\View\Iface $view View object with data assigned
263 263
 	 * @return string HTML output
264 264
 	 */
265
-	protected function render( \Aimeos\MW\View\Iface $view )
265
+	protected function render(\Aimeos\MW\View\Iface $view)
266 266
 	{
267 267
 		/** admin/jqadm/product/characteristic/template-item
268 268
 		 * Relative path to the HTML body template of the characteristic subpart for products.
@@ -286,6 +286,6 @@  discard block
 block discarded – undo
286 286
 		$tplconf = 'admin/jqadm/product/characteristic/template-item';
287 287
 		$default = 'product/item-characteristic-standard';
288 288
 
289
-		return $view->render( $view->config( $tplconf, $default ) );
289
+		return $view->render($view->config($tplconf, $default));
290 290
 	}
291 291
 }
292 292
\ No newline at end of file
Please login to merge, or discard this patch.
admin/jqadm/src/Admin/JQAdm/Product/Option/Standard.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -155,14 +155,12 @@
 block discarded – undo
155 155
 			}
156 156
 
157 157
 			return;
158
-		}
159
-		catch( \Aimeos\MShop\Exception $e )
158
+		} catch( \Aimeos\MShop\Exception $e )
160 159
 		{
161 160
 			$error = array( 'product-item-option' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) );
162 161
 			$view->errors = $view->get( 'errors', [] ) + $error;
163 162
 			$this->logException( $e );
164
-		}
165
-		catch( \Exception $e )
163
+		} catch( \Exception $e )
166 164
 		{
167 165
 			$error = array( 'product-item-option' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
168 166
 			$view->errors = $view->get( 'errors', [] ) + $error;
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
 namespace Aimeos\Admin\JQAdm\Product\Option;
12 12
 
13
-sprintf( 'option' ); // for translation
13
+sprintf('option'); // for translation
14 14
 
15 15
 
16 16
 /**
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
 
47 47
 		$view->optionBody = '';
48 48
 
49
-		foreach( $this->getSubClients() as $client ) {
49
+		foreach ($this->getSubClients() as $client) {
50 50
 			$view->optionBody .= $client->copy();
51 51
 		}
52 52
 
53
-		return $this->render( $view );
53
+		return $this->render($view);
54 54
 	}
55 55
 
56 56
 
@@ -65,11 +65,11 @@  discard block
 block discarded – undo
65 65
 
66 66
 		$view->optionBody = '';
67 67
 
68
-		foreach( $this->getSubClients() as $client ) {
68
+		foreach ($this->getSubClients() as $client) {
69 69
 			$view->optionBody .= $client->create();
70 70
 		}
71 71
 
72
-		return $this->render( $view );
72
+		return $this->render($view);
73 73
 	}
74 74
 
75 75
 
@@ -84,11 +84,11 @@  discard block
 block discarded – undo
84 84
 
85 85
 		$view->optionBody = '';
86 86
 
87
-		foreach( $this->getSubClients() as $client ) {
87
+		foreach ($this->getSubClients() as $client) {
88 88
 			$view->optionBody .= $client->get();
89 89
 		}
90 90
 
91
-		return $this->render( $view );
91
+		return $this->render($view);
92 92
 	}
93 93
 
94 94
 
@@ -103,23 +103,23 @@  discard block
 block discarded – undo
103 103
 		{
104 104
 			$view->optionBody = '';
105 105
 
106
-			foreach( $this->getSubClients() as $client ) {
106
+			foreach ($this->getSubClients() as $client) {
107 107
 				$view->optionBody .= $client->save();
108 108
 			}
109 109
 
110 110
 			return;
111 111
 		}
112
-		catch( \Aimeos\MShop\Exception $e )
112
+		catch (\Aimeos\MShop\Exception $e)
113 113
 		{
114
-			$error = array( 'product-item-option' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) );
115
-			$view->errors = $view->get( 'errors', [] ) + $error;
116
-			$this->logException( $e );
114
+			$error = array('product-item-option' => $this->getContext()->getI18n()->dt('mshop', $e->getMessage()));
115
+			$view->errors = $view->get('errors', []) + $error;
116
+			$this->logException($e);
117 117
 		}
118
-		catch( \Exception $e )
118
+		catch (\Exception $e)
119 119
 		{
120
-			$error = array( 'product-item-option' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
121
-			$view->errors = $view->get( 'errors', [] ) + $error;
122
-			$this->logException( $e );
120
+			$error = array('product-item-option' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
121
+			$view->errors = $view->get('errors', []) + $error;
122
+			$this->logException($e);
123 123
 		}
124 124
 
125 125
 		throw new \Aimeos\Admin\JQAdm\Exception();
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 * @param string|null $name Name of the sub-client (Default if null)
134 134
 	 * @return \Aimeos\Admin\JQAdm\Iface Sub-client object
135 135
 	 */
136
-	public function getSubClient( $type, $name = null )
136
+	public function getSubClient($type, $name = null)
137 137
 	{
138 138
 		/** admin/jqadm/product/option/decorators/excludes
139 139
 		 * Excludes decorators added by the "common" option from the product JQAdm client
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 		 * @see admin/jqadm/product/option/decorators/excludes
209 209
 		 * @see admin/jqadm/product/option/decorators/global
210 210
 		 */
211
-		return $this->createSubClient( 'product/option/' . $type, $name );
211
+		return $this->createSubClient('product/option/' . $type, $name);
212 212
 	}
213 213
 
214 214
 
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 		 * @since 2017.03
253 253
 		 * @category Developer
254 254
 		 */
255
-		return $this->getContext()->getConfig()->get( 'admin/jqadm/product/option/standard/subparts', [] );
255
+		return $this->getContext()->getConfig()->get('admin/jqadm/product/option/standard/subparts', []);
256 256
 	}
257 257
 
258 258
 
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 	 * @param \Aimeos\MW\View\Iface $view View object with data assigned
263 263
 	 * @return string HTML output
264 264
 	 */
265
-	protected function render( \Aimeos\MW\View\Iface $view )
265
+	protected function render(\Aimeos\MW\View\Iface $view)
266 266
 	{
267 267
 		/** admin/jqadm/product/option/template-item
268 268
 		 * Relative path to the HTML body template of the option subpart for products.
@@ -286,6 +286,6 @@  discard block
 block discarded – undo
286 286
 		$tplconf = 'admin/jqadm/product/option/template-item';
287 287
 		$default = 'product/item-option-standard';
288 288
 
289
-		return $view->render( $view->config( $tplconf, $default ) );
289
+		return $view->render($view->config($tplconf, $default));
290 290
 	}
291 291
 }
292 292
\ No newline at end of file
Please login to merge, or discard this patch.
admin/jqadm/src/Admin/JQAdm/Product/Related/Standard.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -155,14 +155,12 @@
 block discarded – undo
155 155
 			}
156 156
 
157 157
 			return;
158
-		}
159
-		catch( \Aimeos\MShop\Exception $e )
158
+		} catch( \Aimeos\MShop\Exception $e )
160 159
 		{
161 160
 			$error = array( 'product-item-related' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) );
162 161
 			$view->errors = $view->get( 'errors', [] ) + $error;
163 162
 			$this->logException( $e );
164
-		}
165
-		catch( \Exception $e )
163
+		} catch( \Exception $e )
166 164
 		{
167 165
 			$error = array( 'product-item-related' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
168 166
 			$view->errors = $view->get( 'errors', [] ) + $error;
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
 namespace Aimeos\Admin\JQAdm\Product\Related;
12 12
 
13
-sprintf( 'related' ); // for translation
13
+sprintf('related'); // for translation
14 14
 
15 15
 
16 16
 /**
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
 
47 47
 		$view->relatedBody = '';
48 48
 
49
-		foreach( $this->getSubClients() as $client ) {
49
+		foreach ($this->getSubClients() as $client) {
50 50
 			$view->relatedBody .= $client->copy();
51 51
 		}
52 52
 
53
-		return $this->render( $view );
53
+		return $this->render($view);
54 54
 	}
55 55
 
56 56
 
@@ -65,11 +65,11 @@  discard block
 block discarded – undo
65 65
 
66 66
 		$view->relatedBody = '';
67 67
 
68
-		foreach( $this->getSubClients() as $client ) {
68
+		foreach ($this->getSubClients() as $client) {
69 69
 			$view->relatedBody .= $client->create();
70 70
 		}
71 71
 
72
-		return $this->render( $view );
72
+		return $this->render($view);
73 73
 	}
74 74
 
75 75
 
@@ -84,11 +84,11 @@  discard block
 block discarded – undo
84 84
 
85 85
 		$view->relatedBody = '';
86 86
 
87
-		foreach( $this->getSubClients() as $client ) {
87
+		foreach ($this->getSubClients() as $client) {
88 88
 			$view->relatedBody .= $client->get();
89 89
 		}
90 90
 
91
-		return $this->render( $view );
91
+		return $this->render($view);
92 92
 	}
93 93
 
94 94
 
@@ -103,23 +103,23 @@  discard block
 block discarded – undo
103 103
 		{
104 104
 			$view->relatedBody = '';
105 105
 
106
-			foreach( $this->getSubClients() as $client ) {
106
+			foreach ($this->getSubClients() as $client) {
107 107
 				$view->relatedBody .= $client->save();
108 108
 			}
109 109
 
110 110
 			return;
111 111
 		}
112
-		catch( \Aimeos\MShop\Exception $e )
112
+		catch (\Aimeos\MShop\Exception $e)
113 113
 		{
114
-			$error = array( 'product-item-related' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) );
115
-			$view->errors = $view->get( 'errors', [] ) + $error;
116
-			$this->logException( $e );
114
+			$error = array('product-item-related' => $this->getContext()->getI18n()->dt('mshop', $e->getMessage()));
115
+			$view->errors = $view->get('errors', []) + $error;
116
+			$this->logException($e);
117 117
 		}
118
-		catch( \Exception $e )
118
+		catch (\Exception $e)
119 119
 		{
120
-			$error = array( 'product-item-related' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
121
-			$view->errors = $view->get( 'errors', [] ) + $error;
122
-			$this->logException( $e );
120
+			$error = array('product-item-related' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
121
+			$view->errors = $view->get('errors', []) + $error;
122
+			$this->logException($e);
123 123
 		}
124 124
 
125 125
 		throw new \Aimeos\Admin\JQAdm\Exception();
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 * @param string|null $name Name of the sub-client (Default if null)
134 134
 	 * @return \Aimeos\Admin\JQAdm\Iface Sub-client object
135 135
 	 */
136
-	public function getSubClient( $type, $name = null )
136
+	public function getSubClient($type, $name = null)
137 137
 	{
138 138
 		/** admin/jqadm/product/related/decorators/excludes
139 139
 		 * Excludes decorators added by the "common" option from the product JQAdm client
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 		 * @see admin/jqadm/product/related/decorators/excludes
209 209
 		 * @see admin/jqadm/product/related/decorators/global
210 210
 		 */
211
-		return $this->createSubClient( 'product/related/' . $type, $name );
211
+		return $this->createSubClient('product/related/' . $type, $name);
212 212
 	}
213 213
 
214 214
 
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 		 * @since 2016.01
253 253
 		 * @category Developer
254 254
 		 */
255
-		return $this->getContext()->getConfig()->get( 'admin/jqadm/product/related/standard/subparts', [] );
255
+		return $this->getContext()->getConfig()->get('admin/jqadm/product/related/standard/subparts', []);
256 256
 	}
257 257
 
258 258
 
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 	 * @param \Aimeos\MW\View\Iface $view View object with data assigned
263 263
 	 * @return string HTML output
264 264
 	 */
265
-	protected function render( \Aimeos\MW\View\Iface $view )
265
+	protected function render(\Aimeos\MW\View\Iface $view)
266 266
 	{
267 267
 		/** admin/jqadm/product/related/template-item
268 268
 		 * Relative path to the HTML body template of the related subpart for products.
@@ -286,6 +286,6 @@  discard block
 block discarded – undo
286 286
 		$tplconf = 'admin/jqadm/product/related/template-item';
287 287
 		$default = 'product/item-related-standard';
288 288
 
289
-		return $view->render( $view->config( $tplconf, $default ) );
289
+		return $view->render($view->config($tplconf, $default));
290 290
 	}
291 291
 }
292 292
\ No newline at end of file
Please login to merge, or discard this patch.
admin/jqadm/src/Admin/JQAdm/Product/Special/Standard.php 2 patches
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -144,14 +144,12 @@
 block discarded – undo
144 144
 			}
145 145
 
146 146
 			return;
147
-		}
148
-		catch( \Aimeos\MShop\Exception $e )
147
+		} catch( \Aimeos\MShop\Exception $e )
149 148
 		{
150 149
 			$error = array( 'product-item-special' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) );
151 150
 			$view->errors = $view->get( 'errors', [] ) + $error;
152 151
 			$this->logException( $e );
153
-		}
154
-		catch( \Exception $e )
152
+		} catch( \Exception $e )
155 153
 		{
156 154
 			$error = array( 'product-item-special' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
157 155
 			$view->errors = $view->get( 'errors', [] ) + $error;
Please login to merge, or discard this patch.
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
 namespace Aimeos\Admin\JQAdm\Product\Special;
12 12
 
13
-sprintf( 'special' ); // for translation
13
+sprintf('special'); // for translation
14 14
 
15 15
 
16 16
 /**
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
 
47 47
 		$view->specialBody = '';
48 48
 
49
-		foreach( $this->getSubClients() as $client ) {
49
+		foreach ($this->getSubClients() as $client) {
50 50
 			$view->specialBody .= $client->copy();
51 51
 		}
52 52
 
53
-		return $this->render( $view );
53
+		return $this->render($view);
54 54
 	}
55 55
 
56 56
 
@@ -65,11 +65,11 @@  discard block
 block discarded – undo
65 65
 
66 66
 		$view->specialBody = '';
67 67
 
68
-		foreach( $this->getSubClients() as $client ) {
68
+		foreach ($this->getSubClients() as $client) {
69 69
 			$view->specialBody .= $client->create();
70 70
 		}
71 71
 
72
-		return $this->render( $view );
72
+		return $this->render($view);
73 73
 	}
74 74
 
75 75
 
@@ -84,11 +84,11 @@  discard block
 block discarded – undo
84 84
 
85 85
 		$view->specialBody = '';
86 86
 
87
-		foreach( $this->getSubClients() as $client ) {
87
+		foreach ($this->getSubClients() as $client) {
88 88
 			$view->specialBody .= $client->get();
89 89
 		}
90 90
 
91
-		return $this->render( $view );
91
+		return $this->render($view);
92 92
 	}
93 93
 
94 94
 
@@ -103,23 +103,23 @@  discard block
 block discarded – undo
103 103
 		{
104 104
 			$view->specialBody = '';
105 105
 
106
-			foreach( $this->getSubClients() as $client ) {
106
+			foreach ($this->getSubClients() as $client) {
107 107
 				$view->specialBody .= $client->save();
108 108
 			}
109 109
 
110 110
 			return;
111 111
 		}
112
-		catch( \Aimeos\MShop\Exception $e )
112
+		catch (\Aimeos\MShop\Exception $e)
113 113
 		{
114
-			$error = array( 'product-item-special' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) );
115
-			$view->errors = $view->get( 'errors', [] ) + $error;
116
-			$this->logException( $e );
114
+			$error = array('product-item-special' => $this->getContext()->getI18n()->dt('mshop', $e->getMessage()));
115
+			$view->errors = $view->get('errors', []) + $error;
116
+			$this->logException($e);
117 117
 		}
118
-		catch( \Exception $e )
118
+		catch (\Exception $e)
119 119
 		{
120
-			$error = array( 'product-item-special' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
121
-			$view->errors = $view->get( 'errors', [] ) + $error;
122
-			$this->logException( $e );
120
+			$error = array('product-item-special' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
121
+			$view->errors = $view->get('errors', []) + $error;
122
+			$this->logException($e);
123 123
 		}
124 124
 
125 125
 		throw new \Aimeos\Admin\JQAdm\Exception();
@@ -133,7 +133,7 @@  discard block
 block discarded – undo
133 133
 	 * @param string|null $name Name of the sub-client (Default if null)
134 134
 	 * @return \Aimeos\Admin\JQAdm\Iface Sub-client object
135 135
 	 */
136
-	public function getSubClient( $type, $name = null )
136
+	public function getSubClient($type, $name = null)
137 137
 	{
138 138
 		/** admin/jqadm/product/special/decorators/excludes
139 139
 		 * Excludes decorators added by the "common" option from the product JQAdm client
@@ -208,7 +208,7 @@  discard block
 block discarded – undo
208 208
 		 * @see admin/jqadm/product/special/decorators/excludes
209 209
 		 * @see admin/jqadm/product/special/decorators/global
210 210
 		 */
211
-		return $this->createSubClient( 'product/special/' . $type, $name );
211
+		return $this->createSubClient('product/special/' . $type, $name);
212 212
 	}
213 213
 
214 214
 
@@ -252,7 +252,7 @@  discard block
 block discarded – undo
252 252
 		 * @since 2016.03
253 253
 		 * @category Developer
254 254
 		 */
255
-		return $this->getContext()->getConfig()->get( 'admin/jqadm/product/special/standard/subparts', [] );
255
+		return $this->getContext()->getConfig()->get('admin/jqadm/product/special/standard/subparts', []);
256 256
 	}
257 257
 
258 258
 
@@ -262,7 +262,7 @@  discard block
 block discarded – undo
262 262
 	 * @param \Aimeos\MW\View\Iface $view View object with data assigned
263 263
 	 * @return string HTML output
264 264
 	 */
265
-	protected function render( \Aimeos\MW\View\Iface $view )
265
+	protected function render(\Aimeos\MW\View\Iface $view)
266 266
 	{
267 267
 		/** admin/jqadm/product/special/template-item
268 268
 		 * Relative path to the HTML body template of the special subpart for products.
@@ -286,6 +286,6 @@  discard block
 block discarded – undo
286 286
 		$tplconf = 'admin/jqadm/product/special/template-item';
287 287
 		$default = 'product/item-special-standard';
288 288
 
289
-		return $view->render( $view->config( $tplconf, $default ) );
289
+		return $view->render($view->config($tplconf, $default));
290 290
 	}
291 291
 }
292 292
\ No newline at end of file
Please login to merge, or discard this patch.
admin/jqadm/tests/Admin/JQAdm/Subscription/FactoryTest.php 1 patch
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -17,42 +17,42 @@
 block discarded – undo
17 17
 	protected function setUp()
18 18
 	{
19 19
 		$this->context = \TestHelperJqadm::getContext();
20
-		$this->context->setView( \TestHelperJqadm::getView() );
20
+		$this->context->setView(\TestHelperJqadm::getView());
21 21
 	}
22 22
 
23 23
 
24 24
 	public function testCreateClient()
25 25
 	{
26
-		$client = \Aimeos\Admin\JQAdm\Subscription\Factory::createClient( $this->context );
27
-		$this->assertInstanceOf( '\\Aimeos\\Admin\\JQAdm\\Iface', $client );
26
+		$client = \Aimeos\Admin\JQAdm\Subscription\Factory::createClient($this->context);
27
+		$this->assertInstanceOf('\\Aimeos\\Admin\\JQAdm\\Iface', $client);
28 28
 	}
29 29
 
30 30
 
31 31
 	public function testCreateClientName()
32 32
 	{
33
-		$client = \Aimeos\Admin\JQAdm\Subscription\Factory::createClient( $this->context, 'Standard' );
34
-		$this->assertInstanceOf( '\\Aimeos\\Admin\\JQAdm\\Iface', $client );
33
+		$client = \Aimeos\Admin\JQAdm\Subscription\Factory::createClient($this->context, 'Standard');
34
+		$this->assertInstanceOf('\\Aimeos\\Admin\\JQAdm\\Iface', $client);
35 35
 	}
36 36
 
37 37
 
38 38
 	public function testCreateClientNameEmpty()
39 39
 	{
40
-		$this->setExpectedException( '\\Aimeos\\Admin\\JQAdm\\Exception' );
41
-		\Aimeos\Admin\JQAdm\Subscription\Factory::createClient( $this->context, '' );
40
+		$this->setExpectedException('\\Aimeos\\Admin\\JQAdm\\Exception');
41
+		\Aimeos\Admin\JQAdm\Subscription\Factory::createClient($this->context, '');
42 42
 	}
43 43
 
44 44
 
45 45
 	public function testCreateClientNameInvalid()
46 46
 	{
47
-		$this->setExpectedException( '\\Aimeos\\Admin\\JQAdm\\Exception' );
48
-		\Aimeos\Admin\JQAdm\Subscription\Factory::createClient( $this->context, '%subscription' );
47
+		$this->setExpectedException('\\Aimeos\\Admin\\JQAdm\\Exception');
48
+		\Aimeos\Admin\JQAdm\Subscription\Factory::createClient($this->context, '%subscription');
49 49
 	}
50 50
 
51 51
 
52 52
 	public function testCreateClientNameNotFound()
53 53
 	{
54
-		$this->setExpectedException( '\\Aimeos\\Admin\\JQAdm\\Exception' );
55
-		\Aimeos\Admin\JQAdm\Subscription\Factory::createClient( $this->context, 'test' );
54
+		$this->setExpectedException('\\Aimeos\\Admin\\JQAdm\\Exception');
55
+		\Aimeos\Admin\JQAdm\Subscription\Factory::createClient($this->context, 'test');
56 56
 	}
57 57
 
58 58
 }
Please login to merge, or discard this patch.
admin/jqadm/src/Admin/JQAdm/Subscription/Standard.php 2 patches
Braces   +15 added lines, -30 removed lines patch added patch discarded remove patch
@@ -88,14 +88,12 @@  discard block
 block discarded – undo
88 88
 				$view->tabindex = ++$idx + 1;
89 89
 				$view->itemBody .= $client->copy();
90 90
 			}
91
-		}
92
-		catch( \Aimeos\MShop\Exception $e )
91
+		} catch( \Aimeos\MShop\Exception $e )
93 92
 		{
94 93
 			$error = array( 'subscription-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
95 94
 			$view->errors = $view->get( 'errors', [] ) + $error;
96 95
 			$this->logException( $e );
97
-		}
98
-		catch( \Exception $e )
96
+		} catch( \Exception $e )
99 97
 		{
100 98
 			$error = array( 'subscription-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
101 99
 			$view->errors = $view->get( 'errors', [] ) + $error;
@@ -137,14 +135,12 @@  discard block
 block discarded – undo
137 135
 				$view->tabindex = ++$idx + 1;
138 136
 				$view->itemBody .= $client->create();
139 137
 			}
140
-		}
141
-		catch( \Aimeos\MShop\Exception $e )
138
+		} catch( \Aimeos\MShop\Exception $e )
142 139
 		{
143 140
 			$error = array( 'subscription-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
144 141
 			$view->errors = $view->get( 'errors', [] ) + $error;
145 142
 			$this->logException( $e );
146
-		}
147
-		catch( \Exception $e )
143
+		} catch( \Exception $e )
148 144
 		{
149 145
 			$error = array( 'subscription-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
150 146
 			$view->errors = $view->get( 'errors', [] ) + $error;
@@ -185,14 +181,12 @@  discard block
 block discarded – undo
185 181
 
186 182
 			$this->nextAction( $view, 'search', 'subscription', null, 'delete' );
187 183
 			return;
188
-		}
189
-		catch( \Aimeos\MShop\Exception $e )
184
+		} catch( \Aimeos\MShop\Exception $e )
190 185
 		{
191 186
 			$error = array( 'subscription-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
192 187
 			$view->errors = $view->get( 'errors', [] ) + $error;
193 188
 			$this->logException( $e );
194
-		}
195
-		catch( \Exception $e )
189
+		} catch( \Exception $e )
196 190
 		{
197 191
 			$error = array( 'subscription-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
198 192
 			$view->errors = $view->get( 'errors', [] ) + $error;
@@ -233,14 +227,12 @@  discard block
 block discarded – undo
233 227
 
234 228
 			$msg = $context->getI18n()->dt( 'admin', 'Your export will be available in a few minutes for download' );
235 229
 			$view->info = $view->get( 'info', [] ) + ['subscription-item' => $msg];
236
-		}
237
-		catch( \Aimeos\MShop\Exception $e )
230
+		} catch( \Aimeos\MShop\Exception $e )
238 231
 		{
239 232
 			$error = array( 'subscription-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
240 233
 			$view->errors = $view->get( 'errors', [] ) + $error;
241 234
 			$this->logException( $e );
242
-		}
243
-		catch( \Exception $e )
235
+		} catch( \Exception $e )
244 236
 		{
245 237
 			$error = array( 'subscription-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
246 238
 			$view->errors = $view->get( 'errors', [] ) + $error;
@@ -279,14 +271,12 @@  discard block
 block discarded – undo
279 271
 				$view->tabindex = ++$idx + 1;
280 272
 				$view->itemBody .= $client->get();
281 273
 			}
282
-		}
283
-		catch( \Aimeos\MShop\Exception $e )
274
+		} catch( \Aimeos\MShop\Exception $e )
284 275
 		{
285 276
 			$error = array( 'subscription-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
286 277
 			$view->errors = $view->get( 'errors', [] ) + $error;
287 278
 			$this->logException( $e );
288
-		}
289
-		catch( \Exception $e )
279
+		} catch( \Exception $e )
290 280
 		{
291 281
 			$error = array( 'subscription-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
292 282
 			$view->errors = $view->get( 'errors', [] ) + $error;
@@ -323,18 +313,15 @@  discard block
 block discarded – undo
323 313
 
324 314
 			$this->nextAction( $view, $view->param( 'next' ), 'subscription', $view->item->getId(), 'save' );
325 315
 			return;
326
-		}
327
-		catch( \Aimeos\Admin\JQAdm\Exception $e )
316
+		} catch( \Aimeos\Admin\JQAdm\Exception $e )
328 317
 		{
329 318
 			// fall through to create
330
-		}
331
-		catch( \Aimeos\MShop\Exception $e )
319
+		} catch( \Aimeos\MShop\Exception $e )
332 320
 		{
333 321
 			$error = array( 'subscription-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
334 322
 			$view->errors = $view->get( 'errors', [] ) + $error;
335 323
 			$this->logException( $e );
336
-		}
337
-		catch( \Exception $e )
324
+		} catch( \Exception $e )
338 325
 		{
339 326
 			$error = array( 'subscription-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
340 327
 			$view->errors = $view->get( 'errors', [] ) + $error;
@@ -376,14 +363,12 @@  discard block
 block discarded – undo
376 363
 			foreach( $this->getSubClients() as $client ) {
377 364
 				$view->itemBody .= $client->search();
378 365
 			}
379
-		}
380
-		catch( \Aimeos\MShop\Exception $e )
366
+		} catch( \Aimeos\MShop\Exception $e )
381 367
 		{
382 368
 			$error = array( 'subscription-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
383 369
 			$view->errors = $view->get( 'errors', [] ) + $error;
384 370
 			$this->logException( $e );
385
-		}
386
-		catch( \Exception $e )
371
+		} catch( \Exception $e )
387 372
 		{
388 373
 			$error = array( 'subscription-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
389 374
 			$view->errors = $view->get( 'errors', [] ) + $error;
Please login to merge, or discard this patch.
Spacing   +135 added lines, -135 removed lines patch added patch discarded remove patch
@@ -10,7 +10,7 @@  discard block
 block discarded – undo
10 10
 
11 11
 namespace Aimeos\Admin\JQAdm\Subscription;
12 12
 
13
-sprintf( 'subscription' ); // for translation
13
+sprintf('subscription'); // for translation
14 14
 
15 15
 
16 16
 /**
@@ -35,39 +35,39 @@  discard block
 block discarded – undo
35 35
 
36 36
 		try
37 37
 		{
38
-			if( ( $id = $view->param( 'id' ) ) === null ) {
39
-				throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Required parameter "%1$s" is missing', 'id' ) );
38
+			if (($id = $view->param('id')) === null) {
39
+				throw new \Aimeos\Admin\JQAdm\Exception(sprintf('Required parameter "%1$s" is missing', 'id'));
40 40
 			}
41 41
 
42
-			$manager = \Aimeos\MShop\Factory::createManager( $context, 'subscription' );
43
-			$baseManager = \Aimeos\MShop\Factory::createManager( $context, 'order/base' );
42
+			$manager = \Aimeos\MShop\Factory::createManager($context, 'subscription');
43
+			$baseManager = \Aimeos\MShop\Factory::createManager($context, 'order/base');
44 44
 
45
-			$view->item = $manager->getItem( $id );
46
-			$view->itemBase = $baseManager->getItem( $view->item->getOrderBaseId(), ['order/base/address', 'order/base/product'] );
47
-			$view->itemData = $this->toArray( $view->item, true );
45
+			$view->item = $manager->getItem($id);
46
+			$view->itemBase = $baseManager->getItem($view->item->getOrderBaseId(), ['order/base/address', 'order/base/product']);
47
+			$view->itemData = $this->toArray($view->item, true);
48 48
 			$view->itemSubparts = $this->getSubClientNames();
49 49
 			$view->itemBody = '';
50 50
 
51
-			foreach( $this->getSubClients() as $idx => $client )
51
+			foreach ($this->getSubClients() as $idx => $client)
52 52
 			{
53 53
 				$view->tabindex = ++$idx + 1;
54 54
 				$view->itemBody .= $client->copy();
55 55
 			}
56 56
 		}
57
-		catch( \Aimeos\MShop\Exception $e )
57
+		catch (\Aimeos\MShop\Exception $e)
58 58
 		{
59
-			$error = array( 'subscription-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
60
-			$view->errors = $view->get( 'errors', [] ) + $error;
61
-			$this->logException( $e );
59
+			$error = array('subscription-item' => $context->getI18n()->dt('mshop', $e->getMessage()));
60
+			$view->errors = $view->get('errors', []) + $error;
61
+			$this->logException($e);
62 62
 		}
63
-		catch( \Exception $e )
63
+		catch (\Exception $e)
64 64
 		{
65
-			$error = array( 'subscription-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
66
-			$view->errors = $view->get( 'errors', [] ) + $error;
67
-			$this->logException( $e );
65
+			$error = array('subscription-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
66
+			$view->errors = $view->get('errors', []) + $error;
67
+			$this->logException($e);
68 68
 		}
69 69
 
70
-		return $this->render( $view );
70
+		return $this->render($view);
71 71
 	}
72 72
 
73 73
 
@@ -83,17 +83,17 @@  discard block
 block discarded – undo
83 83
 
84 84
 		try
85 85
 		{
86
-			$data = $view->param( 'item', [] );
86
+			$data = $view->param('item', []);
87 87
 
88
-			if( !isset( $view->item ) ) {
89
-				$view->item = \Aimeos\MShop\Factory::createManager( $context, 'subscription' )->createItem();
88
+			if (!isset($view->item)) {
89
+				$view->item = \Aimeos\MShop\Factory::createManager($context, 'subscription')->createItem();
90 90
 			}
91 91
 
92
-			$baseManager = \Aimeos\MShop\Factory::createManager( $context, 'order/base' );
93
-			$baseId = ( $view->item->getOrderBaseId() ?: $view->param( 'item/subscription.ordbaseid' ) );
92
+			$baseManager = \Aimeos\MShop\Factory::createManager($context, 'order/base');
93
+			$baseId = ($view->item->getOrderBaseId() ?: $view->param('item/subscription.ordbaseid'));
94 94
 
95
-			if( $baseId ) {
96
-				$view->itemBase = $baseManager->getItem( $baseId, ['order/base/address', 'order/base/product'] );
95
+			if ($baseId) {
96
+				$view->itemBase = $baseManager->getItem($baseId, ['order/base/address', 'order/base/product']);
97 97
 			} else {
98 98
 				$view->itemBase = $baseManager->createItem();
99 99
 			}
@@ -104,26 +104,26 @@  discard block
 block discarded – undo
104 104
 			$view->itemData = $data;
105 105
 			$view->itemBody = '';
106 106
 
107
-			foreach( $this->getSubClients() as $idx => $client )
107
+			foreach ($this->getSubClients() as $idx => $client)
108 108
 			{
109 109
 				$view->tabindex = ++$idx + 1;
110 110
 				$view->itemBody .= $client->create();
111 111
 			}
112 112
 		}
113
-		catch( \Aimeos\MShop\Exception $e )
113
+		catch (\Aimeos\MShop\Exception $e)
114 114
 		{
115
-			$error = array( 'subscription-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
116
-			$view->errors = $view->get( 'errors', [] ) + $error;
117
-			$this->logException( $e );
115
+			$error = array('subscription-item' => $context->getI18n()->dt('mshop', $e->getMessage()));
116
+			$view->errors = $view->get('errors', []) + $error;
117
+			$this->logException($e);
118 118
 		}
119
-		catch( \Exception $e )
119
+		catch (\Exception $e)
120 120
 		{
121
-			$error = array( 'subscription-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
122
-			$view->errors = $view->get( 'errors', [] ) + $error;
123
-			$this->logException( $e );
121
+			$error = array('subscription-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
122
+			$view->errors = $view->get('errors', []) + $error;
123
+			$this->logException($e);
124 124
 		}
125 125
 
126
-		return $this->render( $view );
126
+		return $this->render($view);
127 127
 	}
128 128
 
129 129
 
@@ -137,38 +137,38 @@  discard block
 block discarded – undo
137 137
 		$view = $this->getView();
138 138
 		$context = $this->getContext();
139 139
 
140
-		$manager = \Aimeos\MShop\Factory::createManager( $context, 'subscription' );
140
+		$manager = \Aimeos\MShop\Factory::createManager($context, 'subscription');
141 141
 		$manager->begin();
142 142
 
143 143
 		try
144 144
 		{
145
-			if( ( $id = $view->param( 'id' ) ) === null ) {
146
-				throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Required parameter "%1$s" is missing', 'id' ) );
145
+			if (($id = $view->param('id')) === null) {
146
+				throw new \Aimeos\Admin\JQAdm\Exception(sprintf('Required parameter "%1$s" is missing', 'id'));
147 147
 			}
148 148
 
149
-			$view->item = $manager->getItem( $id );
149
+			$view->item = $manager->getItem($id);
150 150
 
151
-			foreach( $this->getSubClients() as $client ) {
151
+			foreach ($this->getSubClients() as $client) {
152 152
 				$client->delete();
153 153
 			}
154 154
 
155
-			$manager->deleteItem( $id );
155
+			$manager->deleteItem($id);
156 156
 			$manager->commit();
157 157
 
158
-			$this->nextAction( $view, 'search', 'subscription', null, 'delete' );
158
+			$this->nextAction($view, 'search', 'subscription', null, 'delete');
159 159
 			return;
160 160
 		}
161
-		catch( \Aimeos\MShop\Exception $e )
161
+		catch (\Aimeos\MShop\Exception $e)
162 162
 		{
163
-			$error = array( 'subscription-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
164
-			$view->errors = $view->get( 'errors', [] ) + $error;
165
-			$this->logException( $e );
163
+			$error = array('subscription-item' => $context->getI18n()->dt('mshop', $e->getMessage()));
164
+			$view->errors = $view->get('errors', []) + $error;
165
+			$this->logException($e);
166 166
 		}
167
-		catch( \Exception $e )
167
+		catch (\Exception $e)
168 168
 		{
169
-			$error = array( 'subscription-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
170
-			$view->errors = $view->get( 'errors', [] ) + $error;
171
-			$this->logException( $e );
169
+			$error = array('subscription-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
170
+			$view->errors = $view->get('errors', []) + $error;
171
+			$this->logException($e);
172 172
 		}
173 173
 
174 174
 		$manager->rollback();
@@ -189,34 +189,34 @@  discard block
 block discarded – undo
189 189
 
190 190
 		try
191 191
 		{
192
-			$params = $this->storeSearchParams( $view->param(), 'subscription' );
192
+			$params = $this->storeSearchParams($view->param(), 'subscription');
193 193
 			$msg = ['sitecode' => $context->getLocale()->getSite()->getCode()];
194 194
 
195
-			if( isset( $params['filter'] ) ) {
196
-				$msg['filter'] = $this->getCriteriaConditions( $params['filter'] );
195
+			if (isset($params['filter'])) {
196
+				$msg['filter'] = $this->getCriteriaConditions($params['filter']);
197 197
 			}
198 198
 
199
-			if( isset( $params['sort'] ) ) {
200
-				$msg['sort'] = $this->getCriteriaSortations( $params['sort'] );
199
+			if (isset($params['sort'])) {
200
+				$msg['sort'] = $this->getCriteriaSortations($params['sort']);
201 201
 			}
202 202
 
203
-			$mq = $context->getMessageQueueManager()->get( 'mq-admin' )->getQueue( 'subscription-export' );
204
-			$mq->add( json_encode( $msg ) );
203
+			$mq = $context->getMessageQueueManager()->get('mq-admin')->getQueue('subscription-export');
204
+			$mq->add(json_encode($msg));
205 205
 
206
-			$msg = $context->getI18n()->dt( 'admin', 'Your export will be available in a few minutes for download' );
207
-			$view->info = $view->get( 'info', [] ) + ['subscription-item' => $msg];
206
+			$msg = $context->getI18n()->dt('admin', 'Your export will be available in a few minutes for download');
207
+			$view->info = $view->get('info', []) + ['subscription-item' => $msg];
208 208
 		}
209
-		catch( \Aimeos\MShop\Exception $e )
209
+		catch (\Aimeos\MShop\Exception $e)
210 210
 		{
211
-			$error = array( 'subscription-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
212
-			$view->errors = $view->get( 'errors', [] ) + $error;
213
-			$this->logException( $e );
211
+			$error = array('subscription-item' => $context->getI18n()->dt('mshop', $e->getMessage()));
212
+			$view->errors = $view->get('errors', []) + $error;
213
+			$this->logException($e);
214 214
 		}
215
-		catch( \Exception $e )
215
+		catch (\Exception $e)
216 216
 		{
217
-			$error = array( 'subscription-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
218
-			$view->errors = $view->get( 'errors', [] ) + $error;
219
-			$this->logException( $e );
217
+			$error = array('subscription-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
218
+			$view->errors = $view->get('errors', []) + $error;
219
+			$this->logException($e);
220 220
 		}
221 221
 
222 222
 		return $this->search();
@@ -235,39 +235,39 @@  discard block
 block discarded – undo
235 235
 
236 236
 		try
237 237
 		{
238
-			if( ( $id = $view->param( 'id' ) ) === null ) {
239
-				throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Required parameter "%1$s" is missing', 'id' ) );
238
+			if (($id = $view->param('id')) === null) {
239
+				throw new \Aimeos\Admin\JQAdm\Exception(sprintf('Required parameter "%1$s" is missing', 'id'));
240 240
 			}
241 241
 
242
-			$manager = \Aimeos\MShop\Factory::createManager( $context, 'subscription' );
243
-			$baseManager = \Aimeos\MShop\Factory::createManager( $context, 'order/base' );
242
+			$manager = \Aimeos\MShop\Factory::createManager($context, 'subscription');
243
+			$baseManager = \Aimeos\MShop\Factory::createManager($context, 'order/base');
244 244
 
245
-			$view->item = $manager->getItem( $id );
246
-			$view->itemBase = $baseManager->getItem( $view->item->getOrderBaseId(), ['order/base/address', 'order/base/product'] );
245
+			$view->item = $manager->getItem($id);
246
+			$view->itemBase = $baseManager->getItem($view->item->getOrderBaseId(), ['order/base/address', 'order/base/product']);
247 247
 			$view->itemSubparts = $this->getSubClientNames();
248
-			$view->itemData = $this->toArray( $view->item );
248
+			$view->itemData = $this->toArray($view->item);
249 249
 			$view->itemBody = '';
250 250
 
251
-			foreach( $this->getSubClients() as $idx => $client )
251
+			foreach ($this->getSubClients() as $idx => $client)
252 252
 			{
253 253
 				$view->tabindex = ++$idx + 1;
254 254
 				$view->itemBody .= $client->get();
255 255
 			}
256 256
 		}
257
-		catch( \Aimeos\MShop\Exception $e )
257
+		catch (\Aimeos\MShop\Exception $e)
258 258
 		{
259
-			$error = array( 'subscription-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
260
-			$view->errors = $view->get( 'errors', [] ) + $error;
261
-			$this->logException( $e );
259
+			$error = array('subscription-item' => $context->getI18n()->dt('mshop', $e->getMessage()));
260
+			$view->errors = $view->get('errors', []) + $error;
261
+			$this->logException($e);
262 262
 		}
263
-		catch( \Exception $e )
263
+		catch (\Exception $e)
264 264
 		{
265
-			$error = array( 'subscription-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
266
-			$view->errors = $view->get( 'errors', [] ) + $error;
267
-			$this->logException( $e );
265
+			$error = array('subscription-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
266
+			$view->errors = $view->get('errors', []) + $error;
267
+			$this->logException($e);
268 268
 		}
269 269
 
270
-		return $this->render( $view );
270
+		return $this->render($view);
271 271
 	}
272 272
 
273 273
 
@@ -281,40 +281,40 @@  discard block
 block discarded – undo
281 281
 		$view = $this->getView();
282 282
 		$context = $this->getContext();
283 283
 
284
-		$manager = \Aimeos\MShop\Factory::createManager( $context, 'subscription' );
284
+		$manager = \Aimeos\MShop\Factory::createManager($context, 'subscription');
285 285
 		$manager->begin();
286 286
 
287 287
 		try
288 288
 		{
289
-			$item = $this->fromArray( $view->param( 'item', [] ) );
290
-			$view->item = $item->getId() ? $item : $manager->saveItem( $item );
289
+			$item = $this->fromArray($view->param('item', []));
290
+			$view->item = $item->getId() ? $item : $manager->saveItem($item);
291 291
 			$view->itemBody = '';
292 292
 
293
-			foreach( $this->getSubClients() as $client ) {
293
+			foreach ($this->getSubClients() as $client) {
294 294
 				$view->itemBody .= $client->save();
295 295
 			}
296 296
 
297
-			$manager->saveItem( clone $view->item );
297
+			$manager->saveItem(clone $view->item);
298 298
 			$manager->commit();
299 299
 
300
-			$this->nextAction( $view, $view->param( 'next' ), 'subscription', $view->item->getId(), 'save' );
300
+			$this->nextAction($view, $view->param('next'), 'subscription', $view->item->getId(), 'save');
301 301
 			return;
302 302
 		}
303
-		catch( \Aimeos\Admin\JQAdm\Exception $e )
303
+		catch (\Aimeos\Admin\JQAdm\Exception $e)
304 304
 		{
305 305
 			// fall through to create
306 306
 		}
307
-		catch( \Aimeos\MShop\Exception $e )
307
+		catch (\Aimeos\MShop\Exception $e)
308 308
 		{
309
-			$error = array( 'subscription-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
310
-			$view->errors = $view->get( 'errors', [] ) + $error;
311
-			$this->logException( $e );
309
+			$error = array('subscription-item' => $context->getI18n()->dt('mshop', $e->getMessage()));
310
+			$view->errors = $view->get('errors', []) + $error;
311
+			$this->logException($e);
312 312
 		}
313
-		catch( \Exception $e )
313
+		catch (\Exception $e)
314 314
 		{
315
-			$error = array( 'subscription-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
316
-			$view->errors = $view->get( 'errors', [] ) + $error;
317
-			$this->logException( $e );
315
+			$error = array('subscription-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
316
+			$view->errors = $view->get('errors', []) + $error;
317
+			$this->logException($e);
318 318
 		}
319 319
 
320 320
 		$manager->rollback();
@@ -336,35 +336,35 @@  discard block
 block discarded – undo
336 336
 		try
337 337
 		{
338 338
 			$total = 0;
339
-			$params = $this->storeSearchParams( $view->param(), 'subscription' );
340
-			$manager = \Aimeos\MShop\Factory::createManager( $context, 'subscription' );
339
+			$params = $this->storeSearchParams($view->param(), 'subscription');
340
+			$manager = \Aimeos\MShop\Factory::createManager($context, 'subscription');
341 341
 
342 342
 			$search = $manager->createSearch();
343
-			$search->setSortations( [$search->sort( '-', 'subscription.ctime' )] );
344
-			$search = $this->initCriteria( $search, $params );
343
+			$search->setSortations([$search->sort('-', 'subscription.ctime')]);
344
+			$search = $this->initCriteria($search, $params);
345 345
 
346
-			$view->items = $manager->searchItems( $search, [], $total );
347
-			$view->baseItems = $this->getOrderBaseItems( $view->items );
348
-			$view->filterAttributes = $manager->getSearchAttributes( true );
346
+			$view->items = $manager->searchItems($search, [], $total);
347
+			$view->baseItems = $this->getOrderBaseItems($view->items);
348
+			$view->filterAttributes = $manager->getSearchAttributes(true);
349 349
 			$view->filterOperators = $search->getOperators();
350 350
 			$view->total = $total;
351 351
 			$view->itemBody = '';
352 352
 
353
-			foreach( $this->getSubClients() as $client ) {
353
+			foreach ($this->getSubClients() as $client) {
354 354
 				$view->itemBody .= $client->search();
355 355
 			}
356 356
 		}
357
-		catch( \Aimeos\MShop\Exception $e )
357
+		catch (\Aimeos\MShop\Exception $e)
358 358
 		{
359
-			$error = array( 'subscription-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
360
-			$view->errors = $view->get( 'errors', [] ) + $error;
361
-			$this->logException( $e );
359
+			$error = array('subscription-item' => $context->getI18n()->dt('mshop', $e->getMessage()));
360
+			$view->errors = $view->get('errors', []) + $error;
361
+			$this->logException($e);
362 362
 		}
363
-		catch( \Exception $e )
363
+		catch (\Exception $e)
364 364
 		{
365
-			$error = array( 'subscription-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
366
-			$view->errors = $view->get( 'errors', [] ) + $error;
367
-			$this->logException( $e );
365
+			$error = array('subscription-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
366
+			$view->errors = $view->get('errors', []) + $error;
367
+			$this->logException($e);
368 368
 		}
369 369
 
370 370
 		/** admin/jqadm/subscription/template-list
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
 		$tplconf = 'admin/jqadm/subscription/template-list';
390 390
 		$default = 'subscription/list-standard';
391 391
 
392
-		return $view->render( $view->config( $tplconf, $default ) );
392
+		return $view->render($view->config($tplconf, $default));
393 393
 	}
394 394
 
395 395
 
@@ -400,7 +400,7 @@  discard block
 block discarded – undo
400 400
 	 * @param string|null $name Name of the sub-client (Default if null)
401 401
 	 * @return \Aimeos\Admin\JQAdm\Iface Sub-client object
402 402
 	 */
403
-	public function getSubClient( $type, $name = null )
403
+	public function getSubClient($type, $name = null)
404 404
 	{
405 405
 		/** admin/jqadm/subscription/decorators/excludes
406 406
 		 * Excludes decorators added by the "common" option from the subscription JQAdm client
@@ -475,7 +475,7 @@  discard block
 block discarded – undo
475 475
 		 * @see admin/jqadm/subscription/decorators/excludes
476 476
 		 * @see admin/jqadm/subscription/decorators/global
477 477
 		 */
478
-		return $this->createSubClient( 'subscription/' . $type, $name );
478
+		return $this->createSubClient('subscription/' . $type, $name);
479 479
 	}
480 480
 
481 481
 
@@ -485,19 +485,19 @@  discard block
 block discarded – undo
485 485
 	 * @param \Aimeos\MShop\Subscription\Item\Iface[] $items List of subscription items
486 486
 	 * @param \Aimeos\MShop\Order\Item\Base\Iface[] List of order base items
487 487
 	 */
488
-	protected function getOrderBaseItems( array $items )
488
+	protected function getOrderBaseItems(array $items)
489 489
 	{
490 490
 		$baseIds = [];
491
-		foreach( $items as $item ) {
491
+		foreach ($items as $item) {
492 492
 			$baseIds[] = $item->getOrderBaseId();
493 493
 		}
494 494
 
495
-		$manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'order/base' );
495
+		$manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'order/base');
496 496
 
497
-		$search = $manager->createSearch()->setSlice( 0, count( $baseIds ) );
498
-		$search->setConditions( $search->compare( '==', 'order.base.id', $baseIds ) );
497
+		$search = $manager->createSearch()->setSlice(0, count($baseIds));
498
+		$search->setConditions($search->compare('==', 'order.base.id', $baseIds));
499 499
 
500
-		return $manager->searchItems( $search, ['order/base/address', 'order/base/product'] );
500
+		return $manager->searchItems($search, ['order/base/address', 'order/base/product']);
501 501
 	}
502 502
 
503 503
 
@@ -541,7 +541,7 @@  discard block
 block discarded – undo
541 541
 		 * @since 2018.04
542 542
 		 * @category Developer
543 543
 		 */
544
-		return $this->getContext()->getConfig()->get( 'admin/jqadm/subscription/standard/subparts', [] );
544
+		return $this->getContext()->getConfig()->get('admin/jqadm/subscription/standard/subparts', []);
545 545
 	}
546 546
 
547 547
 
@@ -551,17 +551,17 @@  discard block
 block discarded – undo
551 551
 	 * @param string[] Data array
552 552
 	 * @return \Aimeos\MShop\Subscription\Item\Iface New subscription item object
553 553
 	 */
554
-	protected function fromArray( array $data )
554
+	protected function fromArray(array $data)
555 555
 	{
556
-		$manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'subscription' );
556
+		$manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'subscription');
557 557
 
558
-		if( isset( $data['subscription.id'] ) && $data['subscription.id'] != '' ) {
559
-			$item = $manager->getItem( $data['subscription.id'] );
558
+		if (isset($data['subscription.id']) && $data['subscription.id'] != '') {
559
+			$item = $manager->getItem($data['subscription.id']);
560 560
 		} else {
561 561
 			$item = $manager->createItem();
562 562
 		}
563 563
 
564
-		$item->fromArray( $data );
564
+		$item->fromArray($data);
565 565
 
566 566
 		return $item;
567 567
 	}
@@ -573,12 +573,12 @@  discard block
 block discarded – undo
573 573
 	 * @param \Aimeos\MShop\Subscription\Item\Iface $item Subscription item object
574 574
 	 * @return string[] Multi-dimensional associative list of item data
575 575
 	 */
576
-	protected function toArray( \Aimeos\MShop\Subscription\Item\Iface $item, $copy = false )
576
+	protected function toArray(\Aimeos\MShop\Subscription\Item\Iface $item, $copy = false)
577 577
 	{
578 578
 		$siteId = $this->getContext()->getLocale()->getSiteId();
579
-		$data = $item->toArray( true );
579
+		$data = $item->toArray(true);
580 580
 
581
-		if( $copy === true )
581
+		if ($copy === true)
582 582
 		{
583 583
 			$data['subscription.siteid'] = $siteId;
584 584
 			$data['subscription.id'] = '';
@@ -594,7 +594,7 @@  discard block
 block discarded – undo
594 594
 	 * @param \Aimeos\MW\View\Iface $view View object with data assigned
595 595
 	 * @return string HTML output
596 596
 	 */
597
-	protected function render( \Aimeos\MW\View\Iface $view )
597
+	protected function render(\Aimeos\MW\View\Iface $view)
598 598
 	{
599 599
 		/** admin/jqadm/subscription/template-item
600 600
 		 * Relative path to the HTML body template for the subscription item.
@@ -618,6 +618,6 @@  discard block
 block discarded – undo
618 618
 		$tplconf = 'admin/jqadm/subscription/template-item';
619 619
 		$default = 'subscription/item-standard';
620 620
 
621
-		return $view->render( $view->config( $tplconf, $default ) );
621
+		return $view->render($view->config($tplconf, $default));
622 622
 	}
623 623
 }
Please login to merge, or discard this patch.
admin/jqadm/src/Admin/JQAdm/Subscription/Factory.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	 * @return \Aimeos\Admin\JQAdm\Iface Filter part implementing \Aimeos\Admin\JQAdm\Iface
30 30
 	 * @throws \Aimeos\Admin\JQAdm\Exception If requested client implementation couldn't be found or initialisation fails
31 31
 	 */
32
-	public static function createClient( \Aimeos\MShop\Context\Item\Iface $context, $name = null )
32
+	public static function createClient(\Aimeos\MShop\Context\Item\Iface $context, $name = null)
33 33
 	{
34 34
 		/** admin/jqadm/subscription/name
35 35
 		 * Class name of the used account favorite client implementation
@@ -64,22 +64,22 @@  discard block
 block discarded – undo
64 64
 		 * @since 2018.04
65 65
 		 * @category Developer
66 66
 		 */
67
-		if( $name === null ) {
68
-			$name = $context->getConfig()->get( 'admin/jqadm/subscription/name', 'Standard' );
67
+		if ($name === null) {
68
+			$name = $context->getConfig()->get('admin/jqadm/subscription/name', 'Standard');
69 69
 		}
70 70
 
71
-		if( ctype_alnum( $name ) === false )
71
+		if (ctype_alnum($name) === false)
72 72
 		{
73
-			$classname = is_string( $name ) ? '\\Aimeos\\Admin\\JQAdm\\Subscription\\' . $name : '<not a string>';
74
-			throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Invalid characters in class name "%1$s"', $classname ) );
73
+			$classname = is_string($name) ? '\\Aimeos\\Admin\\JQAdm\\Subscription\\' . $name : '<not a string>';
74
+			throw new \Aimeos\Admin\JQAdm\Exception(sprintf('Invalid characters in class name "%1$s"', $classname));
75 75
 		}
76 76
 
77 77
 		$iface = '\\Aimeos\\Admin\\JQAdm\\Iface';
78 78
 		$classname = '\\Aimeos\\Admin\\JQAdm\\Subscription\\' . $name;
79 79
 
80
-		$client = self::createClientBase( $context, $classname, $iface );
80
+		$client = self::createClientBase($context, $classname, $iface);
81 81
 
82
-		return self::addClientDecorators( $context, $client, 'subscription' );
82
+		return self::addClientDecorators($context, $client, 'subscription');
83 83
 	}
84 84
 
85 85
 }
86 86
\ No newline at end of file
Please login to merge, or discard this patch.
admin/jqadm/templates/product/item-physical-standard.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -10,48 +10,48 @@
 block discarded – undo
10 10
 
11 11
 ?>
12 12
 <div id="physical" class="row item-physical tab-pane fade" role="tabpanel" aria-labelledby="physical">
13
-	<div class="col-xl-6 content-block <?= $this->site()->readonly( $this->get( 'itemData/product.siteid' ) ) ?>">
13
+	<div class="col-xl-6 content-block <?= $this->site()->readonly($this->get('itemData/product.siteid')) ?>">
14 14
 		<div class="form-group row optional">
15
-			<label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Length' ) ); ?></label>
15
+			<label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Length')); ?></label>
16 16
 			<div class="col-sm-8">
17
-				<input class="form-control item-package-length" type="number" step="any" min="0" tabindex="<?= $this->get( 'tabindex' ); ?>"
18
-					name="<?= $enc->attr( $this->formparam( array( 'physical', 'package-length' ) ) ); ?>"
19
-					placeholder="<?= $enc->attr( $this->translate( 'admin', 'Product length, e.g. 30.0 (in yard, inch, etc.)' ) ); ?>"
20
-					value="<?= $enc->attr( $this->get( 'physicalData/package-length' ) ); ?>"
21
-					<?= $this->site()->readonly( $this->get( 'itemData/product.siteid' ) ) ?> >
17
+				<input class="form-control item-package-length" type="number" step="any" min="0" tabindex="<?= $this->get('tabindex'); ?>"
18
+					name="<?= $enc->attr($this->formparam(array('physical', 'package-length'))); ?>"
19
+					placeholder="<?= $enc->attr($this->translate('admin', 'Product length, e.g. 30.0 (in yard, inch, etc.)')); ?>"
20
+					value="<?= $enc->attr($this->get('physicalData/package-length')); ?>"
21
+					<?= $this->site()->readonly($this->get('itemData/product.siteid')) ?> >
22 22
 			</div>
23 23
 		</div>
24 24
 		<div class="form-group row optional">
25
-			<label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Width' ) ); ?></label>
25
+			<label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Width')); ?></label>
26 26
 			<div class="col-sm-8">
27
-				<input class="form-control item-package-width" type="number" step="any" min="0" tabindex="<?= $this->get( 'tabindex' ); ?>"
28
-					name="<?= $enc->attr( $this->formparam( array( 'physical', 'package-width' ) ) ); ?>"
29
-					placeholder="<?= $enc->attr( $this->translate( 'admin', 'Product width, e.g. 17.5 (in yard, inch etc.)' ) ); ?>"
30
-					value="<?= $enc->attr( $this->get( 'physicalData/package-width' ) ); ?>"
31
-					<?= $this->site()->readonly( $this->get( 'itemData/product.siteid' ) ) ?> >
27
+				<input class="form-control item-package-width" type="number" step="any" min="0" tabindex="<?= $this->get('tabindex'); ?>"
28
+					name="<?= $enc->attr($this->formparam(array('physical', 'package-width'))); ?>"
29
+					placeholder="<?= $enc->attr($this->translate('admin', 'Product width, e.g. 17.5 (in yard, inch etc.)')); ?>"
30
+					value="<?= $enc->attr($this->get('physicalData/package-width')); ?>"
31
+					<?= $this->site()->readonly($this->get('itemData/product.siteid')) ?> >
32 32
 			</div>
33 33
 		</div>
34 34
 		<div class="form-group row optional">
35
-			<label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Height' ) ); ?></label>
35
+			<label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Height')); ?></label>
36 36
 			<div class="col-sm-8">
37
-				<input class="form-control item-package-height" type="number" step="any" min="0" tabindex="<?= $this->get( 'tabindex' ); ?>"
38
-					name="<?= $enc->attr( $this->formparam( array( 'physical', 'package-height' ) ) ); ?>"
39
-					placeholder="<?= $enc->attr( $this->translate( 'admin', 'Product height, e.g. 20.0 (in yard, inch, etc.)' ) ); ?>"
40
-					value="<?= $enc->attr( $this->get( 'physicalData/package-height' ) ); ?>"
41
-					<?= $this->site()->readonly( $this->get( 'itemData/product.siteid' ) ) ?> >
37
+				<input class="form-control item-package-height" type="number" step="any" min="0" tabindex="<?= $this->get('tabindex'); ?>"
38
+					name="<?= $enc->attr($this->formparam(array('physical', 'package-height'))); ?>"
39
+					placeholder="<?= $enc->attr($this->translate('admin', 'Product height, e.g. 20.0 (in yard, inch, etc.)')); ?>"
40
+					value="<?= $enc->attr($this->get('physicalData/package-height')); ?>"
41
+					<?= $this->site()->readonly($this->get('itemData/product.siteid')) ?> >
42 42
 			</div>
43 43
 		</div>
44 44
 		<div class="form-group row optional">
45
-			<label class="col-sm-4 form-control-label"><?= $enc->html( $this->translate( 'admin', 'Weight' ) ); ?></label>
45
+			<label class="col-sm-4 form-control-label"><?= $enc->html($this->translate('admin', 'Weight')); ?></label>
46 46
 			<div class="col-sm-8">
47
-				<input class="form-control item-package-weight" type="number" step="any" min="0" tabindex="<?= $this->get( 'tabindex' ); ?>"
48
-					name="<?= $enc->attr( $this->formparam( array( 'physical', 'package-weight' ) ) ); ?>"
49
-					placeholder="<?= $enc->attr( $this->translate( 'admin', 'Product weight, e.g. 1.25 (in pound, ounce, etc.)' ) ); ?>"
50
-					value="<?= $enc->attr( $this->get( 'physicalData/package-weight' ) ); ?>"
51
-					<?= $this->site()->readonly( $this->get( 'itemData/product.siteid' ) ) ?> >
47
+				<input class="form-control item-package-weight" type="number" step="any" min="0" tabindex="<?= $this->get('tabindex'); ?>"
48
+					name="<?= $enc->attr($this->formparam(array('physical', 'package-weight'))); ?>"
49
+					placeholder="<?= $enc->attr($this->translate('admin', 'Product weight, e.g. 1.25 (in pound, ounce, etc.)')); ?>"
50
+					value="<?= $enc->attr($this->get('physicalData/package-weight')); ?>"
51
+					<?= $this->site()->readonly($this->get('itemData/product.siteid')) ?> >
52 52
 			</div>
53 53
 		</div>
54 54
 	</div>
55 55
 
56
-	<?= $this->get( 'physicalBody' ); ?>
56
+	<?= $this->get('physicalBody'); ?>
57 57
 </div>
Please login to merge, or discard this patch.
admin/jqadm/templates/common/partials/navsearch-standard.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -17,49 +17,49 @@
 block discarded – undo
17 17
  */
18 18
 
19 19
 
20
-$selected = function( array $filter, $key, $code ) {
21
-	return ( isset( $filter[$key][0] ) && $filter[$key][0] == $code ? 'selected="selected"' : '' );
20
+$selected = function(array $filter, $key, $code) {
21
+	return (isset($filter[$key][0]) && $filter[$key][0] == $code ? 'selected="selected"' : '');
22 22
 };
23 23
 
24 24
 
25
-$target = $this->config( 'admin/jqadm/url/search/target' );
26
-$controller = $this->config( 'admin/jqadm/url/search/controller', 'Jqadm' );
27
-$action = $this->config( 'admin/jqadm/url/search/action', 'search' );
28
-$config = $this->config( 'admin/jqadm/url/search/config', [] );
25
+$target = $this->config('admin/jqadm/url/search/target');
26
+$controller = $this->config('admin/jqadm/url/search/controller', 'Jqadm');
27
+$action = $this->config('admin/jqadm/url/search/action', 'search');
28
+$config = $this->config('admin/jqadm/url/search/config', []);
29 29
 
30
-$filter = $this->get( 'filter', [] );
31
-$params = $this->get( 'params', [] );
30
+$filter = $this->get('filter', []);
31
+$params = $this->get('params', []);
32 32
 $params['page']['start'] = 0;
33
-unset( $params['filter'] );
33
+unset($params['filter']);
34 34
 
35 35
 $enc = $this->encoder();
36 36
 
37 37
 
38 38
 ?>
39
-<form class="form-inline" method="POST" action="<?= $enc->attr( $this->url( $target, $controller, $action, $params, [], $config ) ); ?>">
39
+<form class="form-inline" method="POST" action="<?= $enc->attr($this->url($target, $controller, $action, $params, [], $config)); ?>">
40 40
 	<?= $this->csrf()->formfield(); ?>
41 41
 
42 42
 	<i class="fa more"></i>
43 43
 
44 44
 	<div class="input-group">
45
-		<select class="custom-select filter-key" name="<?= $this->formparam( ['filter', 'key', '0'] ); ?>">
46
-			<?php foreach( $this->get( 'filterAttributes', [] ) as $code => $attrItem ) : ?>
47
-				<?php if( $attrItem->isPublic() ) : ?>
48
-					<option value="<?= $enc->attr( $code ); ?>" data-type="<?= $enc->attr( $attrItem->getType() ); ?>" <?= $selected( $filter, 'key', $code ); ?> >
49
-						<?= $enc->html( $this->translate( 'admin/ext', $attrItem->getLabel() ) ); ?>
45
+		<select class="custom-select filter-key" name="<?= $this->formparam(['filter', 'key', '0']); ?>">
46
+			<?php foreach ($this->get('filterAttributes', []) as $code => $attrItem) : ?>
47
+				<?php if ($attrItem->isPublic()) : ?>
48
+					<option value="<?= $enc->attr($code); ?>" data-type="<?= $enc->attr($attrItem->getType()); ?>" <?= $selected($filter, 'key', $code); ?> >
49
+						<?= $enc->html($this->translate('admin/ext', $attrItem->getLabel())); ?>
50 50
 					</option>
51 51
 				<?php endif; ?>
52 52
 			<?php endforeach; ?>
53 53
 		</select>
54
-		<select class="custom-select filter-operator" name="<?= $this->formparam( ['filter', 'op', '0'] ); ?>">
55
-			<?php foreach( $this->get( 'filterOperators/compare', [] ) as $code ) : ?>
56
-				<option value="<?= $enc->attr( $code ); ?>" <?= $selected( $filter, 'op', $code ); ?> >
57
-					<?= $enc->html( $code ) . ( strlen( $code ) === 1 ? '&nbsp;' : '' ); ?>&nbsp;&nbsp;<?= $enc->html( $this->translate( 'admin/ext', $code ) ); ?>
54
+		<select class="custom-select filter-operator" name="<?= $this->formparam(['filter', 'op', '0']); ?>">
55
+			<?php foreach ($this->get('filterOperators/compare', []) as $code) : ?>
56
+				<option value="<?= $enc->attr($code); ?>" <?= $selected($filter, 'op', $code); ?> >
57
+					<?= $enc->html($code) . (strlen($code) === 1 ? '&nbsp;' : ''); ?>&nbsp;&nbsp;<?= $enc->html($this->translate('admin/ext', $code)); ?>
58 58
 				</option>
59 59
 			<?php endforeach; ?>
60 60
 		</select>
61
-		<input type="text" class="form-control filter-value" name="<?= $this->formparam( ['filter', 'val', '0'] ); ?>"
62
-			 value="<?= $enc->attr( ( isset( $filter['val'][0] ) ? $filter['val'][0] : '' ) ); ?>" >
61
+		<input type="text" class="form-control filter-value" name="<?= $this->formparam(['filter', 'val', '0']); ?>"
62
+			 value="<?= $enc->attr((isset($filter['val'][0]) ? $filter['val'][0] : '')); ?>" >
63 63
 		<div class="input-group-append">
64 64
 			<button class="btn btn-primary fa fa-search"></button>
65 65
 		</div>
Please login to merge, or discard this patch.