Passed
Push — master ( d672e3...08f879 )
by Aimeos
04:07
created
src/routes.php 1 patch
Spacing   +56 added lines, -56 removed lines patch added patch discarded remove patch
@@ -1,253 +1,253 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-if(($conf = config('shop.routes.admin', ['prefix' => 'admin', 'middleware' => ['web']])) !== false ) {
3
+if( ( $conf = config( 'shop.routes.admin', ['prefix' => 'admin', 'middleware' => ['web']] ) ) !== false ) {
4 4
 
5
-	Route::group($conf, function() {
5
+	Route::group( $conf, function() {
6 6
 
7 7
 		Route::match( array( 'GET' ), '', array(
8 8
 			'as' => 'aimeos_shop_admin',
9 9
 			'uses' => 'Aimeos\Shop\Controller\AdminController@indexAction'
10
-		))->where( ['site' => '[a-z0-9\.\-]+'] );
10
+		) )->where( ['site' => '[a-z0-9\.\-]+'] );
11 11
 
12 12
 	});
13 13
 }
14 14
 
15 15
 
16
-if(($conf = config('shop.routes.jqadm', ['prefix' => 'admin/{site}/jqadm', 'middleware' => ['web', 'auth']])) !== false ) {
16
+if( ( $conf = config( 'shop.routes.jqadm', ['prefix' => 'admin/{site}/jqadm', 'middleware' => ['web', 'auth']] ) ) !== false ) {
17 17
 
18
-	Route::group($conf, function() {
18
+	Route::group( $conf, function() {
19 19
 
20 20
 		Route::match( array( 'GET' ), 'file/{type}', array(
21 21
 			'as' => 'aimeos_shop_jqadm_file',
22 22
 			'uses' => 'Aimeos\Shop\Controller\JqadmController@fileAction'
23
-		))->where( ['site' => '[a-z0-9\.\-]+'] );
23
+		) )->where( ['site' => '[a-z0-9\.\-]+'] );
24 24
 
25 25
 		Route::match( array( 'GET', 'POST' ), 'copy/{resource}/{id}', array(
26 26
 			'as' => 'aimeos_shop_jqadm_copy',
27 27
 			'uses' => 'Aimeos\Shop\Controller\JqadmController@copyAction'
28
-		))->where( ['site' => '[a-z0-9\.\-]+'] )->where( array( 'resource' => '[a-z\/]+' ) );
28
+		) )->where( ['site' => '[a-z0-9\.\-]+'] )->where( array( 'resource' => '[a-z\/]+' ) );
29 29
 
30 30
 		Route::match( array( 'GET', 'POST' ), 'create/{resource}', array(
31 31
 			'as' => 'aimeos_shop_jqadm_create',
32 32
 			'uses' => 'Aimeos\Shop\Controller\JqadmController@createAction'
33
-		))->where( ['site' => '[a-z0-9\.\-]+'] )->where( array( 'resource' => '[a-z\/]+' ) );
33
+		) )->where( ['site' => '[a-z0-9\.\-]+'] )->where( array( 'resource' => '[a-z\/]+' ) );
34 34
 
35 35
 		Route::match( array( 'GET', 'POST' ), 'delete/{resource}/{id}', array(
36 36
 			'as' => 'aimeos_shop_jqadm_delete',
37 37
 			'uses' => 'Aimeos\Shop\Controller\JqadmController@deleteAction'
38
-		))->where( ['site' => '[a-z0-9\.\-]+'] )->where( array( 'resource' => '[a-z\/]+' ) );
38
+		) )->where( ['site' => '[a-z0-9\.\-]+'] )->where( array( 'resource' => '[a-z\/]+' ) );
39 39
 
40 40
 		Route::match( array( 'GET', 'POST' ), 'export/{resource}', array(
41 41
 			'as' => 'aimeos_shop_jqadm_export',
42 42
 			'uses' => 'Aimeos\Shop\Controller\JqadmController@exportAction'
43
-		))->where( ['site' => '[a-z0-9\.\-]+'] )->where( array( 'resource' => '[a-z\/]+' ) );
43
+		) )->where( ['site' => '[a-z0-9\.\-]+'] )->where( array( 'resource' => '[a-z\/]+' ) );
44 44
 
45 45
 		Route::match( array( 'GET' ), 'get/{resource}/{id}', array(
46 46
 			'as' => 'aimeos_shop_jqadm_get',
47 47
 			'uses' => 'Aimeos\Shop\Controller\JqadmController@getAction'
48
-		))->where( ['site' => '[a-z0-9\.\-]+'] )->where( array( 'resource' => '[a-z\/]+' ) );
48
+		) )->where( ['site' => '[a-z0-9\.\-]+'] )->where( array( 'resource' => '[a-z\/]+' ) );
49 49
 
50 50
 		Route::match( array( 'POST' ), 'save/{resource}', array(
51 51
 			'as' => 'aimeos_shop_jqadm_save',
52 52
 			'uses' => 'Aimeos\Shop\Controller\JqadmController@saveAction'
53
-		))->where( ['site' => '[a-z0-9\.\-]+'] )->where( array( 'resource' => '[a-z\/]+' ) );
53
+		) )->where( ['site' => '[a-z0-9\.\-]+'] )->where( array( 'resource' => '[a-z\/]+' ) );
54 54
 
55 55
 		Route::match( array( 'GET', 'POST' ), 'search/{resource}', array(
56 56
 			'as' => 'aimeos_shop_jqadm_search',
57 57
 			'uses' => 'Aimeos\Shop\Controller\JqadmController@searchAction'
58
-		))->where( ['site' => '[a-z0-9\.\-]+'] )->where( array( 'resource' => '[a-z\/]+' ) );
58
+		) )->where( ['site' => '[a-z0-9\.\-]+'] )->where( array( 'resource' => '[a-z\/]+' ) );
59 59
 
60 60
 	});
61 61
 }
62 62
 
63 63
 
64
-if(($conf = config('shop.routes.jsonadm', ['prefix' => 'admin/{site}/jsonadm', 'middleware' => ['web', 'auth']])) !== false ) {
64
+if( ( $conf = config( 'shop.routes.jsonadm', ['prefix' => 'admin/{site}/jsonadm', 'middleware' => ['web', 'auth']] ) ) !== false ) {
65 65
 
66
-	Route::group($conf, function() {
66
+	Route::group( $conf, function() {
67 67
 
68 68
 		Route::match( array( 'DELETE' ), '{resource}/{id?}', array(
69 69
 			'as' => 'aimeos_shop_jsonadm_delete',
70 70
 			'uses' => 'Aimeos\Shop\Controller\JsonadmController@deleteAction'
71
-		))->where( ['site' => '[a-z0-9\.\-]+'] )->where( array( 'resource' => '[a-z\/]+' ) );
71
+		) )->where( ['site' => '[a-z0-9\.\-]+'] )->where( array( 'resource' => '[a-z\/]+' ) );
72 72
 
73 73
 		Route::match( array( 'GET' ), '{resource}/{id?}', array(
74 74
 			'as' => 'aimeos_shop_jsonadm_get',
75 75
 			'uses' => 'Aimeos\Shop\Controller\JsonadmController@getAction'
76
-		))->where( ['site' => '[a-z0-9\.\-]+'] )->where( array( 'resource' => '[a-z\/]+' ) );
76
+		) )->where( ['site' => '[a-z0-9\.\-]+'] )->where( array( 'resource' => '[a-z\/]+' ) );
77 77
 
78 78
 		Route::match( array( 'PATCH' ), '{resource}/{id?}', array(
79 79
 			'as' => 'aimeos_shop_jsonadm_patch',
80 80
 			'uses' => 'Aimeos\Shop\Controller\JsonadmController@patchAction'
81
-		))->where( ['site' => '[a-z0-9\.\-]+'] )->where( array( 'resource' => '[a-z\/]+' ) );
81
+		) )->where( ['site' => '[a-z0-9\.\-]+'] )->where( array( 'resource' => '[a-z\/]+' ) );
82 82
 
83 83
 		Route::match( array( 'POST' ), '{resource}/{id?}', array(
84 84
 			'as' => 'aimeos_shop_jsonadm_post',
85 85
 			'uses' => 'Aimeos\Shop\Controller\JsonadmController@postAction'
86
-		))->where( ['site' => '[a-z0-9\.\-]+'] )->where( array( 'resource' => '[a-z\/]+' ) );
86
+		) )->where( ['site' => '[a-z0-9\.\-]+'] )->where( array( 'resource' => '[a-z\/]+' ) );
87 87
 
88 88
 		Route::match( array( 'PUT' ), '{resource}/{id?}', array(
89 89
 			'as' => 'aimeos_shop_jsonadm_put',
90 90
 			'uses' => 'Aimeos\Shop\Controller\JsonadmController@putAction'
91
-		))->where( ['site' => '[a-z0-9\.\-]+'] )->where( array( 'resource' => '[a-z\/]+' ) );
91
+		) )->where( ['site' => '[a-z0-9\.\-]+'] )->where( array( 'resource' => '[a-z\/]+' ) );
92 92
 
93 93
 		Route::match( array( 'OPTIONS' ), '{resource?}', array(
94 94
 			'as' => 'aimeos_shop_jsonadm_options',
95 95
 			'uses' => 'Aimeos\Shop\Controller\JsonadmController@optionsAction'
96
-		))->where( ['site' => '[a-z0-9\.\-]+'] )->where( array( 'resource' => '[a-z\/]*' ) );
96
+		) )->where( ['site' => '[a-z0-9\.\-]+'] )->where( array( 'resource' => '[a-z\/]*' ) );
97 97
 
98 98
 	});
99 99
 }
100 100
 
101 101
 
102
-if(($conf = config('shop.routes.jsonapi', ['prefix' => 'jsonapi', 'middleware' => ['web', 'api']])) !== false ) {
102
+if( ( $conf = config( 'shop.routes.jsonapi', ['prefix' => 'jsonapi', 'middleware' => ['web', 'api']] ) ) !== false ) {
103 103
 
104
-	Route::group($conf, function() {
104
+	Route::group( $conf, function() {
105 105
 
106 106
 		Route::match( array( 'DELETE' ), '{resource}', array(
107 107
 			'as' => 'aimeos_shop_jsonapi_delete',
108 108
 			'uses' => 'Aimeos\Shop\Controller\JsonapiController@deleteAction'
109
-		))->where( ['site' => '[a-z0-9\.\-]+'] );
109
+		) )->where( ['site' => '[a-z0-9\.\-]+'] );
110 110
 
111 111
 		Route::match( array( 'GET' ), '{resource}', array(
112 112
 			'as' => 'aimeos_shop_jsonapi_get',
113 113
 			'uses' => 'Aimeos\Shop\Controller\JsonapiController@getAction'
114
-		))->where( ['site' => '[a-z0-9\.\-]+'] );
114
+		) )->where( ['site' => '[a-z0-9\.\-]+'] );
115 115
 
116 116
 		Route::match( array( 'PATCH' ), '{resource}', array(
117 117
 			'as' => 'aimeos_shop_jsonapi_patch',
118 118
 			'uses' => 'Aimeos\Shop\Controller\JsonapiController@patchAction'
119
-		))->where( ['site' => '[a-z0-9\.\-]+'] );
119
+		) )->where( ['site' => '[a-z0-9\.\-]+'] );
120 120
 
121 121
 		Route::match( array( 'POST' ), '{resource}', array(
122 122
 			'as' => 'aimeos_shop_jsonapi_post',
123 123
 			'uses' => 'Aimeos\Shop\Controller\JsonapiController@postAction'
124
-		))->where( ['site' => '[a-z0-9\.\-]+'] );
124
+		) )->where( ['site' => '[a-z0-9\.\-]+'] );
125 125
 
126 126
 		Route::match( array( 'PUT' ), '{resource}', array(
127 127
 			'as' => 'aimeos_shop_jsonapi_put',
128 128
 			'uses' => 'Aimeos\Shop\Controller\JsonapiController@putAction'
129
-		))->where( ['site' => '[a-z0-9\.\-]+'] );
129
+		) )->where( ['site' => '[a-z0-9\.\-]+'] );
130 130
 
131 131
 		Route::match( array( 'OPTIONS' ), '{resource?}', array(
132 132
 			'as' => 'aimeos_shop_jsonapi_options',
133 133
 			'uses' => 'Aimeos\Shop\Controller\JsonapiController@optionsAction'
134
-		))->where( ['site' => '[a-z0-9\.\-]+'] );
134
+		) )->where( ['site' => '[a-z0-9\.\-]+'] );
135 135
 
136 136
 	});
137 137
 }
138 138
 
139 139
 
140
-if(($conf = config('shop.routes.update', [])) !== false ) {
140
+if( ( $conf = config( 'shop.routes.update', [] ) ) !== false ) {
141 141
 
142
-	Route::group($conf, function() {
142
+	Route::group( $conf, function() {
143 143
 
144 144
 		Route::match( array( 'GET', 'POST' ), 'update', array(
145 145
 			'as' => 'aimeos_shop_update',
146 146
 			'uses' => 'Aimeos\Shop\Controller\CheckoutController@updateAction'
147
-		))->where( ['site' => '[a-z0-9\.\-]+'] );
147
+		) )->where( ['site' => '[a-z0-9\.\-]+'] );
148 148
 
149 149
 	});
150 150
 }
151 151
 
152 152
 
153
-if(($conf = config('shop.routes.account', ['prefix' => 'myaccount', 'middleware' => ['web', 'auth']])) !== false ) {
153
+if( ( $conf = config( 'shop.routes.account', ['prefix' => 'myaccount', 'middleware' => ['web', 'auth']] ) ) !== false ) {
154 154
 
155
-	Route::group($conf, function() {
155
+	Route::group( $conf, function() {
156 156
 
157 157
 		Route::match( array( 'GET', 'POST' ), 'favorite/{fav_action?}/{fav_id?}/{d_name?}/{d_pos?}', array(
158 158
 			'as' => 'aimeos_shop_account_favorite',
159 159
 			'uses' => 'Aimeos\Shop\Controller\AccountController@indexAction'
160
-		))->where( ['site' => '[a-z0-9\.\-]+'] );
160
+		) )->where( ['site' => '[a-z0-9\.\-]+'] );
161 161
 
162 162
 		Route::match( array( 'GET', 'POST' ), 'watch/{wat_action?}/{wat_id?}/{d_name?}/{d_pos?}', array(
163 163
 			'as' => 'aimeos_shop_account_watch',
164 164
 			'uses' => 'Aimeos\Shop\Controller\AccountController@indexAction'
165
-		))->where( ['site' => '[a-z0-9\.\-]+'] );
165
+		) )->where( ['site' => '[a-z0-9\.\-]+'] );
166 166
 
167 167
 		Route::match( array( 'GET', 'POST' ), 'download/{dl_id}', array(
168 168
 			'as' => 'aimeos_shop_account_download',
169 169
 			'uses' => 'Aimeos\Shop\Controller\AccountController@downloadAction'
170
-		))->where( ['site' => '[a-z0-9\.\-]+'] );
170
+		) )->where( ['site' => '[a-z0-9\.\-]+'] );
171 171
 
172 172
 		Route::match( array( 'GET', 'POST' ), '', array(
173 173
 			'as' => 'aimeos_shop_account',
174 174
 			'uses' => 'Aimeos\Shop\Controller\AccountController@indexAction'
175
-		))->where( ['site' => '[a-z0-9\.\-]+'] );
175
+		) )->where( ['site' => '[a-z0-9\.\-]+'] );
176 176
 
177 177
 	});
178 178
 }
179 179
 
180 180
 
181
-if(($conf = config('shop.routes.default', ['prefix' => 'shop', 'middleware' => ['web']])) !== false ) {
181
+if( ( $conf = config( 'shop.routes.default', ['prefix' => 'shop', 'middleware' => ['web']] ) ) !== false ) {
182 182
 
183
-	Route::group($conf, function() {
183
+	Route::group( $conf, function() {
184 184
 
185 185
 		Route::match( array( 'GET', 'POST' ), 'count', array(
186 186
 			'as' => 'aimeos_shop_count',
187 187
 			'uses' => 'Aimeos\Shop\Controller\CatalogController@countAction'
188
-		))->where( ['site' => '[a-z0-9\.\-]+'] );
188
+		) )->where( ['site' => '[a-z0-9\.\-]+'] );
189 189
 
190 190
 		Route::match( array( 'GET', 'POST' ), 'suggest', array(
191 191
 			'as' => 'aimeos_shop_suggest',
192 192
 			'uses' => 'Aimeos\Shop\Controller\CatalogController@suggestAction'
193
-		))->where( ['site' => '[a-z0-9\.\-]+'] );
193
+		) )->where( ['site' => '[a-z0-9\.\-]+'] );
194 194
 
195 195
 		Route::match( array( 'GET', 'POST' ), 'stock', array(
196 196
 			'as' => 'aimeos_shop_stock',
197 197
 			'uses' => 'Aimeos\Shop\Controller\CatalogController@stockAction'
198
-		))->where( ['site' => '[a-z0-9\.\-]+'] );
198
+		) )->where( ['site' => '[a-z0-9\.\-]+'] );
199 199
 
200 200
 		Route::match( array( 'GET', 'POST' ), 'basket', array(
201 201
 			'as' => 'aimeos_shop_basket',
202 202
 			'uses' => 'Aimeos\Shop\Controller\BasketController@indexAction'
203
-		))->where( ['site' => '[a-z0-9\.\-]+'] );
203
+		) )->where( ['site' => '[a-z0-9\.\-]+'] );
204 204
 
205 205
 		Route::match( array( 'GET', 'POST' ), 'checkout/{c_step?}', array(
206 206
 			'as' => 'aimeos_shop_checkout',
207 207
 			'uses' => 'Aimeos\Shop\Controller\CheckoutController@indexAction'
208
-		))->where( ['site' => '[a-z0-9\.\-]+'] );
208
+		) )->where( ['site' => '[a-z0-9\.\-]+'] );
209 209
 
210 210
 		Route::match( array( 'GET', 'POST' ), 'confirm/{code?}', array(
211 211
 			'as' => 'aimeos_shop_confirm',
212 212
 			'uses' => 'Aimeos\Shop\Controller\CheckoutController@confirmAction'
213
-		))->where( ['site' => '[a-z0-9\.\-]+'] );
213
+		) )->where( ['site' => '[a-z0-9\.\-]+'] );
214 214
 
215 215
 		Route::match( array( 'GET', 'POST' ), 'pin/{pin_action}/{pin_id}/{d_name}', array(
216 216
 			'as' => 'aimeos_shop_session_pinned',
217 217
 			'uses' => 'Aimeos\Shop\Controller\CatalogController@detailAction'
218
-		))->where( ['site' => '[a-z0-9\.\-]+'] );
218
+		) )->where( ['site' => '[a-z0-9\.\-]+'] );
219 219
 
220 220
 		Route::match( array( 'GET', 'POST' ), '{f_name}~{f_catid}', array(
221 221
 			'as' => 'aimeos_shop_tree',
222 222
 			'uses' => 'Aimeos\Shop\Controller\CatalogController@treeAction'
223
-		))->where( ['site' => '[a-z0-9\.\-]+', 'f_name' => '[^~]+'] );
223
+		) )->where( ['site' => '[a-z0-9\.\-]+', 'f_name' => '[^~]+'] );
224 224
 
225 225
 		Route::match( array( 'GET', 'POST' ), '{d_name}/{d_pos?}/{d_prodid?}', array(
226 226
 			'as' => 'aimeos_shop_detail',
227 227
 			'uses' => 'Aimeos\Shop\Controller\CatalogController@detailAction'
228
-		))->where( ['site' => '[a-z0-9\.\-]+', 'd_pos' => '[0-9]*'] );
228
+		) )->where( ['site' => '[a-z0-9\.\-]+', 'd_pos' => '[0-9]*'] );
229 229
 
230 230
 		Route::match( array( 'GET', 'POST' ), '', array(
231 231
 			'as' => 'aimeos_shop_list',
232 232
 			'uses' => 'Aimeos\Shop\Controller\CatalogController@listAction'
233
-		))->where( ['site' => '[a-z0-9\.\-]+'] );
233
+		) )->where( ['site' => '[a-z0-9\.\-]+'] );
234 234
 
235 235
 	});
236 236
 }
237 237
 
238 238
 
239
-if(($conf = config('shop.routes.legal', [])) !== false ) {
239
+if( ( $conf = config( 'shop.routes.legal', [] ) ) !== false ) {
240 240
 
241
-	Route::group($conf, function() {
241
+	Route::group( $conf, function() {
242 242
 
243
-		Route::get('terms', array(
243
+		Route::get( 'terms', array(
244 244
 			'as' => 'aimeos_shop_terms',
245 245
 			'uses' => 'Aimeos\Shop\Controller\PageController@termsAction'
246
-		))->where( ['site' => '[a-z0-9\.\-]+'] );
246
+		) )->where( ['site' => '[a-z0-9\.\-]+'] );
247 247
 
248
-		Route::get('privacy', array(
248
+		Route::get( 'privacy', array(
249 249
 			'as' => 'aimeos_shop_privacy',
250 250
 			'uses' => 'Aimeos\Shop\Controller\PageController@privacyAction'
251
-		))->where( ['site' => '[a-z0-9\.\-]+'] );
251
+		) )->where( ['site' => '[a-z0-9\.\-]+'] );
252 252
 	});
253 253
 }
Please login to merge, or discard this patch.