@@ -84,14 +84,12 @@ discard block |
||
84 | 84 | } |
85 | 85 | |
86 | 86 | $manager->deleteItem( $id ); |
87 | - } |
|
88 | - catch( \Aimeos\MAdmin\Exception $e ) |
|
87 | + } catch( \Aimeos\MAdmin\Exception $e ) |
|
89 | 88 | { |
90 | 89 | $error = array( 'job-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
91 | 90 | $view->errors = $view->get( 'errors', [] ) + $error; |
92 | 91 | $this->logException( $e ); |
93 | - } |
|
94 | - catch( \Exception $e ) |
|
92 | + } catch( \Exception $e ) |
|
95 | 93 | { |
96 | 94 | $error = array( 'job-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
97 | 95 | $view->errors = $view->get( 'errors', [] ) + $error; |
@@ -129,14 +127,12 @@ discard block |
||
129 | 127 | $view->response()->withHeader( 'Content-Type', 'text/csv' ); |
130 | 128 | $view->response()->withBody( $stream ); |
131 | 129 | } |
132 | - } |
|
133 | - catch( \Aimeos\MAdmin\Exception $e ) |
|
130 | + } catch( \Aimeos\MAdmin\Exception $e ) |
|
134 | 131 | { |
135 | 132 | $error = array( 'job-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
136 | 133 | $view->errors = $view->get( 'errors', [] ) + $error; |
137 | 134 | $this->logException( $e ); |
138 | - } |
|
139 | - catch( \Exception $e ) |
|
135 | + } catch( \Exception $e ) |
|
140 | 136 | { |
141 | 137 | $error = array( 'job-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
142 | 138 | $view->errors = $view->get( 'errors', [] ) + $error; |
@@ -171,14 +167,12 @@ discard block |
||
171 | 167 | foreach( $this->getSubClients() as $client ) { |
172 | 168 | $view->jobBody .= $client->search(); |
173 | 169 | } |
174 | - } |
|
175 | - catch( \Aimeos\MShop\Exception $e ) |
|
170 | + } catch( \Aimeos\MShop\Exception $e ) |
|
176 | 171 | { |
177 | 172 | $error = array( 'product-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
178 | 173 | $view->errors = $view->get( 'errors', [] ) + $error; |
179 | 174 | $this->logException( $e ); |
180 | - } |
|
181 | - catch( \Exception $e ) |
|
175 | + } catch( \Exception $e ) |
|
182 | 176 | { |
183 | 177 | $error = array( 'product-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
184 | 178 | $view->errors = $view->get( 'errors', [] ) + $error; |
@@ -45,32 +45,32 @@ discard block |
||
45 | 45 | |
46 | 46 | try |
47 | 47 | { |
48 | - if( ( $id = $view->param( 'id' ) ) === null ) { |
|
49 | - throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Required parameter "%1$s" is missing', 'id' ) ); |
|
48 | + if (($id = $view->param('id')) === null) { |
|
49 | + throw new \Aimeos\Admin\JQAdm\Exception(sprintf('Required parameter "%1$s" is missing', 'id')); |
|
50 | 50 | } |
51 | 51 | |
52 | - $fs = $context->getFileSystemManager()->get( 'fs-admin' ); |
|
53 | - $manager = \Aimeos\MAdmin\Factory::createManager( $context, 'job' ); |
|
54 | - $item = $manager->getItem( $id ); |
|
52 | + $fs = $context->getFileSystemManager()->get('fs-admin'); |
|
53 | + $manager = \Aimeos\MAdmin\Factory::createManager($context, 'job'); |
|
54 | + $item = $manager->getItem($id); |
|
55 | 55 | $result = $item->getResult(); |
56 | 56 | |
57 | - if( isset( $result['file'] ) && $fs->has( $result['file'] ) ) { |
|
58 | - $fs->rm( $result['file'] ); |
|
57 | + if (isset($result['file']) && $fs->has($result['file'])) { |
|
58 | + $fs->rm($result['file']); |
|
59 | 59 | } |
60 | 60 | |
61 | - $manager->deleteItem( $id ); |
|
61 | + $manager->deleteItem($id); |
|
62 | 62 | } |
63 | - catch( \Aimeos\MAdmin\Exception $e ) |
|
63 | + catch (\Aimeos\MAdmin\Exception $e) |
|
64 | 64 | { |
65 | - $error = array( 'job-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
|
66 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
67 | - $this->logException( $e ); |
|
65 | + $error = array('job-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( 'job-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
|
72 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
73 | - $this->logException( $e ); |
|
71 | + $error = array('job-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine()); |
|
72 | + $view->errors = $view->get('errors', []) + $error; |
|
73 | + $this->logException($e); |
|
74 | 74 | } |
75 | 75 | |
76 | 76 | return $this->search(); |
@@ -89,33 +89,33 @@ discard block |
||
89 | 89 | |
90 | 90 | try |
91 | 91 | { |
92 | - if( ( $id = $view->param( 'id' ) ) === null ) { |
|
93 | - throw new \Aimeos\Admin\JQAdm\Exception( sprintf( 'Required parameter "%1$s" is missing', 'id' ) ); |
|
92 | + if (($id = $view->param('id')) === null) { |
|
93 | + throw new \Aimeos\Admin\JQAdm\Exception(sprintf('Required parameter "%1$s" is missing', 'id')); |
|
94 | 94 | } |
95 | 95 | |
96 | - $fs = $context->getFileSystemManager()->get( 'fs-admin' ); |
|
97 | - $item = \Aimeos\MAdmin\Factory::createManager( $context, 'job' )->getItem( $id ); |
|
96 | + $fs = $context->getFileSystemManager()->get('fs-admin'); |
|
97 | + $item = \Aimeos\MAdmin\Factory::createManager($context, 'job')->getItem($id); |
|
98 | 98 | $result = $item->getResult(); |
99 | 99 | |
100 | - if( isset( $result['file'] ) && $fs->has( $result['file'] ) ) |
|
100 | + if (isset($result['file']) && $fs->has($result['file'])) |
|
101 | 101 | { |
102 | - $stream = $view->response()->createStream( $fs->reads( $result['file'] ) ); |
|
103 | - $view->response()->withHeader( 'Content-Disposition', 'attachment; filename="' . $result['file'] . '"' ); |
|
104 | - $view->response()->withHeader( 'Content-Type', 'text/csv' ); |
|
105 | - $view->response()->withBody( $stream ); |
|
102 | + $stream = $view->response()->createStream($fs->reads($result['file'])); |
|
103 | + $view->response()->withHeader('Content-Disposition', 'attachment; filename="' . $result['file'] . '"'); |
|
104 | + $view->response()->withHeader('Content-Type', 'text/csv'); |
|
105 | + $view->response()->withBody($stream); |
|
106 | 106 | } |
107 | 107 | } |
108 | - catch( \Aimeos\MAdmin\Exception $e ) |
|
108 | + catch (\Aimeos\MAdmin\Exception $e) |
|
109 | 109 | { |
110 | - $error = array( 'job-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
|
111 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
112 | - $this->logException( $e ); |
|
110 | + $error = array('job-item' => $context->getI18n()->dt('mshop', $e->getMessage())); |
|
111 | + $view->errors = $view->get('errors', []) + $error; |
|
112 | + $this->logException($e); |
|
113 | 113 | } |
114 | - catch( \Exception $e ) |
|
114 | + catch (\Exception $e) |
|
115 | 115 | { |
116 | - $error = array( 'job-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
|
117 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
118 | - $this->logException( $e ); |
|
116 | + $error = array('job-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine()); |
|
117 | + $view->errors = $view->get('errors', []) + $error; |
|
118 | + $this->logException($e); |
|
119 | 119 | } |
120 | 120 | } |
121 | 121 | |
@@ -132,32 +132,32 @@ discard block |
||
132 | 132 | |
133 | 133 | try |
134 | 134 | { |
135 | - $manager = \Aimeos\MAdmin\Factory::createManager( $context, 'job' ); |
|
135 | + $manager = \Aimeos\MAdmin\Factory::createManager($context, 'job'); |
|
136 | 136 | |
137 | 137 | $search = $manager->createSearch(); |
138 | - $search->setSortations( [$search->sort( '-', 'job.ctime' ), $search->sort( '-', 'job.id' )] ); |
|
138 | + $search->setSortations([$search->sort('-', 'job.ctime'), $search->sort('-', 'job.id')]); |
|
139 | 139 | $total = 0; |
140 | 140 | |
141 | 141 | $view->jobBody = ''; |
142 | - $view->jobItems = $manager->searchItems( $search, [], $total ); |
|
142 | + $view->jobItems = $manager->searchItems($search, [], $total); |
|
143 | 143 | $view->jobTotal = $total; |
144 | 144 | |
145 | 145 | |
146 | - foreach( $this->getSubClients() as $client ) { |
|
146 | + foreach ($this->getSubClients() as $client) { |
|
147 | 147 | $view->jobBody .= $client->search(); |
148 | 148 | } |
149 | 149 | } |
150 | - catch( \Aimeos\MShop\Exception $e ) |
|
150 | + catch (\Aimeos\MShop\Exception $e) |
|
151 | 151 | { |
152 | - $error = array( 'product-item' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
|
153 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
154 | - $this->logException( $e ); |
|
152 | + $error = array('product-item' => $context->getI18n()->dt('mshop', $e->getMessage())); |
|
153 | + $view->errors = $view->get('errors', []) + $error; |
|
154 | + $this->logException($e); |
|
155 | 155 | } |
156 | - catch( \Exception $e ) |
|
156 | + catch (\Exception $e) |
|
157 | 157 | { |
158 | - $error = array( 'product-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
|
159 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
160 | - $this->logException( $e ); |
|
158 | + $error = array('product-item' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine()); |
|
159 | + $view->errors = $view->get('errors', []) + $error; |
|
160 | + $this->logException($e); |
|
161 | 161 | } |
162 | 162 | |
163 | 163 | /** admin/jqadm/dashboard/job/template-list |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | $tplconf = 'admin/jqadm/dashboard/job/template-list'; |
183 | 183 | $default = 'dashboard/list-job-standard'; |
184 | 184 | |
185 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
185 | + return $view->render($view->config($tplconf, $default)); |
|
186 | 186 | } |
187 | 187 | |
188 | 188 | |
@@ -193,7 +193,7 @@ discard block |
||
193 | 193 | * @param string|null $name Name of the sub-client (Default if null) |
194 | 194 | * @return \Aimeos\Admin\JQAdm\Iface Sub-client object |
195 | 195 | */ |
196 | - public function getSubClient( $type, $name = null ) |
|
196 | + public function getSubClient($type, $name = null) |
|
197 | 197 | { |
198 | 198 | /** admin/jqadm/dashboard/job/decorators/excludes |
199 | 199 | * Excludes decorators added by the "common" option from the dashboard JQAdm client |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | * @see admin/jqadm/dashboard/job/decorators/excludes |
269 | 269 | * @see admin/jqadm/dashboard/job/decorators/global |
270 | 270 | */ |
271 | - return $this->createSubClient( 'dashboard/job/' . $type, $name ); |
|
271 | + return $this->createSubClient('dashboard/job/' . $type, $name); |
|
272 | 272 | } |
273 | 273 | |
274 | 274 | |
@@ -312,6 +312,6 @@ discard block |
||
312 | 312 | * @since 2017.08 |
313 | 313 | * @category Developer |
314 | 314 | */ |
315 | - return $this->getContext()->getConfig()->get( 'admin/jqadm/dashboard/job/standard/subparts', [] ); |
|
315 | + return $this->getContext()->getConfig()->get('admin/jqadm/dashboard/job/standard/subparts', []); |
|
316 | 316 | } |
317 | 317 | } |
@@ -77,14 +77,12 @@ |
||
77 | 77 | foreach( $this->getSubClients() as $client ) { |
78 | 78 | $view->orderservicepaymentBody .= $client->search(); |
79 | 79 | } |
80 | - } |
|
81 | - catch( \Aimeos\MShop\Exception $e ) |
|
80 | + } catch( \Aimeos\MShop\Exception $e ) |
|
82 | 81 | { |
83 | 82 | $error = array( 'order-servicepayment' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
84 | 83 | $view->errors = $view->get( 'errors', [] ) + $error; |
85 | 84 | $this->logException( $e ); |
86 | - } |
|
87 | - catch( \Exception $e ) |
|
85 | + } catch( \Exception $e ) |
|
88 | 86 | { |
89 | 87 | $error = array( 'order-servicepayment' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
90 | 88 | $view->errors = $view->get( 'errors', [] ) + $error; |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | namespace Aimeos\Admin\JQAdm\Dashboard\Order\Servicepayment; |
12 | 12 | |
13 | -sprintf( 'servicepayment' ); // for translation |
|
13 | +sprintf('servicepayment'); // for translation |
|
14 | 14 | |
15 | 15 | |
16 | 16 | /** |
@@ -49,21 +49,21 @@ discard block |
||
49 | 49 | { |
50 | 50 | $view->orderservicepaymentBody = ''; |
51 | 51 | |
52 | - foreach( $this->getSubClients() as $client ) { |
|
52 | + foreach ($this->getSubClients() as $client) { |
|
53 | 53 | $view->orderservicepaymentBody .= $client->search(); |
54 | 54 | } |
55 | 55 | } |
56 | - catch( \Aimeos\MShop\Exception $e ) |
|
56 | + catch (\Aimeos\MShop\Exception $e) |
|
57 | 57 | { |
58 | - $error = array( 'order-servicepayment' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
|
59 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
60 | - $this->logException( $e ); |
|
58 | + $error = array('order-servicepayment' => $context->getI18n()->dt('mshop', $e->getMessage())); |
|
59 | + $view->errors = $view->get('errors', []) + $error; |
|
60 | + $this->logException($e); |
|
61 | 61 | } |
62 | - catch( \Exception $e ) |
|
62 | + catch (\Exception $e) |
|
63 | 63 | { |
64 | - $error = array( 'order-servicepayment' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
|
65 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
66 | - $this->logException( $e ); |
|
64 | + $error = array('order-servicepayment' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine()); |
|
65 | + $view->errors = $view->get('errors', []) + $error; |
|
66 | + $this->logException($e); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | /** admin/jqadm/dashboard/order/servicepayment/template-item |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $tplconf = 'admin/jqadm/dashboard/order/servicepayment/template-item'; |
89 | 89 | $default = 'dashboard/item-order-servicepayment-standard'; |
90 | 90 | |
91 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
91 | + return $view->render($view->config($tplconf, $default)); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | * @param string|null $name Name of the sub-client (Default if null) |
100 | 100 | * @return \Aimeos\Admin\JQAdm\Iface Sub-client object |
101 | 101 | */ |
102 | - public function getSubClient( $type, $name = null ) |
|
102 | + public function getSubClient($type, $name = null) |
|
103 | 103 | { |
104 | 104 | /** admin/jqadm/dashboard/order/servicepayment/decorators/excludes |
105 | 105 | * Excludes decorators added by the "common" option from the dashboard JQAdm client |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | * @see admin/jqadm/dashboard/order/servicepayment/decorators/excludes |
175 | 175 | * @see admin/jqadm/dashboard/order/servicepayment/decorators/global |
176 | 176 | */ |
177 | - return $this->createSubClient( 'dashboard/order/servicepayment/' . $type, $name ); |
|
177 | + return $this->createSubClient('dashboard/order/servicepayment/' . $type, $name); |
|
178 | 178 | } |
179 | 179 | |
180 | 180 | |
@@ -218,6 +218,6 @@ discard block |
||
218 | 218 | * @since 2018.01 |
219 | 219 | * @category Developer |
220 | 220 | */ |
221 | - return $this->getContext()->getConfig()->get( 'admin/jqadm/dashboard/order/servicepayment/standard/subparts', [] ); |
|
221 | + return $this->getContext()->getConfig()->get('admin/jqadm/dashboard/order/servicepayment/standard/subparts', []); |
|
222 | 222 | } |
223 | 223 | } |
@@ -77,14 +77,12 @@ |
||
77 | 77 | foreach( $this->getSubClients() as $client ) { |
78 | 78 | $view->ordercountpaystatusBody .= $client->search(); |
79 | 79 | } |
80 | - } |
|
81 | - catch( \Aimeos\MShop\Exception $e ) |
|
80 | + } catch( \Aimeos\MShop\Exception $e ) |
|
82 | 81 | { |
83 | 82 | $error = array( 'order-countpaystatus' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
84 | 83 | $view->errors = $view->get( 'errors', [] ) + $error; |
85 | 84 | $this->logException( $e ); |
86 | - } |
|
87 | - catch( \Exception $e ) |
|
85 | + } catch( \Exception $e ) |
|
88 | 86 | { |
89 | 87 | $error = array( 'order-countpaystatus' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
90 | 88 | $view->errors = $view->get( 'errors', [] ) + $error; |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | namespace Aimeos\Admin\JQAdm\Dashboard\Order\Countpaystatus; |
12 | 12 | |
13 | -sprintf( 'countpaystatus' ); // for translation |
|
13 | +sprintf('countpaystatus'); // for translation |
|
14 | 14 | |
15 | 15 | |
16 | 16 | /** |
@@ -49,21 +49,21 @@ discard block |
||
49 | 49 | { |
50 | 50 | $view->ordercountpaystatusBody = ''; |
51 | 51 | |
52 | - foreach( $this->getSubClients() as $client ) { |
|
52 | + foreach ($this->getSubClients() as $client) { |
|
53 | 53 | $view->ordercountpaystatusBody .= $client->search(); |
54 | 54 | } |
55 | 55 | } |
56 | - catch( \Aimeos\MShop\Exception $e ) |
|
56 | + catch (\Aimeos\MShop\Exception $e) |
|
57 | 57 | { |
58 | - $error = array( 'order-countpaystatus' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
|
59 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
60 | - $this->logException( $e ); |
|
58 | + $error = array('order-countpaystatus' => $context->getI18n()->dt('mshop', $e->getMessage())); |
|
59 | + $view->errors = $view->get('errors', []) + $error; |
|
60 | + $this->logException($e); |
|
61 | 61 | } |
62 | - catch( \Exception $e ) |
|
62 | + catch (\Exception $e) |
|
63 | 63 | { |
64 | - $error = array( 'order-countpaystatus' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
|
65 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
66 | - $this->logException( $e ); |
|
64 | + $error = array('order-countpaystatus' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine()); |
|
65 | + $view->errors = $view->get('errors', []) + $error; |
|
66 | + $this->logException($e); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | /** admin/jqadm/dashboard/order/countpaystatus/template-item |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $tplconf = 'admin/jqadm/dashboard/order/countpaystatus/template-item'; |
89 | 89 | $default = 'dashboard/item-order-countpaystatus-standard'; |
90 | 90 | |
91 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
91 | + return $view->render($view->config($tplconf, $default)); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | * @param string|null $name Name of the sub-client (Default if null) |
100 | 100 | * @return \Aimeos\Admin\JQAdm\Iface Sub-client object |
101 | 101 | */ |
102 | - public function getSubClient( $type, $name = null ) |
|
102 | + public function getSubClient($type, $name = null) |
|
103 | 103 | { |
104 | 104 | /** admin/jqadm/dashboard/order/countpaystatus/decorators/excludes |
105 | 105 | * Excludes decorators added by the "common" option from the dashboard JQAdm client |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | * @see admin/jqadm/dashboard/order/countpaystatus/decorators/excludes |
175 | 175 | * @see admin/jqadm/dashboard/order/countpaystatus/decorators/global |
176 | 176 | */ |
177 | - return $this->createSubClient( 'dashboard/order/countpaystatus/' . $type, $name ); |
|
177 | + return $this->createSubClient('dashboard/order/countpaystatus/' . $type, $name); |
|
178 | 178 | } |
179 | 179 | |
180 | 180 | |
@@ -218,6 +218,6 @@ discard block |
||
218 | 218 | * @since 2018.01 |
219 | 219 | * @category Developer |
220 | 220 | */ |
221 | - return $this->getContext()->getConfig()->get( 'admin/jqadm/dashboard/order/countpaystatus/standard/subparts', [] ); |
|
221 | + return $this->getContext()->getConfig()->get('admin/jqadm/dashboard/order/countpaystatus/standard/subparts', []); |
|
222 | 222 | } |
223 | 223 | } |
@@ -77,14 +77,12 @@ |
||
77 | 77 | foreach( $this->getSubClients() as $client ) { |
78 | 78 | $view->orderlatestBody .= $client->search(); |
79 | 79 | } |
80 | - } |
|
81 | - catch( \Aimeos\MShop\Exception $e ) |
|
80 | + } catch( \Aimeos\MShop\Exception $e ) |
|
82 | 81 | { |
83 | 82 | $error = array( 'order-latest' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
84 | 83 | $view->errors = $view->get( 'errors', [] ) + $error; |
85 | 84 | $this->logException( $e ); |
86 | - } |
|
87 | - catch( \Exception $e ) |
|
85 | + } catch( \Exception $e ) |
|
88 | 86 | { |
89 | 87 | $error = array( 'order-latest' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
90 | 88 | $view->errors = $view->get( 'errors', [] ) + $error; |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | namespace Aimeos\Admin\JQAdm\Dashboard\Order\Latest; |
12 | 12 | |
13 | -sprintf( 'latest' ); // for translation |
|
13 | +sprintf('latest'); // for translation |
|
14 | 14 | |
15 | 15 | |
16 | 16 | /** |
@@ -46,24 +46,24 @@ discard block |
||
46 | 46 | |
47 | 47 | try |
48 | 48 | { |
49 | - $this->addOrders( $view ); |
|
49 | + $this->addOrders($view); |
|
50 | 50 | $view->orderlatestBody = ''; |
51 | 51 | |
52 | - foreach( $this->getSubClients() as $client ) { |
|
52 | + foreach ($this->getSubClients() as $client) { |
|
53 | 53 | $view->orderlatestBody .= $client->search(); |
54 | 54 | } |
55 | 55 | } |
56 | - catch( \Aimeos\MShop\Exception $e ) |
|
56 | + catch (\Aimeos\MShop\Exception $e) |
|
57 | 57 | { |
58 | - $error = array( 'order-latest' => $this->getContext()->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
|
59 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
60 | - $this->logException( $e ); |
|
58 | + $error = array('order-latest' => $this->getContext()->getI18n()->dt('mshop', $e->getMessage())); |
|
59 | + $view->errors = $view->get('errors', []) + $error; |
|
60 | + $this->logException($e); |
|
61 | 61 | } |
62 | - catch( \Exception $e ) |
|
62 | + catch (\Exception $e) |
|
63 | 63 | { |
64 | - $error = array( 'order-latest' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
|
65 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
66 | - $this->logException( $e ); |
|
64 | + $error = array('order-latest' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine()); |
|
65 | + $view->errors = $view->get('errors', []) + $error; |
|
66 | + $this->logException($e); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | /** admin/jqadm/dashboard/order/latest/template-item |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $tplconf = 'admin/jqadm/dashboard/order/latest/template-item'; |
89 | 89 | $default = 'dashboard/item-order-latest-standard'; |
90 | 90 | |
91 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
91 | + return $view->render($view->config($tplconf, $default)); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | * @param string|null $name Name of the sub-client (Default if null) |
100 | 100 | * @return \Aimeos\Admin\JQAdm\Iface Sub-client object |
101 | 101 | */ |
102 | - public function getSubClient( $type, $name = null ) |
|
102 | + public function getSubClient($type, $name = null) |
|
103 | 103 | { |
104 | 104 | /** admin/jqadm/dashboard/order/latest/decorators/excludes |
105 | 105 | * Excludes decorators added by the "common" option from the dashboard JQAdm client |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | * @see admin/jqadm/dashboard/order/latest/decorators/excludes |
175 | 175 | * @see admin/jqadm/dashboard/order/latest/decorators/global |
176 | 176 | */ |
177 | - return $this->createSubClient( 'dashboard/order/latest/' . $type, $name ); |
|
177 | + return $this->createSubClient('dashboard/order/latest/' . $type, $name); |
|
178 | 178 | } |
179 | 179 | |
180 | 180 | |
@@ -183,28 +183,28 @@ discard block |
||
183 | 183 | * |
184 | 184 | * @param \Aimeos\MW\View\Iface $view View object to add the parameters to |
185 | 185 | */ |
186 | - protected function addOrders( \Aimeos\MW\View\Iface $view ) |
|
186 | + protected function addOrders(\Aimeos\MW\View\Iface $view) |
|
187 | 187 | { |
188 | - $manager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'order' ); |
|
188 | + $manager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'order'); |
|
189 | 189 | |
190 | 190 | $search = $manager->createSearch(); |
191 | - $search->setSortations( [$search->sort( '-', 'order.ctime' ), $search->sort( '-', 'order.id' )] ); |
|
192 | - $search->setSlice( 0, 10 ); |
|
191 | + $search->setSortations([$search->sort('-', 'order.ctime'), $search->sort('-', 'order.id')]); |
|
192 | + $search->setSlice(0, 10); |
|
193 | 193 | |
194 | - $items = $manager->searchItems( $search ); |
|
194 | + $items = $manager->searchItems($search); |
|
195 | 195 | |
196 | 196 | $baseIds = []; |
197 | - foreach( $items as $item ) { |
|
197 | + foreach ($items as $item) { |
|
198 | 198 | $baseIds[] = $item->getBaseId(); |
199 | 199 | } |
200 | 200 | |
201 | 201 | |
202 | - $baseManager = \Aimeos\MShop\Factory::createManager( $this->getContext(), 'order/base' ); |
|
202 | + $baseManager = \Aimeos\MShop\Factory::createManager($this->getContext(), 'order/base'); |
|
203 | 203 | |
204 | - $baseSearch = $manager->createSearch()->setSlice( 0, count( $baseIds ) ); |
|
205 | - $baseSearch->setConditions( $baseSearch->compare( '==', 'order.base.id', $baseIds ) ); |
|
204 | + $baseSearch = $manager->createSearch()->setSlice(0, count($baseIds)); |
|
205 | + $baseSearch->setConditions($baseSearch->compare('==', 'order.base.id', $baseIds)); |
|
206 | 206 | |
207 | - $basketItems = $baseManager->searchItems( $baseSearch, ['order/base/address', 'order/base/service'] ); |
|
207 | + $basketItems = $baseManager->searchItems($baseSearch, ['order/base/address', 'order/base/service']); |
|
208 | 208 | |
209 | 209 | |
210 | 210 | $view->orderlatestBaskets = $basketItems; |
@@ -252,6 +252,6 @@ discard block |
||
252 | 252 | * @since 2016.07 |
253 | 253 | * @category Developer |
254 | 254 | */ |
255 | - return $this->getContext()->getConfig()->get( 'admin/jqadm/dashboard/order/latest/standard/subparts', [] ); |
|
255 | + return $this->getContext()->getConfig()->get('admin/jqadm/dashboard/order/latest/standard/subparts', []); |
|
256 | 256 | } |
257 | 257 | } |
@@ -77,14 +77,12 @@ |
||
77 | 77 | foreach( $this->getSubClients() as $client ) { |
78 | 78 | $view->orderpaymenttypeBody .= $client->search(); |
79 | 79 | } |
80 | - } |
|
81 | - catch( \Aimeos\MShop\Exception $e ) |
|
80 | + } catch( \Aimeos\MShop\Exception $e ) |
|
82 | 81 | { |
83 | 82 | $error = array( 'order-counthour' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
84 | 83 | $view->errors = $view->get( 'errors', [] ) + $error; |
85 | 84 | $this->logException( $e ); |
86 | - } |
|
87 | - catch( \Exception $e ) |
|
85 | + } catch( \Exception $e ) |
|
88 | 86 | { |
89 | 87 | $error = array( 'order-counthour' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
90 | 88 | $view->errors = $view->get( 'errors', [] ) + $error; |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | namespace Aimeos\Admin\JQAdm\Dashboard\Order\Counthour; |
12 | 12 | |
13 | -sprintf( 'counthour' ); // for translation |
|
13 | +sprintf('counthour'); // for translation |
|
14 | 14 | |
15 | 15 | |
16 | 16 | /** |
@@ -49,21 +49,21 @@ discard block |
||
49 | 49 | { |
50 | 50 | $view->orderpaymenttypeBody = ''; |
51 | 51 | |
52 | - foreach( $this->getSubClients() as $client ) { |
|
52 | + foreach ($this->getSubClients() as $client) { |
|
53 | 53 | $view->orderpaymenttypeBody .= $client->search(); |
54 | 54 | } |
55 | 55 | } |
56 | - catch( \Aimeos\MShop\Exception $e ) |
|
56 | + catch (\Aimeos\MShop\Exception $e) |
|
57 | 57 | { |
58 | - $error = array( 'order-counthour' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
|
59 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
60 | - $this->logException( $e ); |
|
58 | + $error = array('order-counthour' => $context->getI18n()->dt('mshop', $e->getMessage())); |
|
59 | + $view->errors = $view->get('errors', []) + $error; |
|
60 | + $this->logException($e); |
|
61 | 61 | } |
62 | - catch( \Exception $e ) |
|
62 | + catch (\Exception $e) |
|
63 | 63 | { |
64 | - $error = array( 'order-counthour' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
|
65 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
66 | - $this->logException( $e ); |
|
64 | + $error = array('order-counthour' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine()); |
|
65 | + $view->errors = $view->get('errors', []) + $error; |
|
66 | + $this->logException($e); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | /** admin/jqadm/dashboard/order/counthour/template-item |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $tplconf = 'admin/jqadm/dashboard/order/counthour/template-item'; |
89 | 89 | $default = 'dashboard/item-order-counthour-standard'; |
90 | 90 | |
91 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
91 | + return $view->render($view->config($tplconf, $default)); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | * @param string|null $name Name of the sub-client (Default if null) |
100 | 100 | * @return \Aimeos\Admin\JQAdm\Iface Sub-client object |
101 | 101 | */ |
102 | - public function getSubClient( $type, $name = null ) |
|
102 | + public function getSubClient($type, $name = null) |
|
103 | 103 | { |
104 | 104 | /** admin/jqadm/dashboard/order/counthour/decorators/excludes |
105 | 105 | * Excludes decorators added by the "common" option from the dashboard JQAdm client |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | * @see admin/jqadm/dashboard/order/counthour/decorators/excludes |
175 | 175 | * @see admin/jqadm/dashboard/order/counthour/decorators/global |
176 | 176 | */ |
177 | - return $this->createSubClient( 'dashboard/order/counthour/' . $type, $name ); |
|
177 | + return $this->createSubClient('dashboard/order/counthour/' . $type, $name); |
|
178 | 178 | } |
179 | 179 | |
180 | 180 | |
@@ -218,6 +218,6 @@ discard block |
||
218 | 218 | * @since 2018.01 |
219 | 219 | * @category Developer |
220 | 220 | */ |
221 | - return $this->getContext()->getConfig()->get( 'admin/jqadm/dashboard/order/counthour/standard/subparts', [] ); |
|
221 | + return $this->getContext()->getConfig()->get('admin/jqadm/dashboard/order/counthour/standard/subparts', []); |
|
222 | 222 | } |
223 | 223 | } |
@@ -77,14 +77,12 @@ |
||
77 | 77 | foreach( $this->getSubClients() as $client ) { |
78 | 78 | $view->orderpaymenttypeBody .= $client->search(); |
79 | 79 | } |
80 | - } |
|
81 | - catch( \Aimeos\MShop\Exception $e ) |
|
80 | + } catch( \Aimeos\MShop\Exception $e ) |
|
82 | 81 | { |
83 | 82 | $error = array( 'order-countday' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
84 | 83 | $view->errors = $view->get( 'errors', [] ) + $error; |
85 | 84 | $this->logException( $e ); |
86 | - } |
|
87 | - catch( \Exception $e ) |
|
85 | + } catch( \Exception $e ) |
|
88 | 86 | { |
89 | 87 | $error = array( 'order-countday' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
90 | 88 | $view->errors = $view->get( 'errors', [] ) + $error; |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | namespace Aimeos\Admin\JQAdm\Dashboard\Order\Countday; |
12 | 12 | |
13 | -sprintf( 'countday' ); // for translation |
|
13 | +sprintf('countday'); // for translation |
|
14 | 14 | |
15 | 15 | |
16 | 16 | /** |
@@ -49,21 +49,21 @@ discard block |
||
49 | 49 | { |
50 | 50 | $view->orderpaymenttypeBody = ''; |
51 | 51 | |
52 | - foreach( $this->getSubClients() as $client ) { |
|
52 | + foreach ($this->getSubClients() as $client) { |
|
53 | 53 | $view->orderpaymenttypeBody .= $client->search(); |
54 | 54 | } |
55 | 55 | } |
56 | - catch( \Aimeos\MShop\Exception $e ) |
|
56 | + catch (\Aimeos\MShop\Exception $e) |
|
57 | 57 | { |
58 | - $error = array( 'order-countday' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
|
59 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
60 | - $this->logException( $e ); |
|
58 | + $error = array('order-countday' => $context->getI18n()->dt('mshop', $e->getMessage())); |
|
59 | + $view->errors = $view->get('errors', []) + $error; |
|
60 | + $this->logException($e); |
|
61 | 61 | } |
62 | - catch( \Exception $e ) |
|
62 | + catch (\Exception $e) |
|
63 | 63 | { |
64 | - $error = array( 'order-countday' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
|
65 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
66 | - $this->logException( $e ); |
|
64 | + $error = array('order-countday' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine()); |
|
65 | + $view->errors = $view->get('errors', []) + $error; |
|
66 | + $this->logException($e); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | /** admin/jqadm/dashboard/order/countday/template-item |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $tplconf = 'admin/jqadm/dashboard/order/countday/template-item'; |
89 | 89 | $default = 'dashboard/item-order-countday-standard'; |
90 | 90 | |
91 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
91 | + return $view->render($view->config($tplconf, $default)); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | * @param string|null $name Name of the sub-client (Default if null) |
100 | 100 | * @return \Aimeos\Admin\JQAdm\Iface Sub-client object |
101 | 101 | */ |
102 | - public function getSubClient( $type, $name = null ) |
|
102 | + public function getSubClient($type, $name = null) |
|
103 | 103 | { |
104 | 104 | /** admin/jqadm/dashboard/order/countday/decorators/excludes |
105 | 105 | * Excludes decorators added by the "common" option from the dashboard JQAdm client |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | * @see admin/jqadm/dashboard/order/countday/decorators/excludes |
175 | 175 | * @see admin/jqadm/dashboard/order/countday/decorators/global |
176 | 176 | */ |
177 | - return $this->createSubClient( 'dashboard/order/countday/' . $type, $name ); |
|
177 | + return $this->createSubClient('dashboard/order/countday/' . $type, $name); |
|
178 | 178 | } |
179 | 179 | |
180 | 180 | |
@@ -218,6 +218,6 @@ discard block |
||
218 | 218 | * @since 2018.01 |
219 | 219 | * @category Developer |
220 | 220 | */ |
221 | - return $this->getContext()->getConfig()->get( 'admin/jqadm/dashboard/order/countday/standard/subparts', [] ); |
|
221 | + return $this->getContext()->getConfig()->get('admin/jqadm/dashboard/order/countday/standard/subparts', []); |
|
222 | 222 | } |
223 | 223 | } |
@@ -77,14 +77,12 @@ |
||
77 | 77 | foreach( $this->getSubClients() as $client ) { |
78 | 78 | $view->orderpaymenttypeBody .= $client->search(); |
79 | 79 | } |
80 | - } |
|
81 | - catch( \Aimeos\MShop\Exception $e ) |
|
80 | + } catch( \Aimeos\MShop\Exception $e ) |
|
82 | 81 | { |
83 | 82 | $error = array( 'order-salesweekday' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
84 | 83 | $view->errors = $view->get( 'errors', [] ) + $error; |
85 | 84 | $this->logException( $e ); |
86 | - } |
|
87 | - catch( \Exception $e ) |
|
85 | + } catch( \Exception $e ) |
|
88 | 86 | { |
89 | 87 | $error = array( 'order-salesweekday' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
90 | 88 | $view->errors = $view->get( 'errors', [] ) + $error; |
@@ -10,7 +10,7 @@ discard block |
||
10 | 10 | |
11 | 11 | namespace Aimeos\Admin\JQAdm\Dashboard\Order\Salesweekday; |
12 | 12 | |
13 | -sprintf( 'salesweekday' ); // for translation |
|
13 | +sprintf('salesweekday'); // for translation |
|
14 | 14 | |
15 | 15 | |
16 | 16 | /** |
@@ -49,21 +49,21 @@ discard block |
||
49 | 49 | { |
50 | 50 | $view->orderpaymenttypeBody = ''; |
51 | 51 | |
52 | - foreach( $this->getSubClients() as $client ) { |
|
52 | + foreach ($this->getSubClients() as $client) { |
|
53 | 53 | $view->orderpaymenttypeBody .= $client->search(); |
54 | 54 | } |
55 | 55 | } |
56 | - catch( \Aimeos\MShop\Exception $e ) |
|
56 | + catch (\Aimeos\MShop\Exception $e) |
|
57 | 57 | { |
58 | - $error = array( 'order-salesweekday' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
|
59 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
60 | - $this->logException( $e ); |
|
58 | + $error = array('order-salesweekday' => $context->getI18n()->dt('mshop', $e->getMessage())); |
|
59 | + $view->errors = $view->get('errors', []) + $error; |
|
60 | + $this->logException($e); |
|
61 | 61 | } |
62 | - catch( \Exception $e ) |
|
62 | + catch (\Exception $e) |
|
63 | 63 | { |
64 | - $error = array( 'order-salesweekday' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
|
65 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
66 | - $this->logException( $e ); |
|
64 | + $error = array('order-salesweekday' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine()); |
|
65 | + $view->errors = $view->get('errors', []) + $error; |
|
66 | + $this->logException($e); |
|
67 | 67 | } |
68 | 68 | |
69 | 69 | /** admin/jqadm/dashboard/order/salesweekday/template-item |
@@ -88,7 +88,7 @@ discard block |
||
88 | 88 | $tplconf = 'admin/jqadm/dashboard/order/salesweekday/template-item'; |
89 | 89 | $default = 'dashboard/item-order-salesweekday-standard'; |
90 | 90 | |
91 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
91 | + return $view->render($view->config($tplconf, $default)); |
|
92 | 92 | } |
93 | 93 | |
94 | 94 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | * @param string|null $name Name of the sub-client (Default if null) |
100 | 100 | * @return \Aimeos\Admin\JQAdm\Iface Sub-client object |
101 | 101 | */ |
102 | - public function getSubClient( $type, $name = null ) |
|
102 | + public function getSubClient($type, $name = null) |
|
103 | 103 | { |
104 | 104 | /** admin/jqadm/dashboard/order/salesweekday/decorators/excludes |
105 | 105 | * Excludes decorators added by the "common" option from the dashboard JQAdm client |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | * @see admin/jqadm/dashboard/order/salesweekday/decorators/excludes |
175 | 175 | * @see admin/jqadm/dashboard/order/salesweekday/decorators/global |
176 | 176 | */ |
177 | - return $this->createSubClient( 'dashboard/order/salesweekday/' . $type, $name ); |
|
177 | + return $this->createSubClient('dashboard/order/salesweekday/' . $type, $name); |
|
178 | 178 | } |
179 | 179 | |
180 | 180 | |
@@ -218,6 +218,6 @@ discard block |
||
218 | 218 | * @since 2018.01 |
219 | 219 | * @category Developer |
220 | 220 | */ |
221 | - return $this->getContext()->getConfig()->get( 'admin/jqadm/dashboard/order/salesweekday/standard/subparts', [] ); |
|
221 | + return $this->getContext()->getConfig()->get('admin/jqadm/dashboard/order/salesweekday/standard/subparts', []); |
|
222 | 222 | } |
223 | 223 | } |
@@ -75,14 +75,12 @@ |
||
75 | 75 | foreach( $this->getSubClients() as $client ) { |
76 | 76 | $view->ordersalesdayBody .= $client->search(); |
77 | 77 | } |
78 | - } |
|
79 | - catch( \Aimeos\MShop\Exception $e ) |
|
78 | + } catch( \Aimeos\MShop\Exception $e ) |
|
80 | 79 | { |
81 | 80 | $error = array( 'order-salesday' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
82 | 81 | $view->errors = $view->get( 'errors', [] ) + $error; |
83 | 82 | $this->logException( $e ); |
84 | - } |
|
85 | - catch( \Exception $e ) |
|
83 | + } catch( \Exception $e ) |
|
86 | 84 | { |
87 | 85 | $error = array( 'order-salesday' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
88 | 86 | $view->errors = $view->get( 'errors', [] ) + $error; |
@@ -47,21 +47,21 @@ discard block |
||
47 | 47 | { |
48 | 48 | $view->ordersalesdayBody = ''; |
49 | 49 | |
50 | - foreach( $this->getSubClients() as $client ) { |
|
50 | + foreach ($this->getSubClients() as $client) { |
|
51 | 51 | $view->ordersalesdayBody .= $client->search(); |
52 | 52 | } |
53 | 53 | } |
54 | - catch( \Aimeos\MShop\Exception $e ) |
|
54 | + catch (\Aimeos\MShop\Exception $e) |
|
55 | 55 | { |
56 | - $error = array( 'order-salesday' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
|
57 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
58 | - $this->logException( $e ); |
|
56 | + $error = array('order-salesday' => $context->getI18n()->dt('mshop', $e->getMessage())); |
|
57 | + $view->errors = $view->get('errors', []) + $error; |
|
58 | + $this->logException($e); |
|
59 | 59 | } |
60 | - catch( \Exception $e ) |
|
60 | + catch (\Exception $e) |
|
61 | 61 | { |
62 | - $error = array( 'order-salesday' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
|
63 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
64 | - $this->logException( $e ); |
|
62 | + $error = array('order-salesday' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine()); |
|
63 | + $view->errors = $view->get('errors', []) + $error; |
|
64 | + $this->logException($e); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | /** admin/jqadm/dashboard/order/salesday/template-item |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $tplconf = 'admin/jqadm/dashboard/order/salesday/template-item'; |
87 | 87 | $default = 'dashboard/item-order-salesday-standard'; |
88 | 88 | |
89 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
89 | + return $view->render($view->config($tplconf, $default)); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | * @param string|null $name Name of the sub-client (Default if null) |
98 | 98 | * @return \Aimeos\Admin\JQAdm\Iface Sub-client object |
99 | 99 | */ |
100 | - public function getSubClient( $type, $name = null ) |
|
100 | + public function getSubClient($type, $name = null) |
|
101 | 101 | { |
102 | 102 | /** admin/jqadm/dashboard/order/salesday/decorators/excludes |
103 | 103 | * Excludes decorators added by the "common" option from the dashboard JQAdm client |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | * @see admin/jqadm/dashboard/order/salesday/decorators/excludes |
173 | 173 | * @see admin/jqadm/dashboard/order/salesday/decorators/global |
174 | 174 | */ |
175 | - return $this->createSubClient( 'dashboard/order/salesday/' . $type, $name ); |
|
175 | + return $this->createSubClient('dashboard/order/salesday/' . $type, $name); |
|
176 | 176 | } |
177 | 177 | |
178 | 178 | |
@@ -216,6 +216,6 @@ discard block |
||
216 | 216 | * @since 2018.01 |
217 | 217 | * @category Developer |
218 | 218 | */ |
219 | - return $this->getContext()->getConfig()->get( 'admin/jqadm/dashboard/order/salesday/standard/subparts', [] ); |
|
219 | + return $this->getContext()->getConfig()->get('admin/jqadm/dashboard/order/salesday/standard/subparts', []); |
|
220 | 220 | } |
221 | 221 | } |
@@ -75,14 +75,12 @@ |
||
75 | 75 | foreach( $this->getSubClients() as $client ) { |
76 | 76 | $view->ordersalesmonthBody .= $client->search(); |
77 | 77 | } |
78 | - } |
|
79 | - catch( \Aimeos\MShop\Exception $e ) |
|
78 | + } catch( \Aimeos\MShop\Exception $e ) |
|
80 | 79 | { |
81 | 80 | $error = array( 'order-salesmonth' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
82 | 81 | $view->errors = $view->get( 'errors', [] ) + $error; |
83 | 82 | $this->logException( $e ); |
84 | - } |
|
85 | - catch( \Exception $e ) |
|
83 | + } catch( \Exception $e ) |
|
86 | 84 | { |
87 | 85 | $error = array( 'order-salesmonth' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
88 | 86 | $view->errors = $view->get( 'errors', [] ) + $error; |
@@ -47,21 +47,21 @@ discard block |
||
47 | 47 | { |
48 | 48 | $view->ordersalesmonthBody = ''; |
49 | 49 | |
50 | - foreach( $this->getSubClients() as $client ) { |
|
50 | + foreach ($this->getSubClients() as $client) { |
|
51 | 51 | $view->ordersalesmonthBody .= $client->search(); |
52 | 52 | } |
53 | 53 | } |
54 | - catch( \Aimeos\MShop\Exception $e ) |
|
54 | + catch (\Aimeos\MShop\Exception $e) |
|
55 | 55 | { |
56 | - $error = array( 'order-salesmonth' => $context->getI18n()->dt( 'mshop', $e->getMessage() ) ); |
|
57 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
58 | - $this->logException( $e ); |
|
56 | + $error = array('order-salesmonth' => $context->getI18n()->dt('mshop', $e->getMessage())); |
|
57 | + $view->errors = $view->get('errors', []) + $error; |
|
58 | + $this->logException($e); |
|
59 | 59 | } |
60 | - catch( \Exception $e ) |
|
60 | + catch (\Exception $e) |
|
61 | 61 | { |
62 | - $error = array( 'order-salesmonth' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine() ); |
|
63 | - $view->errors = $view->get( 'errors', [] ) + $error; |
|
64 | - $this->logException( $e ); |
|
62 | + $error = array('order-salesmonth' => $e->getMessage() . ', ' . $e->getFile() . ':' . $e->getLine()); |
|
63 | + $view->errors = $view->get('errors', []) + $error; |
|
64 | + $this->logException($e); |
|
65 | 65 | } |
66 | 66 | |
67 | 67 | /** admin/jqadm/dashboard/order/salesmonth/template-item |
@@ -86,7 +86,7 @@ discard block |
||
86 | 86 | $tplconf = 'admin/jqadm/dashboard/order/salesmonth/template-item'; |
87 | 87 | $default = 'dashboard/item-order-salesmonth-standard'; |
88 | 88 | |
89 | - return $view->render( $view->config( $tplconf, $default ) ); |
|
89 | + return $view->render($view->config($tplconf, $default)); |
|
90 | 90 | } |
91 | 91 | |
92 | 92 | |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | * @param string|null $name Name of the sub-client (Default if null) |
98 | 98 | * @return \Aimeos\Admin\JQAdm\Iface Sub-client object |
99 | 99 | */ |
100 | - public function getSubClient( $type, $name = null ) |
|
100 | + public function getSubClient($type, $name = null) |
|
101 | 101 | { |
102 | 102 | /** admin/jqadm/dashboard/order/salesmonth/decorators/excludes |
103 | 103 | * Excludes decorators added by the "common" option from the dashboard JQAdm client |
@@ -172,7 +172,7 @@ discard block |
||
172 | 172 | * @see admin/jqadm/dashboard/order/salesmonth/decorators/excludes |
173 | 173 | * @see admin/jqadm/dashboard/order/salesmonth/decorators/global |
174 | 174 | */ |
175 | - return $this->createSubClient( 'dashboard/order/salesmonth/' . $type, $name ); |
|
175 | + return $this->createSubClient('dashboard/order/salesmonth/' . $type, $name); |
|
176 | 176 | } |
177 | 177 | |
178 | 178 | |
@@ -216,6 +216,6 @@ discard block |
||
216 | 216 | * @since 2018.01 |
217 | 217 | * @category Developer |
218 | 218 | */ |
219 | - return $this->getContext()->getConfig()->get( 'admin/jqadm/dashboard/order/salesmonth/standard/subparts', [] ); |
|
219 | + return $this->getContext()->getConfig()->get('admin/jqadm/dashboard/order/salesmonth/standard/subparts', []); |
|
220 | 220 | } |
221 | 221 | } |