Completed
Push — master ( 0229de...f71bfb )
by Aimeos
04:41
created
admin/jqadm/tests/bootstrap.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -11,17 +11,17 @@
 block discarded – undo
11 11
  * Set error reporting to maximum
12 12
  */
13 13
 error_reporting( -1 );
14
-ini_set( 'display_errors', '1' );
14
+ini_set('display_errors', '1');
15 15
 
16
-date_default_timezone_set( 'UTC' );
16
+date_default_timezone_set('UTC');
17 17
 
18 18
 /*
19 19
  * Set locale settings to reasonable defaults
20 20
  */
21
-setlocale( LC_ALL, 'en_US.UTF-8' );
22
-setlocale( LC_NUMERIC, 'POSIX' );
23
-setlocale( LC_CTYPE, 'en_US.UTF-8' );
24
-setlocale( LC_TIME, 'POSIX' );
21
+setlocale(LC_ALL, 'en_US.UTF-8');
22
+setlocale(LC_NUMERIC, 'POSIX');
23
+setlocale(LC_CTYPE, 'en_US.UTF-8');
24
+setlocale(LC_TIME, 'POSIX');
25 25
 
26 26
 
27 27
 require_once 'TestHelperJqadm.php';
Please login to merge, or discard this patch.
admin/jqadm/src/Admin/JQAdm/Common/Decorator/Cache.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -28,14 +28,14 @@  discard block
 block discarded – undo
28 28
 	{
29 29
 		$result = $this->getClient()->delete();
30 30
 
31
-		$ids = (array) $this->getView()->param( 'id' );
32
-		$tags = array( 'product' );
31
+		$ids = (array) $this->getView()->param('id');
32
+		$tags = array('product');
33 33
 
34
-		foreach( $ids as $id ) {
34
+		foreach ($ids as $id) {
35 35
 			$tags[] = 'product-' . $id;
36 36
 		}
37 37
 
38
-		$this->getContext()->getCache()->deleteByTags( $tags );
38
+		$this->getContext()->getCache()->deleteByTags($tags);
39 39
 
40 40
 		return $result;
41 41
 	}
@@ -51,10 +51,10 @@  discard block
 block discarded – undo
51 51
 		$result = $this->getClient()->save();
52 52
 		$item = $this->getView()->item;
53 53
 
54
-		if( $item->getId() !== null )
54
+		if ($item->getId() !== null)
55 55
 		{
56 56
 			$idtag = 'product-' . $item->getId();
57
-			$this->getContext()->getCache()->deleteByTags( array( 'product', $idtag ) );
57
+			$this->getContext()->getCache()->deleteByTags(array('product', $idtag));
58 58
 		}
59 59
 
60 60
 		return $result;
Please login to merge, or discard this patch.
admin/jqadm/src/Admin/JQAdm/Iface.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -26,7 +26,7 @@  discard block
 block discarded – undo
26 26
 	 * @param string|null $name Name of the sub-client (Default if null)
27 27
 	 * @return \Aimeos\Admin\JQAdm\Iface Sub-client object
28 28
 	 */
29
-	public function getSubClient( $type, $name = null );
29
+	public function getSubClient($type, $name = null);
30 30
 
31 31
 	/**
32 32
 	 * Returns the view object that will generate the admin output.
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 	 * @param \Aimeos\MW\View\Iface $view The view object which generates the admin output
42 42
 	 * @return \Aimeos\Admin\JQAdm\Iface Reference to this object for fluent calls
43 43
 	 */
44
-	public function setView( \Aimeos\MW\View\Iface $view );
44
+	public function setView(\Aimeos\MW\View\Iface $view);
45 45
 
46 46
 	/**
47 47
 	 * Copies a resource
Please login to merge, or discard this patch.
admin/jqadm/src/Admin/JQAdm/Product/Category/Decorator/Cache.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -27,13 +27,13 @@
 block discarded – undo
27 27
 	public function save()
28 28
 	{
29 29
 		$result = $this->getClient()->save();
30
-		$ids = array( 'catalog' );
30
+		$ids = array('catalog');
31 31
 
32
-		foreach( $this->getView()->param( 'category/catalog.id', [] ) as $id ) {
32
+		foreach ($this->getView()->param('category/catalog.id', []) as $id) {
33 33
 			$ids[] = 'catalog-' . $id;
34 34
 		}
35 35
 
36
-		$this->getContext()->getCache()->deleteByTags( $ids );
36
+		$this->getContext()->getCache()->deleteByTags($ids);
37 37
 
38 38
 		return $result;
39 39
 	}
Please login to merge, or discard this patch.
lib/custom/tests/bootstrap.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -10,17 +10,17 @@
 block discarded – undo
10 10
  * Set error reporting to maximum
11 11
  */
12 12
 error_reporting( -1 );
13
-ini_set( 'display_errors', '1' );
13
+ini_set('display_errors', '1');
14 14
 
15
-date_default_timezone_set( 'UTC' );
15
+date_default_timezone_set('UTC');
16 16
 
17 17
 /*
18 18
  * Set locale settings to reasonable defaults
19 19
  */
20
-setlocale( LC_ALL, 'en_US.UTF-8' );
21
-setlocale( LC_NUMERIC, 'POSIX' );
22
-setlocale( LC_CTYPE, 'en_US.UTF-8' );
23
-setlocale( LC_TIME, 'POSIX' );
20
+setlocale(LC_ALL, 'en_US.UTF-8');
21
+setlocale(LC_NUMERIC, 'POSIX');
22
+setlocale(LC_CTYPE, 'en_US.UTF-8');
23
+setlocale(LC_TIME, 'POSIX');
24 24
 
25 25
 
26 26
 require_once 'TestHelperCustom.php';
Please login to merge, or discard this patch.
lib/custom/src/MW/View/Helper/Site/Standard.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@
 block discarded – undo
37 37
 	/**
38 38
 	 * Returns the site view helper
39 39
 	 *
40
-	 * @return Aimeos\MW\View\Helper\Site\Iface Site view helper
40
+	 * @return Standard Site view helper
41 41
 	 */
42 42
 	public function transform()
43 43
 	{
Please login to merge, or discard this patch.
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -27,9 +27,9 @@  discard block
 block discarded – undo
27 27
 	 *
28 28
 	 * @param \Aimeos\MW\View\Iface $view View object
29 29
 	 */
30
-	public function __construct( \Aimeos\MW\View\Iface $view )
30
+	public function __construct(\Aimeos\MW\View\Iface $view)
31 31
 	{
32
-		parent::__construct( $view );
32
+		parent::__construct($view);
33 33
 		$this->siteItem = $view->pageSiteItem;
34 34
 	}
35 35
 
@@ -62,9 +62,9 @@  discard block
 block discarded – undo
62 62
 	 * @param string $siteid ID of a site item
63 63
 	 * @return string|null Label of the site item or null if not found
64 64
 	 */
65
-	public function match( $siteid )
65
+	public function match($siteid)
66 66
 	{
67
-		if( $this->siteItem->getId() == $siteid ) {
67
+		if ($this->siteItem->getId() == $siteid) {
68 68
 			return $this->siteItem->getLabel();
69 69
 		}
70 70
 	}
@@ -76,9 +76,9 @@  discard block
 block discarded – undo
76 76
 	 * @param string $siteid ID of a site item
77 77
 	 * @return string|null "readonly" if item is from a parent site, null if not
78 78
 	 */
79
-	public function readonly( $siteid )
79
+	public function readonly($siteid)
80 80
 	{
81
-		if( $this->siteItem->getId() != $siteid ) {
81
+		if ($this->siteItem->getId() != $siteid) {
82 82
 			return 'readonly';
83 83
 		}
84 84
 	}
Please login to merge, or discard this patch.
admin/jqadm/src/Admin/JQAdm/Locale/Site/Standard.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -498,7 +498,7 @@
 block discarded – undo
498 498
 	/**
499 499
 	 * Constructs the data array for the view from the given item
500 500
 	 *
501
-	 * @param \Aimeos\MShop\Locale\Item\Iface $item Locale item object
501
+	 * @param \Aimeos\MShop\Locale\Item\Site\Iface $item Locale item object
502 502
 	 * @return string[] Multi-dimensional associative list of item data
503 503
 	 */
504 504
 	protected function toArray( \Aimeos\MShop\Locale\Item\Site\Iface $item, $copy = false )
Please login to merge, or discard this patch.
Spacing   +143 added lines, -143 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\Locale\Site;
12 12
 
13
-sprintf( 'locale/site' ); // for translation
13
+sprintf('locale/site'); // for translation
14 14
 
15 15
 
16 16
 /**
@@ -35,45 +35,45 @@  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
-			$this->checkSite( $view->access( 'super' ), $id );
42
+			$this->checkSite($view->access('super'), $id);
43 43
 
44
-			$manager = \Aimeos\MShop::create( $context, 'locale/site' );
45
-			$view->item = $manager->getItem( $id );
44
+			$manager = \Aimeos\MShop::create($context, 'locale/site');
45
+			$view->item = $manager->getItem($id);
46 46
 
47
-			$view->itemData = $this->toArray( $view->item, true );
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\Admin\JQAdm\Exception $e )
57
+		catch (\Aimeos\Admin\JQAdm\Exception $e)
58 58
 		{
59
-			$error = array( 'locale-site-item' => $context->getI18n()->dt( 'admin', $e->getMessage() ) );
60
-			$view->errors = $view->get( 'errors', [] ) + $error;
61
-			$this->logException( $e );
59
+			$error = array('locale-site-item' => $context->getI18n()->dt('admin', $e->getMessage()));
60
+			$view->errors = $view->get('errors', []) + $error;
61
+			$this->logException($e);
62 62
 		}
63
-		catch( \Aimeos\MShop\Exception $e )
63
+		catch (\Aimeos\MShop\Exception $e)
64 64
 		{
65
-			$error = array( 'locale-site-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
66
-			$view->errors = $view->get( 'errors', [] ) + $error;
67
-			$this->logException( $e );
65
+			$error = array('locale-site-item' => $context->getI18n()->dt('mshop', $e->getMessage()));
66
+			$view->errors = $view->get('errors', []) + $error;
67
+			$this->logException($e);
68 68
 		}
69
-		catch( \Exception $e )
69
+		catch (\Exception $e)
70 70
 		{
71
-			$error = array( 'locale-site-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
72
-			$view->errors = $view->get( 'errors', [] ) + $error;
73
-			$this->logException( $e );
71
+			$error = array('locale-site-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
72
+			$view->errors = $view->get('errors', []) + $error;
73
+			$this->logException($e);
74 74
 		}
75 75
 
76
-		return $this->render( $view );
76
+		return $this->render($view);
77 77
 	}
78 78
 
79 79
 
@@ -89,44 +89,44 @@  discard block
 block discarded – undo
89 89
 
90 90
 		try
91 91
 		{
92
-			$this->checkSite( $view->access( 'super' ) );
92
+			$this->checkSite($view->access('super'));
93 93
 
94
-			$data = $view->param( 'item', [] );
94
+			$data = $view->param('item', []);
95 95
 
96
-			if( !isset( $view->item ) ) {
97
-				$view->item = \Aimeos\MShop::create( $context, 'locale/site' )->createItem();
96
+			if (!isset($view->item)) {
97
+				$view->item = \Aimeos\MShop::create($context, 'locale/site')->createItem();
98 98
 			}
99 99
 
100 100
 			$view->itemSubparts = $this->getSubClientNames();
101 101
 			$view->itemData = $data;
102 102
 			$view->itemBody = '';
103 103
 
104
-			foreach( $this->getSubClients() as $idx => $client )
104
+			foreach ($this->getSubClients() as $idx => $client)
105 105
 			{
106 106
 				$view->tabindex = ++$idx + 1;
107 107
 				$view->itemBody .= $client->create();
108 108
 			}
109 109
 		}
110
-		catch( \Aimeos\Admin\JQAdm\Exception $e )
110
+		catch (\Aimeos\Admin\JQAdm\Exception $e)
111 111
 		{
112
-			$error = array( 'locale-site-item' => $context->getI18n()->dt( 'admin', $e->getMessage() ) );
113
-			$view->errors = $view->get( 'errors', [] ) + $error;
114
-			$this->logException( $e );
112
+			$error = array('locale-site-item' => $context->getI18n()->dt('admin', $e->getMessage()));
113
+			$view->errors = $view->get('errors', []) + $error;
114
+			$this->logException($e);
115 115
 		}
116
-		catch( \Aimeos\MShop\Exception $e )
116
+		catch (\Aimeos\MShop\Exception $e)
117 117
 		{
118
-			$error = array( 'locale-site-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
119
-			$view->errors = $view->get( 'errors', [] ) + $error;
120
-			$this->logException( $e );
118
+			$error = array('locale-site-item' => $context->getI18n()->dt('mshop', $e->getMessage()));
119
+			$view->errors = $view->get('errors', []) + $error;
120
+			$this->logException($e);
121 121
 		}
122
-		catch( \Exception $e )
122
+		catch (\Exception $e)
123 123
 		{
124
-			$error = array( 'locale-site-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
125
-			$view->errors = $view->get( 'errors', [] ) + $error;
126
-			$this->logException( $e );
124
+			$error = array('locale-site-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
125
+			$view->errors = $view->get('errors', []) + $error;
126
+			$this->logException($e);
127 127
 		}
128 128
 
129
-		return $this->render( $view );
129
+		return $this->render($view);
130 130
 	}
131 131
 
132 132
 
@@ -140,46 +140,46 @@  discard block
 block discarded – undo
140 140
 		$view = $this->getView();
141 141
 		$context = $this->getContext();
142 142
 
143
-		$manager = \Aimeos\MShop::create( $context, 'locale/site' );
143
+		$manager = \Aimeos\MShop::create($context, 'locale/site');
144 144
 		$manager->begin();
145 145
 
146 146
 		try
147 147
 		{
148
-			if( ( $id = $view->param( 'id' ) ) === null ) {
149
-				throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Required parameter "%1$s" is missing', 'id' ) );
148
+			if (($id = $view->param('id')) === null) {
149
+				throw new \Aimeos\Admin\JQAdm\Exception(sprintf('Required parameter "%1$s" is missing', 'id'));
150 150
 			}
151 151
 
152
-			$this->checkSite( $view->access( 'super' ), $id );
152
+			$this->checkSite($view->access('super'), $id);
153 153
 
154
-			$view->item = $manager->getItem( $id );
154
+			$view->item = $manager->getItem($id);
155 155
 
156
-			foreach( $this->getSubClients() as $client ) {
156
+			foreach ($this->getSubClients() as $client) {
157 157
 				$client->delete();
158 158
 			}
159 159
 
160
-			$manager->deleteItem( $id );
160
+			$manager->deleteItem($id);
161 161
 			$manager->commit();
162 162
 
163
-			$this->nextAction( $view, 'search', 'locale/site', null, 'delete' );
163
+			$this->nextAction($view, 'search', 'locale/site', null, 'delete');
164 164
 			return;
165 165
 		}
166
-		catch( \Aimeos\Admin\JQAdm\Exception $e )
166
+		catch (\Aimeos\Admin\JQAdm\Exception $e)
167 167
 		{
168
-			$error = array( 'locale-site-item' => $context->getI18n()->dt( 'admin', $e->getMessage() ) );
169
-			$view->errors = $view->get( 'errors', [] ) + $error;
170
-			$this->logException( $e );
168
+			$error = array('locale-site-item' => $context->getI18n()->dt('admin', $e->getMessage()));
169
+			$view->errors = $view->get('errors', []) + $error;
170
+			$this->logException($e);
171 171
 		}
172
-		catch( \Aimeos\MShop\Exception $e )
172
+		catch (\Aimeos\MShop\Exception $e)
173 173
 		{
174
-			$error = array( 'locale-site-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
175
-			$view->errors = $view->get( 'errors', [] ) + $error;
176
-			$this->logException( $e );
174
+			$error = array('locale-site-item' => $context->getI18n()->dt('mshop', $e->getMessage()));
175
+			$view->errors = $view->get('errors', []) + $error;
176
+			$this->logException($e);
177 177
 		}
178
-		catch( \Exception $e )
178
+		catch (\Exception $e)
179 179
 		{
180
-			$error = array( 'locale-site-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
181
-			$view->errors = $view->get( 'errors', [] ) + $error;
182
-			$this->logException( $e );
180
+			$error = array('locale-site-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
181
+			$view->errors = $view->get('errors', []) + $error;
182
+			$this->logException($e);
183 183
 		}
184 184
 
185 185
 		$manager->rollback();
@@ -200,45 +200,45 @@  discard block
 block discarded – undo
200 200
 
201 201
 		try
202 202
 		{
203
-			if( ( $id = $view->param( 'id' ) ) === null ) {
204
-				throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Required parameter "%1$s" is missing', 'id' ) );
203
+			if (($id = $view->param('id')) === null) {
204
+				throw new \Aimeos\Admin\JQAdm\Exception(sprintf('Required parameter "%1$s" is missing', 'id'));
205 205
 			}
206 206
 
207
-			$this->checkSite( $view->access( 'super' ), $id );
207
+			$this->checkSite($view->access('super'), $id);
208 208
 
209
-			$manager = \Aimeos\MShop::create( $context, 'locale/site' );
209
+			$manager = \Aimeos\MShop::create($context, 'locale/site');
210 210
 
211
-			$view->item = $manager->getItem( $id );
211
+			$view->item = $manager->getItem($id);
212 212
 			$view->itemSubparts = $this->getSubClientNames();
213
-			$view->itemData = $this->toArray( $view->item );
213
+			$view->itemData = $this->toArray($view->item);
214 214
 			$view->itemBody = '';
215 215
 
216
-			foreach( $this->getSubClients() as $idx => $client )
216
+			foreach ($this->getSubClients() as $idx => $client)
217 217
 			{
218 218
 				$view->tabindex = ++$idx + 1;
219 219
 				$view->itemBody .= $client->get();
220 220
 			}
221 221
 		}
222
-		catch( \Aimeos\Admin\JQAdm\Exception $e )
222
+		catch (\Aimeos\Admin\JQAdm\Exception $e)
223 223
 		{
224
-			$error = array( 'locale-site-item' => $context->getI18n()->dt( 'admin', $e->getMessage() ) );
225
-			$view->errors = $view->get( 'errors', [] ) + $error;
226
-			$this->logException( $e );
224
+			$error = array('locale-site-item' => $context->getI18n()->dt('admin', $e->getMessage()));
225
+			$view->errors = $view->get('errors', []) + $error;
226
+			$this->logException($e);
227 227
 		}
228
-		catch( \Aimeos\MShop\Exception $e )
228
+		catch (\Aimeos\MShop\Exception $e)
229 229
 		{
230
-			$error = array( 'locale-site-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
231
-			$view->errors = $view->get( 'errors', [] ) + $error;
232
-			$this->logException( $e );
230
+			$error = array('locale-site-item' => $context->getI18n()->dt('mshop', $e->getMessage()));
231
+			$view->errors = $view->get('errors', []) + $error;
232
+			$this->logException($e);
233 233
 		}
234
-		catch( \Exception $e )
234
+		catch (\Exception $e)
235 235
 		{
236
-			$error = array( 'locale-site-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
237
-			$view->errors = $view->get( 'errors', [] ) + $error;
238
-			$this->logException( $e );
236
+			$error = array('locale-site-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
237
+			$view->errors = $view->get('errors', []) + $error;
238
+			$this->logException($e);
239 239
 		}
240 240
 
241
-		return $this->render( $view );
241
+		return $this->render($view);
242 242
 	}
243 243
 
244 244
 
@@ -252,42 +252,42 @@  discard block
 block discarded – undo
252 252
 		$view = $this->getView();
253 253
 		$context = $this->getContext();
254 254
 
255
-		$manager = \Aimeos\MShop::create( $context, 'locale/site' );
255
+		$manager = \Aimeos\MShop::create($context, 'locale/site');
256 256
 		$manager->begin();
257 257
 
258 258
 		try
259 259
 		{
260
-			$item = $this->fromArray( $view->param( 'item', [] ), $view->access( 'super' ) );
261
-			$view->item = $item->getId() ? $item : $manager->saveItem( $item );
260
+			$item = $this->fromArray($view->param('item', []), $view->access('super'));
261
+			$view->item = $item->getId() ? $item : $manager->saveItem($item);
262 262
 			$view->itemBody = '';
263 263
 
264
-			foreach( $this->getSubClients() as $client ) {
264
+			foreach ($this->getSubClients() as $client) {
265 265
 				$view->itemBody .= $client->save();
266 266
 			}
267 267
 
268
-			$manager->saveItem( clone $view->item );
268
+			$manager->saveItem(clone $view->item);
269 269
 			$manager->commit();
270 270
 
271
-			$this->nextAction( $view, $view->param( 'next' ), 'locale/site', $view->item->getId(), 'save' );
271
+			$this->nextAction($view, $view->param('next'), 'locale/site', $view->item->getId(), 'save');
272 272
 			return;
273 273
 		}
274
-		catch( \Aimeos\Admin\JQAdm\Exception $e )
274
+		catch (\Aimeos\Admin\JQAdm\Exception $e)
275 275
 		{
276
-			$error = array( 'locale-site-item' => $context->getI18n()->dt( 'admin', $e->getMessage() ) );
277
-			$view->errors = $view->get( 'errors', [] ) + $error;
278
-			$this->logException( $e );
276
+			$error = array('locale-site-item' => $context->getI18n()->dt('admin', $e->getMessage()));
277
+			$view->errors = $view->get('errors', []) + $error;
278
+			$this->logException($e);
279 279
 		}
280
-		catch( \Aimeos\MShop\Exception $e )
280
+		catch (\Aimeos\MShop\Exception $e)
281 281
 		{
282
-			$error = array( 'locale-site-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
283
-			$view->errors = $view->get( 'errors', [] ) + $error;
284
-			$this->logException( $e );
282
+			$error = array('locale-site-item' => $context->getI18n()->dt('mshop', $e->getMessage()));
283
+			$view->errors = $view->get('errors', []) + $error;
284
+			$this->logException($e);
285 285
 		}
286
-		catch( \Exception $e )
286
+		catch (\Exception $e)
287 287
 		{
288
-			$error = array( 'locale-site-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
289
-			$view->errors = $view->get( 'errors', [] ) + $error;
290
-			$this->logException( $e );
288
+			$error = array('locale-site-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
289
+			$view->errors = $view->get('errors', []) + $error;
290
+			$this->logException($e);
291 291
 		}
292 292
 
293 293
 		$manager->rollback();
@@ -309,39 +309,39 @@  discard block
 block discarded – undo
309 309
 		try
310 310
 		{
311 311
 			$total = 0;
312
-			$params = $this->storeSearchParams( $view->param(), 'locale/site' );
313
-			$manager = \Aimeos\MShop::create( $context, 'locale/site' );
314
-			$search = $this->initCriteria( $manager->createSearch(), $params );
312
+			$params = $this->storeSearchParams($view->param(), 'locale/site');
313
+			$manager = \Aimeos\MShop::create($context, 'locale/site');
314
+			$search = $this->initCriteria($manager->createSearch(), $params);
315 315
 
316
-			if( $view->access( 'super' ) === false )
316
+			if ($view->access('super') === false)
317 317
 			{
318
-				$search->setConditions( $search->combine( '&&', [
319
-					$search->compare( '==', 'locale.site.id', $this->getUserSiteId() ),
318
+				$search->setConditions($search->combine('&&', [
319
+					$search->compare('==', 'locale.site.id', $this->getUserSiteId()),
320 320
 					$search->getConditions(),
321
-				] ) );
321
+				]));
322 322
 			}
323 323
 
324
-			$view->items = $manager->searchItems( $search, [], $total );
325
-			$view->filterAttributes = $manager->getSearchAttributes( true );
324
+			$view->items = $manager->searchItems($search, [], $total);
325
+			$view->filterAttributes = $manager->getSearchAttributes(true);
326 326
 			$view->filterOperators = $search->getOperators();
327 327
 			$view->total = $total;
328 328
 			$view->itemBody = '';
329 329
 
330
-			foreach( $this->getSubClients() as $client ) {
330
+			foreach ($this->getSubClients() as $client) {
331 331
 				$view->itemBody .= $client->search();
332 332
 			}
333 333
 		}
334
-		catch( \Aimeos\MShop\Exception $e )
334
+		catch (\Aimeos\MShop\Exception $e)
335 335
 		{
336
-			$error = array( 'locale-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
337
-			$view->errors = $view->get( 'errors', [] ) + $error;
338
-			$this->logException( $e );
336
+			$error = array('locale-item' => $context->getI18n()->dt('mshop', $e->getMessage()));
337
+			$view->errors = $view->get('errors', []) + $error;
338
+			$this->logException($e);
339 339
 		}
340
-		catch( \Exception $e )
340
+		catch (\Exception $e)
341 341
 		{
342
-			$error = array( 'locale-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
343
-			$view->errors = $view->get( 'errors', [] ) + $error;
344
-			$this->logException( $e );
342
+			$error = array('locale-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
343
+			$view->errors = $view->get('errors', []) + $error;
344
+			$this->logException($e);
345 345
 		}
346 346
 
347 347
 		/** admin/jqadm/locale/site/template-list
@@ -366,7 +366,7 @@  discard block
 block discarded – undo
366 366
 		$tplconf = 'admin/jqadm/locale/site/template-list';
367 367
 		$default = 'locale/site/list-standard';
368 368
 
369
-		return $view->render( $view->config( $tplconf, $default ) );
369
+		return $view->render($view->config($tplconf, $default));
370 370
 	}
371 371
 
372 372
 
@@ -377,7 +377,7 @@  discard block
 block discarded – undo
377 377
 	 * @param string|null $name Name of the sub-client (Default if null)
378 378
 	 * @return \Aimeos\Admin\JQAdm\Iface Sub-client object
379 379
 	 */
380
-	public function getSubClient( $type, $name = null )
380
+	public function getSubClient($type, $name = null)
381 381
 	{
382 382
 		/** admin/jqadm/locale/site/decorators/excludes
383 383
 		 * Excludes decorators added by the "common" option from the locale JQAdm client
@@ -452,7 +452,7 @@  discard block
 block discarded – undo
452 452
 		 * @see admin/jqadm/locale/site/decorators/excludes
453 453
 		 * @see admin/jqadm/locale/site/decorators/global
454 454
 		 */
455
-		return $this->createSubClient( 'locale/site' . $type, $name );
455
+		return $this->createSubClient('locale/site' . $type, $name);
456 456
 	}
457 457
 
458 458
 
@@ -463,13 +463,13 @@  discard block
 block discarded – undo
463 463
 	 * @param string $id ID of the site to access
464 464
 	 * @throws \Aimeos\Admin\JQAdm\Exception If user isn't allowed to access the site
465 465
 	 */
466
-	protected function checkSite( $super, $id = null )
466
+	protected function checkSite($super, $id = null)
467 467
 	{
468
-		if( $super === true || (string) $this->getUserSiteId() === (string) $id ) {
468
+		if ($super === true || (string) $this->getUserSiteId() === (string) $id) {
469 469
 			return;
470 470
 		}
471 471
 
472
-		throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Permission denied' ) );
472
+		throw new \Aimeos\Admin\JQAdm\Exception(sprintf('Permission denied'));
473 473
 	}
474 474
 
475 475
 
@@ -481,9 +481,9 @@  discard block
 block discarded – undo
481 481
 	protected function getUserSiteId()
482 482
 	{
483 483
 		$context = $this->getContext();
484
-		$manager = \Aimeos\MShop::create( $context, 'customer' );
484
+		$manager = \Aimeos\MShop::create($context, 'customer');
485 485
 
486
-		return $manager->getItem( $context->getUserId() )->getSiteId();
486
+		return $manager->getItem($context->getUserId())->getSiteId();
487 487
 	}
488 488
 
489 489
 
@@ -527,7 +527,7 @@  discard block
 block discarded – undo
527 527
 		 * @since 2017.10
528 528
 		 * @category Developer
529 529
 		 */
530
-		return $this->getContext()->getConfig()->get( 'admin/jqadm/locale/site/standard/subparts', [] );
530
+		return $this->getContext()->getConfig()->get('admin/jqadm/locale/site/standard/subparts', []);
531 531
 	}
532 532
 
533 533
 
@@ -538,38 +538,38 @@  discard block
 block discarded – undo
538 538
 	 * @param boolean $super If current user is a super user
539 539
 	 * @return \Aimeos\MShop\Locale\Item\Iface New locale item object
540 540
 	 */
541
-	protected function fromArray( array $data, $super )
541
+	protected function fromArray(array $data, $super)
542 542
 	{
543 543
 		$conf = [];
544 544
 
545
-		if( isset( $data['config']['key'] ) )
545
+		if (isset($data['config']['key']))
546 546
 		{
547
-			foreach( (array) $data['config']['key'] as $idx => $key )
547
+			foreach ((array) $data['config']['key'] as $idx => $key)
548 548
 			{
549
-				if( trim( $key ) !== '' && isset( $data['config']['val'][$idx] ) ) {
549
+				if (trim($key) !== '' && isset($data['config']['val'][$idx])) {
550 550
 					$conf[$key] = $data['config']['val'][$idx];
551 551
 				}
552 552
 			}
553 553
 		}
554 554
 
555
-		$manager = \Aimeos\MShop::create( $this->getContext(), 'locale/site' );
555
+		$manager = \Aimeos\MShop::create($this->getContext(), 'locale/site');
556 556
 
557
-		if( isset( $data['locale.site.id'] ) && $data['locale.site.id'] != '' )
557
+		if (isset($data['locale.site.id']) && $data['locale.site.id'] != '')
558 558
 		{
559
-			$this->checkSite( $super, $data['locale.site.id'] );
560
-			$item = $manager->getItem( $data['locale.site.id'] );
559
+			$this->checkSite($super, $data['locale.site.id']);
560
+			$item = $manager->getItem($data['locale.site.id']);
561 561
 		}
562 562
 		else
563 563
 		{
564
-			$this->checkSite( $super );
564
+			$this->checkSite($super);
565 565
 			$item = $manager->createItem();
566 566
 		}
567 567
 
568
-		$item->fromArray( $data );
569
-		$item->setConfig( $conf );
568
+		$item->fromArray($data);
569
+		$item->setConfig($conf);
570 570
 
571
-		if( $item->getId() == null ) {
572
-			return $manager->insertItem( $item );
571
+		if ($item->getId() == null) {
572
+			return $manager->insertItem($item);
573 573
 		}
574 574
 
575 575
 		return $item;
@@ -582,18 +582,18 @@  discard block
 block discarded – undo
582 582
 	 * @param \Aimeos\MShop\Locale\Item\Iface $item Locale item object
583 583
 	 * @return string[] Multi-dimensional associative list of item data
584 584
 	 */
585
-	protected function toArray( \Aimeos\MShop\Locale\Item\Site\Iface $item, $copy = false )
585
+	protected function toArray(\Aimeos\MShop\Locale\Item\Site\Iface $item, $copy = false)
586 586
 	{
587
-		$data = $item->toArray( true );
587
+		$data = $item->toArray(true);
588 588
 		$data['config'] = [];
589 589
 
590
-		if( $copy === true )
590
+		if ($copy === true)
591 591
 		{
592 592
 			$data['locale.site.code'] = $data['locale.site.code'] . '_copy';
593 593
 			$data['locale.site.id'] = '';
594 594
 		}
595 595
 
596
-		foreach( $item->getConfig() as $key => $value )
596
+		foreach ($item->getConfig() as $key => $value)
597 597
 		{
598 598
 			$data['config']['key'][] = $key;
599 599
 			$data['config']['val'][] = $value;
@@ -608,7 +608,7 @@  discard block
 block discarded – undo
608 608
 	 *
609 609
 	 * @return string HTML output
610 610
 	 */
611
-	protected function render( \Aimeos\MW\View\Iface $view )
611
+	protected function render(\Aimeos\MW\View\Iface $view)
612 612
 	{
613 613
 		/** admin/jqadm/locale/site/template-item
614 614
 		 * Relative path to the HTML body template for the locale item.
@@ -632,6 +632,6 @@  discard block
 block discarded – undo
632 632
 		$tplconf = 'admin/jqadm/locale/site/template-item';
633 633
 		$default = 'locale/site/item-standard';
634 634
 
635
-		return $view->render( $view->config( $tplconf, $default ) );
635
+		return $view->render($view->config($tplconf, $default));
636 636
 	}
637 637
 }
Please login to merge, or discard this patch.
admin/jqadm/src/Admin/JQAdm/Locale/Language/Standard.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -476,7 +476,7 @@
 block discarded – undo
476 476
 	/**
477 477
 	 * Constructs the data array for the view from the given item
478 478
 	 *
479
-	 * @param \Aimeos\MShop\Locale\Item\Iface $item Locale item object
479
+	 * @param \Aimeos\MShop\Locale\Item\Language\Iface $item Locale item object
480 480
 	 * @return string[] Multi-dimensional associative list of item data
481 481
 	 */
482 482
 	protected function toArray( \Aimeos\MShop\Locale\Item\Language\Iface $item, $copy = false )
Please login to merge, or discard this patch.
Spacing   +103 added lines, -103 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\Locale\Language;
12 12
 
13
-sprintf( 'locale/language' ); // for translation
13
+sprintf('locale/language'); // for translation
14 14
 
15 15
 
16 16
 /**
@@ -35,37 +35,37 @@  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::create( $context, 'locale/language' );
43
-			$view->item = $manager->getItem( $id );
42
+			$manager = \Aimeos\MShop::create($context, 'locale/language');
43
+			$view->item = $manager->getItem($id);
44 44
 
45
-			$view->itemData = $this->toArray( $view->item, true );
45
+			$view->itemData = $this->toArray($view->item, true);
46 46
 			$view->itemSubparts = $this->getSubClientNames();
47 47
 			$view->itemBody = '';
48 48
 
49
-			foreach( $this->getSubClients() as $idx => $client )
49
+			foreach ($this->getSubClients() as $idx => $client)
50 50
 			{
51 51
 				$view->tabindex = ++$idx + 1;
52 52
 				$view->itemBody .= $client->copy();
53 53
 			}
54 54
 		}
55
-		catch( \Aimeos\MShop\Exception $e )
55
+		catch (\Aimeos\MShop\Exception $e)
56 56
 		{
57
-			$error = array( 'locale-language-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
58
-			$view->errors = $view->get( 'errors', [] ) + $error;
59
-			$this->logException( $e );
57
+			$error = array('locale-language-item' => $context->getI18n()->dt('mshop', $e->getMessage()));
58
+			$view->errors = $view->get('errors', []) + $error;
59
+			$this->logException($e);
60 60
 		}
61
-		catch( \Exception $e )
61
+		catch (\Exception $e)
62 62
 		{
63
-			$error = array( 'locale-language-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
64
-			$view->errors = $view->get( 'errors', [] ) + $error;
65
-			$this->logException( $e );
63
+			$error = array('locale-language-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
64
+			$view->errors = $view->get('errors', []) + $error;
65
+			$this->logException($e);
66 66
 		}
67 67
 
68
-		return $this->render( $view );
68
+		return $this->render($view);
69 69
 	}
70 70
 
71 71
 
@@ -81,36 +81,36 @@  discard block
 block discarded – undo
81 81
 
82 82
 		try
83 83
 		{
84
-			$data = $view->param( 'item', [] );
84
+			$data = $view->param('item', []);
85 85
 
86
-			if( !isset( $view->item ) ) {
87
-				$view->item = \Aimeos\MShop::create( $context, 'locale/language' )->createItem();
86
+			if (!isset($view->item)) {
87
+				$view->item = \Aimeos\MShop::create($context, 'locale/language')->createItem();
88 88
 			}
89 89
 
90 90
 			$view->itemSubparts = $this->getSubClientNames();
91 91
 			$view->itemData = $data;
92 92
 			$view->itemBody = '';
93 93
 
94
-			foreach( $this->getSubClients() as $idx => $client )
94
+			foreach ($this->getSubClients() as $idx => $client)
95 95
 			{
96 96
 				$view->tabindex = ++$idx + 1;
97 97
 				$view->itemBody .= $client->create();
98 98
 			}
99 99
 		}
100
-		catch( \Aimeos\MShop\Exception $e )
100
+		catch (\Aimeos\MShop\Exception $e)
101 101
 		{
102
-			$error = array( 'locale-language-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
103
-			$view->errors = $view->get( 'errors', [] ) + $error;
104
-			$this->logException( $e );
102
+			$error = array('locale-language-item' => $context->getI18n()->dt('mshop', $e->getMessage()));
103
+			$view->errors = $view->get('errors', []) + $error;
104
+			$this->logException($e);
105 105
 		}
106
-		catch( \Exception $e )
106
+		catch (\Exception $e)
107 107
 		{
108
-			$error = array( 'locale-language-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
109
-			$view->errors = $view->get( 'errors', [] ) + $error;
110
-			$this->logException( $e );
108
+			$error = array('locale-language-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
109
+			$view->errors = $view->get('errors', []) + $error;
110
+			$this->logException($e);
111 111
 		}
112 112
 
113
-		return $this->render( $view );
113
+		return $this->render($view);
114 114
 	}
115 115
 
116 116
 
@@ -124,38 +124,38 @@  discard block
 block discarded – undo
124 124
 		$view = $this->getView();
125 125
 		$context = $this->getContext();
126 126
 
127
-		$manager = \Aimeos\MShop::create( $context, 'locale/language' );
127
+		$manager = \Aimeos\MShop::create($context, 'locale/language');
128 128
 		$manager->begin();
129 129
 
130 130
 		try
131 131
 		{
132
-			if( ( $id = $view->param( 'id' ) ) === null ) {
133
-				throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Required parameter "%1$s" is missing', 'id' ) );
132
+			if (($id = $view->param('id')) === null) {
133
+				throw new \Aimeos\Admin\JQAdm\Exception(sprintf('Required parameter "%1$s" is missing', 'id'));
134 134
 			}
135 135
 
136
-			$view->item = $manager->getItem( $id );
136
+			$view->item = $manager->getItem($id);
137 137
 
138
-			foreach( $this->getSubClients() as $client ) {
138
+			foreach ($this->getSubClients() as $client) {
139 139
 				$client->delete();
140 140
 			}
141 141
 
142
-			$manager->deleteItem( $id );
142
+			$manager->deleteItem($id);
143 143
 			$manager->commit();
144 144
 
145
-			$this->nextAction( $view, 'search', 'locale/language', null, 'delete' );
145
+			$this->nextAction($view, 'search', 'locale/language', null, 'delete');
146 146
 			return;
147 147
 		}
148
-		catch( \Aimeos\MShop\Exception $e )
148
+		catch (\Aimeos\MShop\Exception $e)
149 149
 		{
150
-			$error = array( 'locale-language-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
151
-			$view->errors = $view->get( 'errors', [] ) + $error;
152
-			$this->logException( $e );
150
+			$error = array('locale-language-item' => $context->getI18n()->dt('mshop', $e->getMessage()));
151
+			$view->errors = $view->get('errors', []) + $error;
152
+			$this->logException($e);
153 153
 		}
154
-		catch( \Exception $e )
154
+		catch (\Exception $e)
155 155
 		{
156
-			$error = array( 'locale-language-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
157
-			$view->errors = $view->get( 'errors', [] ) + $error;
158
-			$this->logException( $e );
156
+			$error = array('locale-language-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
157
+			$view->errors = $view->get('errors', []) + $error;
158
+			$this->logException($e);
159 159
 		}
160 160
 
161 161
 		$manager->rollback();
@@ -176,37 +176,37 @@  discard block
 block discarded – undo
176 176
 
177 177
 		try
178 178
 		{
179
-			if( ( $id = $view->param( 'id' ) ) === null ) {
180
-				throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Required parameter "%1$s" is missing', 'id' ) );
179
+			if (($id = $view->param('id')) === null) {
180
+				throw new \Aimeos\Admin\JQAdm\Exception(sprintf('Required parameter "%1$s" is missing', 'id'));
181 181
 			}
182 182
 
183
-			$manager = \Aimeos\MShop::create( $context, 'locale/language' );
183
+			$manager = \Aimeos\MShop::create($context, 'locale/language');
184 184
 
185
-			$view->item = $manager->getItem( $id );
185
+			$view->item = $manager->getItem($id);
186 186
 			$view->itemSubparts = $this->getSubClientNames();
187
-			$view->itemData = $this->toArray( $view->item );
187
+			$view->itemData = $this->toArray($view->item);
188 188
 			$view->itemBody = '';
189 189
 
190
-			foreach( $this->getSubClients() as $idx => $client )
190
+			foreach ($this->getSubClients() as $idx => $client)
191 191
 			{
192 192
 				$view->tabindex = ++$idx + 1;
193 193
 				$view->itemBody .= $client->get();
194 194
 			}
195 195
 		}
196
-		catch( \Aimeos\MShop\Exception $e )
196
+		catch (\Aimeos\MShop\Exception $e)
197 197
 		{
198
-			$error = array( 'locale-language-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
199
-			$view->errors = $view->get( 'errors', [] ) + $error;
200
-			$this->logException( $e );
198
+			$error = array('locale-language-item' => $context->getI18n()->dt('mshop', $e->getMessage()));
199
+			$view->errors = $view->get('errors', []) + $error;
200
+			$this->logException($e);
201 201
 		}
202
-		catch( \Exception $e )
202
+		catch (\Exception $e)
203 203
 		{
204
-			$error = array( 'locale-language-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
205
-			$view->errors = $view->get( 'errors', [] ) + $error;
206
-			$this->logException( $e );
204
+			$error = array('locale-language-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
205
+			$view->errors = $view->get('errors', []) + $error;
206
+			$this->logException($e);
207 207
 		}
208 208
 
209
-		return $this->render( $view );
209
+		return $this->render($view);
210 210
 	}
211 211
 
212 212
 
@@ -220,40 +220,40 @@  discard block
 block discarded – undo
220 220
 		$view = $this->getView();
221 221
 		$context = $this->getContext();
222 222
 
223
-		$manager = \Aimeos\MShop::create( $context, 'locale/language' );
223
+		$manager = \Aimeos\MShop::create($context, 'locale/language');
224 224
 		$manager->begin();
225 225
 
226 226
 		try
227 227
 		{
228
-			$item = $this->fromArray( $view->param( 'item', [] ) );
229
-			$view->item = $item->getId() ? $item : $manager->saveItem( $item );
228
+			$item = $this->fromArray($view->param('item', []));
229
+			$view->item = $item->getId() ? $item : $manager->saveItem($item);
230 230
 			$view->itemBody = '';
231 231
 
232
-			foreach( $this->getSubClients() as $client ) {
232
+			foreach ($this->getSubClients() as $client) {
233 233
 				$view->itemBody .= $client->save();
234 234
 			}
235 235
 
236
-			$manager->saveItem( clone $view->item );
236
+			$manager->saveItem(clone $view->item);
237 237
 			$manager->commit();
238 238
 
239
-			$this->nextAction( $view, $view->param( 'next' ), 'locale/language', $view->item->getId(), 'save' );
239
+			$this->nextAction($view, $view->param('next'), 'locale/language', $view->item->getId(), 'save');
240 240
 			return;
241 241
 		}
242
-		catch( \Aimeos\Admin\JQAdm\Exception $e )
242
+		catch (\Aimeos\Admin\JQAdm\Exception $e)
243 243
 		{
244 244
 			// fall through to create
245 245
 		}
246
-		catch( \Aimeos\MShop\Exception $e )
246
+		catch (\Aimeos\MShop\Exception $e)
247 247
 		{
248
-			$error = array( 'locale-language-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
249
-			$view->errors = $view->get( 'errors', [] ) + $error;
250
-			$this->logException( $e );
248
+			$error = array('locale-language-item' => $context->getI18n()->dt('mshop', $e->getMessage()));
249
+			$view->errors = $view->get('errors', []) + $error;
250
+			$this->logException($e);
251 251
 		}
252
-		catch( \Exception $e )
252
+		catch (\Exception $e)
253 253
 		{
254
-			$error = array( 'locale-language-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
255
-			$view->errors = $view->get( 'errors', [] ) + $error;
256
-			$this->logException( $e );
254
+			$error = array('locale-language-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
255
+			$view->errors = $view->get('errors', []) + $error;
256
+			$this->logException($e);
257 257
 		}
258 258
 
259 259
 		$manager->rollback();
@@ -275,34 +275,34 @@  discard block
 block discarded – undo
275 275
 		try
276 276
 		{
277 277
 			$total = 0;
278
-			$params = $this->storeSearchParams( $view->param(), 'locale/language' );
279
-			$manager = \Aimeos\MShop::create( $context, 'locale/language' );
278
+			$params = $this->storeSearchParams($view->param(), 'locale/language');
279
+			$manager = \Aimeos\MShop::create($context, 'locale/language');
280 280
 
281 281
 			$search = $manager->createSearch();
282
-			$search->setSortations( [$search->sort( '-', 'locale.language.status'), $search->sort( '+', 'locale.language.id')] );
283
-			$search = $this->initCriteria( $search, $params );
282
+			$search->setSortations([$search->sort('-', 'locale.language.status'), $search->sort('+', 'locale.language.id')]);
283
+			$search = $this->initCriteria($search, $params);
284 284
 
285
-			$view->items = $manager->searchItems( $search, [], $total );
286
-			$view->filterAttributes = $manager->getSearchAttributes( true );
285
+			$view->items = $manager->searchItems($search, [], $total);
286
+			$view->filterAttributes = $manager->getSearchAttributes(true);
287 287
 			$view->filterOperators = $search->getOperators();
288 288
 			$view->total = $total;
289 289
 			$view->itemBody = '';
290 290
 
291
-			foreach( $this->getSubClients() as $client ) {
291
+			foreach ($this->getSubClients() as $client) {
292 292
 				$view->itemBody .= $client->search();
293 293
 			}
294 294
 		}
295
-		catch( \Aimeos\MShop\Exception $e )
295
+		catch (\Aimeos\MShop\Exception $e)
296 296
 		{
297
-			$error = array( 'locale-language-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
298
-			$view->errors = $view->get( 'errors', [] ) + $error;
299
-			$this->logException( $e );
297
+			$error = array('locale-language-item' => $context->getI18n()->dt('mshop', $e->getMessage()));
298
+			$view->errors = $view->get('errors', []) + $error;
299
+			$this->logException($e);
300 300
 		}
301
-		catch( \Exception $e )
301
+		catch (\Exception $e)
302 302
 		{
303
-			$error = array( 'locale-language-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
304
-			$view->errors = $view->get( 'errors', [] ) + $error;
305
-			$this->logException( $e );
303
+			$error = array('locale-language-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
304
+			$view->errors = $view->get('errors', []) + $error;
305
+			$this->logException($e);
306 306
 		}
307 307
 
308 308
 		/** admin/jqadm/locale/language/template-list
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 		$tplconf = 'admin/jqadm/locale/language/template-list';
328 328
 		$default = 'locale/language/list-standard';
329 329
 
330
-		return $view->render( $view->config( $tplconf, $default ) );
330
+		return $view->render($view->config($tplconf, $default));
331 331
 	}
332 332
 
333 333
 
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
 	 * @param string|null $name Name of the sub-client (Default if null)
339 339
 	 * @return \Aimeos\Admin\JQAdm\Iface Sub-client object
340 340
 	 */
341
-	public function getSubClient( $type, $name = null )
341
+	public function getSubClient($type, $name = null)
342 342
 	{
343 343
 		/** admin/jqadm/locale/language/decorators/excludes
344 344
 		 * Excludes decorators added by the "common" option from the locale JQAdm client
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
 		 * @see admin/jqadm/locale/language/decorators/excludes
414 414
 		 * @see admin/jqadm/locale/language/decorators/global
415 415
 		 */
416
-		return $this->createSubClient( 'locale/language' . $type, $name );
416
+		return $this->createSubClient('locale/language' . $type, $name);
417 417
 	}
418 418
 
419 419
 
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
 		 * @since 2017.10
458 458
 		 * @category Developer
459 459
 		 */
460
-		return $this->getContext()->getConfig()->get( 'admin/jqadm/locale/language/standard/subparts', [] );
460
+		return $this->getContext()->getConfig()->get('admin/jqadm/locale/language/standard/subparts', []);
461 461
 	}
462 462
 
463 463
 
@@ -468,17 +468,17 @@  discard block
 block discarded – undo
468 468
 	 * @param string[] Data array
469 469
 	 * @return \Aimeos\MShop\Locale\Item\Iface New locale item object
470 470
 	 */
471
-	protected function fromArray( array $data )
471
+	protected function fromArray(array $data)
472 472
 	{
473
-		$manager = \Aimeos\MShop::create( $this->getContext(), 'locale/language' );
473
+		$manager = \Aimeos\MShop::create($this->getContext(), 'locale/language');
474 474
 
475
-		if( isset( $data['locale.language.id'] ) && $data['locale.language.id'] != '' ) {
476
-			$item = $manager->getItem( $data['locale.language.id'] );
475
+		if (isset($data['locale.language.id']) && $data['locale.language.id'] != '') {
476
+			$item = $manager->getItem($data['locale.language.id']);
477 477
 		} else {
478 478
 			$item = $manager->createItem();
479 479
 		}
480 480
 
481
-		$item->fromArray( $data );
481
+		$item->fromArray($data);
482 482
 
483 483
 		return $item;
484 484
 	}
@@ -490,11 +490,11 @@  discard block
 block discarded – undo
490 490
 	 * @param \Aimeos\MShop\Locale\Item\Iface $item Locale item object
491 491
 	 * @return string[] Multi-dimensional associative list of item data
492 492
 	 */
493
-	protected function toArray( \Aimeos\MShop\Locale\Item\Language\Iface $item, $copy = false )
493
+	protected function toArray(\Aimeos\MShop\Locale\Item\Language\Iface $item, $copy = false)
494 494
 	{
495
-		$data = $item->toArray( true );
495
+		$data = $item->toArray(true);
496 496
 
497
-		if( $copy === true )
497
+		if ($copy === true)
498 498
 		{
499 499
 			$data['locale.language.id'] = '';
500 500
 			$data['locale.language.code'] = '';
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
 	 * @param \Aimeos\MW\View\Iface $view View object with data assigned
511 511
 	 * @return string HTML output
512 512
 	 */
513
-	protected function render( \Aimeos\MW\View\Iface $view )
513
+	protected function render(\Aimeos\MW\View\Iface $view)
514 514
 	{
515 515
 		/** admin/jqadm/locale/language/template-item
516 516
 		 * Relative path to the HTML body template for the locale item.
@@ -534,6 +534,6 @@  discard block
 block discarded – undo
534 534
 		$tplconf = 'admin/jqadm/locale/language/template-item';
535 535
 		$default = 'locale/language/item-standard';
536 536
 
537
-		return $view->render( $view->config( $tplconf, $default ) );
537
+		return $view->render($view->config($tplconf, $default));
538 538
 	}
539 539
 }
Please login to merge, or discard this patch.
admin/jqadm/src/Admin/JQAdm/Locale/Currency/Standard.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -479,7 +479,7 @@
 block discarded – undo
479 479
 	/**
480 480
 	 * Constructs the data array for the view from the given item
481 481
 	 *
482
-	 * @param \Aimeos\MShop\Locale\Item\Iface $item Locale item object
482
+	 * @param \Aimeos\MShop\Locale\Item\Currency\Iface $item Locale item object
483 483
 	 * @return string[] Multi-dimensional associative list of item data
484 484
 	 */
485 485
 	protected function toArray( \Aimeos\MShop\Locale\Item\Currency\Iface $item, $copy = false )
Please login to merge, or discard this patch.
Spacing   +103 added lines, -103 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\Locale\Currency;
12 12
 
13
-sprintf( 'locale/currency' ); // for translation
13
+sprintf('locale/currency'); // for translation
14 14
 
15 15
 
16 16
 /**
@@ -35,37 +35,37 @@  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::create( $context, 'locale/currency' );
43
-			$view->item = $manager->getItem( $id );
42
+			$manager = \Aimeos\MShop::create($context, 'locale/currency');
43
+			$view->item = $manager->getItem($id);
44 44
 
45
-			$view->itemData = $this->toArray( $view->item, true );
45
+			$view->itemData = $this->toArray($view->item, true);
46 46
 			$view->itemSubparts = $this->getSubClientNames();
47 47
 			$view->itemBody = '';
48 48
 
49
-			foreach( $this->getSubClients() as $idx => $client )
49
+			foreach ($this->getSubClients() as $idx => $client)
50 50
 			{
51 51
 				$view->tabindex = ++$idx + 1;
52 52
 				$view->itemBody .= $client->copy();
53 53
 			}
54 54
 		}
55
-		catch( \Aimeos\MShop\Exception $e )
55
+		catch (\Aimeos\MShop\Exception $e)
56 56
 		{
57
-			$error = array( 'locale-currency-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
58
-			$view->errors = $view->get( 'errors', [] ) + $error;
59
-			$this->logException( $e );
57
+			$error = array('locale-currency-item' => $context->getI18n()->dt('mshop', $e->getMessage()));
58
+			$view->errors = $view->get('errors', []) + $error;
59
+			$this->logException($e);
60 60
 		}
61
-		catch( \Exception $e )
61
+		catch (\Exception $e)
62 62
 		{
63
-			$error = array( 'locale-currency-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
64
-			$view->errors = $view->get( 'errors', [] ) + $error;
65
-			$this->logException( $e );
63
+			$error = array('locale-currency-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
64
+			$view->errors = $view->get('errors', []) + $error;
65
+			$this->logException($e);
66 66
 		}
67 67
 
68
-		return $this->render( $view );
68
+		return $this->render($view);
69 69
 	}
70 70
 
71 71
 
@@ -81,36 +81,36 @@  discard block
 block discarded – undo
81 81
 
82 82
 		try
83 83
 		{
84
-			$data = $view->param( 'item', [] );
84
+			$data = $view->param('item', []);
85 85
 
86
-			if( !isset( $view->item ) ) {
87
-				$view->item = \Aimeos\MShop::create( $context, 'locale/currency' )->createItem();
86
+			if (!isset($view->item)) {
87
+				$view->item = \Aimeos\MShop::create($context, 'locale/currency')->createItem();
88 88
 			}
89 89
 
90 90
 			$view->itemSubparts = $this->getSubClientNames();
91 91
 			$view->itemData = $data;
92 92
 			$view->itemBody = '';
93 93
 
94
-			foreach( $this->getSubClients() as $idx => $client )
94
+			foreach ($this->getSubClients() as $idx => $client)
95 95
 			{
96 96
 				$view->tabindex = ++$idx + 1;
97 97
 				$view->itemBody .= $client->create();
98 98
 			}
99 99
 		}
100
-		catch( \Aimeos\MShop\Exception $e )
100
+		catch (\Aimeos\MShop\Exception $e)
101 101
 		{
102
-			$error = array( 'locale-currency-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
103
-			$view->errors = $view->get( 'errors', [] ) + $error;
104
-			$this->logException( $e );
102
+			$error = array('locale-currency-item' => $context->getI18n()->dt('mshop', $e->getMessage()));
103
+			$view->errors = $view->get('errors', []) + $error;
104
+			$this->logException($e);
105 105
 		}
106
-		catch( \Exception $e )
106
+		catch (\Exception $e)
107 107
 		{
108
-			$error = array( 'locale-currency-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
109
-			$view->errors = $view->get( 'errors', [] ) + $error;
110
-			$this->logException( $e );
108
+			$error = array('locale-currency-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
109
+			$view->errors = $view->get('errors', []) + $error;
110
+			$this->logException($e);
111 111
 		}
112 112
 
113
-		return $this->render( $view );
113
+		return $this->render($view);
114 114
 	}
115 115
 
116 116
 
@@ -124,38 +124,38 @@  discard block
 block discarded – undo
124 124
 		$view = $this->getView();
125 125
 		$context = $this->getContext();
126 126
 
127
-		$manager = \Aimeos\MShop::create( $context, 'locale/currency' );
127
+		$manager = \Aimeos\MShop::create($context, 'locale/currency');
128 128
 		$manager->begin();
129 129
 
130 130
 		try
131 131
 		{
132
-			if( ( $id = $view->param( 'id' ) ) === null ) {
133
-				throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Required parameter "%1$s" is missing', 'id' ) );
132
+			if (($id = $view->param('id')) === null) {
133
+				throw new \Aimeos\Admin\JQAdm\Exception(sprintf('Required parameter "%1$s" is missing', 'id'));
134 134
 			}
135 135
 
136
-			$view->item = $manager->getItem( $id );
136
+			$view->item = $manager->getItem($id);
137 137
 
138
-			foreach( $this->getSubClients() as $client ) {
138
+			foreach ($this->getSubClients() as $client) {
139 139
 				$client->delete();
140 140
 			}
141 141
 
142
-			$manager->deleteItem( $id );
142
+			$manager->deleteItem($id);
143 143
 			$manager->commit();
144 144
 
145
-			$this->nextAction( $view, 'search', 'locale/currency', null, 'delete' );
145
+			$this->nextAction($view, 'search', 'locale/currency', null, 'delete');
146 146
 			return;
147 147
 		}
148
-		catch( \Aimeos\MShop\Exception $e )
148
+		catch (\Aimeos\MShop\Exception $e)
149 149
 		{
150
-			$error = array( 'locale-currency-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
151
-			$view->errors = $view->get( 'errors', [] ) + $error;
152
-			$this->logException( $e );
150
+			$error = array('locale-currency-item' => $context->getI18n()->dt('mshop', $e->getMessage()));
151
+			$view->errors = $view->get('errors', []) + $error;
152
+			$this->logException($e);
153 153
 		}
154
-		catch( \Exception $e )
154
+		catch (\Exception $e)
155 155
 		{
156
-			$error = array( 'locale-currency-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
157
-			$view->errors = $view->get( 'errors', [] ) + $error;
158
-			$this->logException( $e );
156
+			$error = array('locale-currency-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
157
+			$view->errors = $view->get('errors', []) + $error;
158
+			$this->logException($e);
159 159
 		}
160 160
 
161 161
 		$manager->rollback();
@@ -176,37 +176,37 @@  discard block
 block discarded – undo
176 176
 
177 177
 		try
178 178
 		{
179
-			if( ( $id = $view->param( 'id' ) ) === null ) {
180
-				throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Required parameter "%1$s" is missing', 'id' ) );
179
+			if (($id = $view->param('id')) === null) {
180
+				throw new \Aimeos\Admin\JQAdm\Exception(sprintf('Required parameter "%1$s" is missing', 'id'));
181 181
 			}
182 182
 
183
-			$manager = \Aimeos\MShop::create( $context, 'locale/currency' );
183
+			$manager = \Aimeos\MShop::create($context, 'locale/currency');
184 184
 
185
-			$view->item = $manager->getItem( $id );
185
+			$view->item = $manager->getItem($id);
186 186
 			$view->itemSubparts = $this->getSubClientNames();
187
-			$view->itemData = $this->toArray( $view->item );
187
+			$view->itemData = $this->toArray($view->item);
188 188
 			$view->itemBody = '';
189 189
 
190
-			foreach( $this->getSubClients() as $idx => $client )
190
+			foreach ($this->getSubClients() as $idx => $client)
191 191
 			{
192 192
 				$view->tabindex = ++$idx + 1;
193 193
 				$view->itemBody .= $client->get();
194 194
 			}
195 195
 		}
196
-		catch( \Aimeos\MShop\Exception $e )
196
+		catch (\Aimeos\MShop\Exception $e)
197 197
 		{
198
-			$error = array( 'locale-currency-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
199
-			$view->errors = $view->get( 'errors', [] ) + $error;
200
-			$this->logException( $e );
198
+			$error = array('locale-currency-item' => $context->getI18n()->dt('mshop', $e->getMessage()));
199
+			$view->errors = $view->get('errors', []) + $error;
200
+			$this->logException($e);
201 201
 		}
202
-		catch( \Exception $e )
202
+		catch (\Exception $e)
203 203
 		{
204
-			$error = array( 'locale-currency-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
205
-			$view->errors = $view->get( 'errors', [] ) + $error;
206
-			$this->logException( $e );
204
+			$error = array('locale-currency-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
205
+			$view->errors = $view->get('errors', []) + $error;
206
+			$this->logException($e);
207 207
 		}
208 208
 
209
-		return $this->render( $view );
209
+		return $this->render($view);
210 210
 	}
211 211
 
212 212
 
@@ -220,40 +220,40 @@  discard block
 block discarded – undo
220 220
 		$view = $this->getView();
221 221
 		$context = $this->getContext();
222 222
 
223
-		$manager = \Aimeos\MShop::create( $context, 'locale/currency' );
223
+		$manager = \Aimeos\MShop::create($context, 'locale/currency');
224 224
 		$manager->begin();
225 225
 
226 226
 		try
227 227
 		{
228
-			$item = $this->fromArray( $view->param( 'item', [] ) );
229
-			$view->item = $item->getId() ? $item : $manager->saveItem( $item );
228
+			$item = $this->fromArray($view->param('item', []));
229
+			$view->item = $item->getId() ? $item : $manager->saveItem($item);
230 230
 			$view->itemBody = '';
231 231
 
232
-			foreach( $this->getSubClients() as $client ) {
232
+			foreach ($this->getSubClients() as $client) {
233 233
 				$view->itemBody .= $client->save();
234 234
 			}
235 235
 
236
-			$manager->saveItem( clone $view->item );
236
+			$manager->saveItem(clone $view->item);
237 237
 			$manager->commit();
238 238
 
239
-			$this->nextAction( $view, $view->param( 'next' ), 'locale/currency', $view->item->getId(), 'save' );
239
+			$this->nextAction($view, $view->param('next'), 'locale/currency', $view->item->getId(), 'save');
240 240
 			return;
241 241
 		}
242
-		catch( \Aimeos\Admin\JQAdm\Exception $e )
242
+		catch (\Aimeos\Admin\JQAdm\Exception $e)
243 243
 		{
244 244
 			// fall through to create
245 245
 		}
246
-		catch( \Aimeos\MShop\Exception $e )
246
+		catch (\Aimeos\MShop\Exception $e)
247 247
 		{
248
-			$error = array( 'locale-currency-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
249
-			$view->errors = $view->get( 'errors', [] ) + $error;
250
-			$this->logException( $e );
248
+			$error = array('locale-currency-item' => $context->getI18n()->dt('mshop', $e->getMessage()));
249
+			$view->errors = $view->get('errors', []) + $error;
250
+			$this->logException($e);
251 251
 		}
252
-		catch( \Exception $e )
252
+		catch (\Exception $e)
253 253
 		{
254
-			$error = array( 'locale-currency-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
255
-			$view->errors = $view->get( 'errors', [] ) + $error;
256
-			$this->logException( $e );
254
+			$error = array('locale-currency-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
255
+			$view->errors = $view->get('errors', []) + $error;
256
+			$this->logException($e);
257 257
 		}
258 258
 
259 259
 		$manager->rollback();
@@ -275,34 +275,34 @@  discard block
 block discarded – undo
275 275
 		try
276 276
 		{
277 277
 			$total = 0;
278
-			$params = $this->storeSearchParams( $view->param(), 'locale/currency' );
279
-			$manager = \Aimeos\MShop::create( $context, 'locale/currency' );
278
+			$params = $this->storeSearchParams($view->param(), 'locale/currency');
279
+			$manager = \Aimeos\MShop::create($context, 'locale/currency');
280 280
 
281 281
 			$search = $manager->createSearch();
282
-			$search->setSortations( [$search->sort( '-', 'locale.currency.status'), $search->sort( '+', 'locale.currency.id')] );
283
-			$search = $this->initCriteria( $search, $params );
282
+			$search->setSortations([$search->sort('-', 'locale.currency.status'), $search->sort('+', 'locale.currency.id')]);
283
+			$search = $this->initCriteria($search, $params);
284 284
 
285
-			$view->items = $manager->searchItems( $search, [], $total );
286
-			$view->filterAttributes = $manager->getSearchAttributes( true );
285
+			$view->items = $manager->searchItems($search, [], $total);
286
+			$view->filterAttributes = $manager->getSearchAttributes(true);
287 287
 			$view->filterOperators = $search->getOperators();
288 288
 			$view->total = $total;
289 289
 			$view->itemBody = '';
290 290
 
291
-			foreach( $this->getSubClients() as $client ) {
291
+			foreach ($this->getSubClients() as $client) {
292 292
 				$view->itemBody .= $client->search();
293 293
 			}
294 294
 		}
295
-		catch( \Aimeos\MShop\Exception $e )
295
+		catch (\Aimeos\MShop\Exception $e)
296 296
 		{
297
-			$error = array( 'locale-currency-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) );
298
-			$view->errors = $view->get( 'errors', [] ) + $error;
299
-			$this->logException( $e );
297
+			$error = array('locale-currency-item' => $context->getI18n()->dt('mshop', $e->getMessage()));
298
+			$view->errors = $view->get('errors', []) + $error;
299
+			$this->logException($e);
300 300
 		}
301
-		catch( \Exception $e )
301
+		catch (\Exception $e)
302 302
 		{
303
-			$error = array( 'locale-currency-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() );
304
-			$view->errors = $view->get( 'errors', [] ) + $error;
305
-			$this->logException( $e );
303
+			$error = array('locale-currency-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine());
304
+			$view->errors = $view->get('errors', []) + $error;
305
+			$this->logException($e);
306 306
 		}
307 307
 
308 308
 		/** admin/jqadm/locale/currency/template-list
@@ -327,7 +327,7 @@  discard block
 block discarded – undo
327 327
 		$tplconf = 'admin/jqadm/locale/currency/template-list';
328 328
 		$default = 'locale/currency/list-standard';
329 329
 
330
-		return $view->render( $view->config( $tplconf, $default ) );
330
+		return $view->render($view->config($tplconf, $default));
331 331
 	}
332 332
 
333 333
 
@@ -338,7 +338,7 @@  discard block
 block discarded – undo
338 338
 	 * @param string|null $name Name of the sub-client (Default if null)
339 339
 	 * @return \Aimeos\Admin\JQAdm\Iface Sub-client object
340 340
 	 */
341
-	public function getSubClient( $type, $name = null )
341
+	public function getSubClient($type, $name = null)
342 342
 	{
343 343
 		/** admin/jqadm/locale/currency/decorators/excludes
344 344
 		 * Excludes decorators added by the "common" option from the locale JQAdm client
@@ -413,7 +413,7 @@  discard block
 block discarded – undo
413 413
 		 * @see admin/jqadm/locale/currency/decorators/excludes
414 414
 		 * @see admin/jqadm/locale/currency/decorators/global
415 415
 		 */
416
-		return $this->createSubClient( 'locale/currency' . $type, $name );
416
+		return $this->createSubClient('locale/currency' . $type, $name);
417 417
 	}
418 418
 
419 419
 
@@ -457,7 +457,7 @@  discard block
 block discarded – undo
457 457
 		 * @since 2017.10
458 458
 		 * @category Developer
459 459
 		 */
460
-		return $this->getContext()->getConfig()->get( 'admin/jqadm/locale/currency/standard/subparts', [] );
460
+		return $this->getContext()->getConfig()->get('admin/jqadm/locale/currency/standard/subparts', []);
461 461
 	}
462 462
 
463 463
 
@@ -468,17 +468,17 @@  discard block
 block discarded – undo
468 468
 	 * @param string[] Data array
469 469
 	 * @return \Aimeos\MShop\Locale\Item\Iface New locale item object
470 470
 	 */
471
-	protected function fromArray( array $data )
471
+	protected function fromArray(array $data)
472 472
 	{
473
-		$manager = \Aimeos\MShop::create( $this->getContext(), 'locale/currency' );
473
+		$manager = \Aimeos\MShop::create($this->getContext(), 'locale/currency');
474 474
 
475
-		if( isset( $data['locale.currency.id'] ) && $data['locale.currency.id'] != '' ) {
476
-			$item = $manager->getItem( $data['locale.currency.id'] );
475
+		if (isset($data['locale.currency.id']) && $data['locale.currency.id'] != '') {
476
+			$item = $manager->getItem($data['locale.currency.id']);
477 477
 		} else {
478 478
 			$item = $manager->createItem();
479 479
 		}
480 480
 
481
-		$item->fromArray( $data );
481
+		$item->fromArray($data);
482 482
 
483 483
 		return $item;
484 484
 	}
@@ -490,11 +490,11 @@  discard block
 block discarded – undo
490 490
 	 * @param \Aimeos\MShop\Locale\Item\Iface $item Locale item object
491 491
 	 * @return string[] Multi-dimensional associative list of item data
492 492
 	 */
493
-	protected function toArray( \Aimeos\MShop\Locale\Item\Currency\Iface $item, $copy = false )
493
+	protected function toArray(\Aimeos\MShop\Locale\Item\Currency\Iface $item, $copy = false)
494 494
 	{
495
-		$data = $item->toArray( true );
495
+		$data = $item->toArray(true);
496 496
 
497
-		if( $copy === true )
497
+		if ($copy === true)
498 498
 		{
499 499
 			$data['locale.currency.id'] = '';
500 500
 			$data['locale.currency.code'] = '';
@@ -510,7 +510,7 @@  discard block
 block discarded – undo
510 510
 	 * @param \Aimeos\MW\View\Iface $view View object with data assigned
511 511
 	 * @return string HTML output
512 512
 	 */
513
-	protected function render( \Aimeos\MW\View\Iface $view )
513
+	protected function render(\Aimeos\MW\View\Iface $view)
514 514
 	{
515 515
 		/** admin/jqadm/locale/currency/template-item
516 516
 		 * Relative path to the HTML body template for the locale item.
@@ -534,6 +534,6 @@  discard block
 block discarded – undo
534 534
 		$tplconf = 'admin/jqadm/locale/currency/template-item';
535 535
 		$default = 'locale/currency/item-standard';
536 536
 
537
-		return $view->render( $view->config( $tplconf, $default ) );
537
+		return $view->render($view->config($tplconf, $default));
538 538
 	}
539 539
 }
Please login to merge, or discard this patch.