Issues (66)

src/aimeos-routes.php (45 issues)

1
<?php
2
3
4
$app->group( $config( 'routes/admin', '/admin' ), function() use ( $config ) {
5
6
	$this->map( ['GET', 'POST'], '', function( $request, $response, $args ) use ( $config ) {
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
7
		return $response->withHeader( 'Location', $config( 'routes/jqadm', '/admin/default/jqadm' ) . '/search/dashboard' );
8
	})->setName( 'aimeos_shop_admin' );
9
10
});
11
12
13
$app->group( $config( 'routes/jqadm', '/admin/{site}/jqadm' ), function() use ( $config ) {
0 ignored issues
show
The import $config is not used and could be removed.

This check looks for imports that have been defined, but are not used in the scope.

Loading history...
14
15
	$this->map( ['GET'], '/file/{type}', function( $request, $response, $args ) {
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
16
		return \Aimeos\Slim\Controller\Jqadm::fileAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
17
	})->setName( 'aimeos_shop_jqadm_file' );
18
19
	$this->map( ['GET', 'POST'], '/copy/{resource:[a-z\/]+}[/{id}]', function( $request, $response, $args ) {
20
		return \Aimeos\Slim\Controller\Jqadm::copyAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
21
	})->setName( 'aimeos_shop_jqadm_copy' );
22
23
	$this->map( ['GET', 'POST'], '/create/{resource:[a-z\/]+}', function( $request, $response, $args ) {
24
		return \Aimeos\Slim\Controller\Jqadm::createAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
25
	})->setName( 'aimeos_shop_jqadm_create' );
26
27
	$this->map( ['GET', 'POST'], '/delete/{resource:[a-z\/]+}[/{id}]', function( $request, $response, $args ) {
28
		return \Aimeos\Slim\Controller\Jqadm::deleteAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
29
	})->setName( 'aimeos_shop_jqadm_delete' );
30
31
	$this->map( ['GET', 'POST'], '/export/{resource:[a-z\/]+}', function( $request, $response, $args ) {
32
		return \Aimeos\Slim\Controller\Jqadm::exportAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
33
	})->setName( 'aimeos_shop_jqadm_export' );
34
35
	$this->map( ['GET'], '/get/{resource:[a-z\/]+}[/{id}]', function( $request, $response, $args ) {
36
		return \Aimeos\Slim\Controller\Jqadm::getAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
37
	})->setName( 'aimeos_shop_jqadm_get' );
38
39
	$this->map( ['POST'], '/save/{resource:[a-z\/]+}[/{id}]', function( $request, $response, $args ) {
40
		return \Aimeos\Slim\Controller\Jqadm::saveAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
41
	})->setName( 'aimeos_shop_jqadm_save' );
42
43
	$this->map( ['GET', 'POST'], '/search/{resource:[a-z\/]+}', function( $request, $response, $args ) {
44
		return \Aimeos\Slim\Controller\Jqadm::searchAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
45
	})->setName( 'aimeos_shop_jqadm_search' );
46
47
});
48
49
50
$app->group( $config( 'routes/jsonadm', '/admin/{site}/jsonadm' ), function() use ( $config ) {
0 ignored issues
show
The import $config is not used and could be removed.

This check looks for imports that have been defined, but are not used in the scope.

Loading history...
51
52
	$this->map( ['DELETE'], '/{resource:[a-z\/]+}[/{id}]', function( $request, $response, $args ) {
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
53
		return \Aimeos\Slim\Controller\Jsonadm::deleteAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
54
	})->setName( 'aimeos_shop_jsonadm_delete' );
55
56
	$this->map( ['GET'], '/{resource:[a-z\/]+}[/{id}]', function( $request, $response, $args ) {
57
		return \Aimeos\Slim\Controller\Jsonadm::getAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
58
	})->setName( 'aimeos_shop_jsonadm_get' );
59
60
	$this->map( ['PATCH'], '/{resource:[a-z\/]+}[/{id}]', function( $request, $response, $args ) {
61
		return \Aimeos\Slim\Controller\Jsonadm::patchAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
62
	})->setName( 'aimeos_shop_jsonadm_patch' );
63
64
	$this->map( ['POST'], '/{resource:[a-z\/]+}[/{id}]', function( $request, $response, $args ) {
65
		return \Aimeos\Slim\Controller\Jsonadm::postAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
66
	})->setName( 'aimeos_shop_jsonadm_post' );
67
68
	$this->map( ['PUT'], '/{resource:[a-z\/]+}[/{id}]', function( $request, $response, $args ) {
69
		return \Aimeos\Slim\Controller\Jsonadm::putAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
70
	})->setName( 'aimeos_shop_jsonadm_put' );
71
72
	$this->map( ['OPTIONS'], '/[{resource}]', function( $request, $response, $args ) {
73
		return \Aimeos\Slim\Controller\Jsonadm::optionsAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
74
	})->setName( 'aimeos_shop_jsonadm_options' );
75
76
});
77
78
79
$app->group( $config( 'routes/jsonapi', '/jsonapi' ), function() use ( $config ) {
0 ignored issues
show
The import $config is not used and could be removed.

This check looks for imports that have been defined, but are not used in the scope.

Loading history...
80
81
	$this->map( ['DELETE'], '/{resource}', function( $request, $response, $args ) {
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
82
		return \Aimeos\Slim\Controller\Jsonapi::deleteAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
83
	})->setName( 'aimeos_shop_jsonapi_delete' );
84
85
	$this->map( ['GET'], '/{resource}', function( $request, $response, $args ) {
86
		return \Aimeos\Slim\Controller\Jsonapi::getAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
87
	})->setName( 'aimeos_shop_jsonapi_get' );
88
89
	$this->map( ['PATCH'], '/{resource}', function( $request, $response, $args ) {
90
		return \Aimeos\Slim\Controller\Jsonapi::patchAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
91
	})->setName( 'aimeos_shop_jsonapi_patch' );
92
93
	$this->map( ['POST'], '/{resource}', function( $request, $response, $args ) {
94
		return \Aimeos\Slim\Controller\Jsonapi::postAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
95
	})->setName( 'aimeos_shop_jsonapi_post' );
96
97
	$this->map( ['PUT'], '/{resource}', function( $request, $response, $args ) {
98
		return \Aimeos\Slim\Controller\Jsonapi::putAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
99
	})->setName( 'aimeos_shop_jsonapi_put' );
100
101
	$this->map( ['OPTIONS'], '/[{resource}]', function( $request, $response, $args ) {
102
		return \Aimeos\Slim\Controller\Jsonapi::optionsAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
103
	})->setName( 'aimeos_shop_jsonapi_options' );
104
105
});
106
107
108
$app->group( $config( 'routes/account', '/profile' ), function() {
109
110
	$this->map( ['GET', 'POST'], '', function( $request, $response, $args ) {
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
111
		return \Aimeos\Slim\Controller\Account::indexAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
112
	})->setName( 'aimeos_shop_account' );
113
114
	$this->map( ['GET', 'POST'], '/favorite[/{fav_action}/{fav_id:[0-9]+}[/{d_name}]]', function( $request, $response, $args ) {
115
		return \Aimeos\Slim\Controller\Account::indexAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
116
	})->setName( 'aimeos_shop_account_favorite' );
117
118
	$this->map( ['GET', 'POST'], '/watch[/{wat_action}/{wat_id:[0-9]+}[/{d_name}]]', function( $request, $response, $args ) {
119
		return \Aimeos\Slim\Controller\Account::indexAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
120
	})->setName( 'aimeos_shop_account_watch' );
121
122
	$this->map( ['GET', 'POST'], '/download/{dl_id}', function( $request, $response, $args ) {
123
		return \Aimeos\Slim\Controller\Account::downloadAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
124
	})->setName( 'aimeos_shop_account_download' );
125
126
});
127
128
129
$app->group( $config( 'routes/default', '/shop' ), function() {
130
131
	$this->map( ['GET', 'POST'], '/count', function( $request, $response, $args ) {
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
132
		return \Aimeos\Slim\Controller\Catalog::countAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
133
	})->setName( 'aimeos_shop_count' );
134
135
	$this->map( ['GET', 'POST'], '/suggest', function( $request, $response, $args ) {
136
		return \Aimeos\Slim\Controller\Catalog::suggestAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
137
	})->setName( 'aimeos_shop_suggest' );
138
139
	$this->map( ['GET', 'POST'], '/stock', function( $request, $response, $args ) {
140
		return \Aimeos\Slim\Controller\Catalog::stockAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
141
	})->setName( 'aimeos_shop_stock' );
142
143
	$this->map( ['GET', 'POST'], '/basket', function( $request, $response, $args ) {
144
		return \Aimeos\Slim\Controller\Basket::indexAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
145
	})->setName( 'aimeos_shop_basket' );
146
147
	$this->map( ['GET', 'POST'], '/checkout[/{c_step}]', function( $request, $response, $args ) {
148
		return \Aimeos\Slim\Controller\Checkout::indexAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
149
	})->setName( 'aimeos_shop_checkout' );
150
151
	$this->map( ['GET', 'POST'], '/confirm[/{code}]', function( $request, $response, $args ) {
152
		return \Aimeos\Slim\Controller\Checkout::confirmAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
153
	})->setName( 'aimeos_shop_confirm' );
154
155
	$this->map( ['GET', 'POST'], '/pin[/{pin_action}/{pin_id}[/{d_name}]]', function( $request, $response, $args ) {
156
		return \Aimeos\Slim\Controller\Catalog::detailAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
157
	})->setName( 'aimeos_shop_session_pinned' );
158
159
	$this->map( ['GET', 'POST'], '/{f_name}~{f_catid}', function( $request, $response, $args ) {
160
		return \Aimeos\Slim\Controller\Catalog::treeAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
161
	})->setName( 'aimeos_shop_tree' );
162
163
	$this->map( ['GET', 'POST'], '/{d_name}[/{d_pos:[0-9]+}[/{d_prodid}]]', function( $request, $response, $args ) {
164
		return \Aimeos\Slim\Controller\Catalog::detailAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
165
	})->setName( 'aimeos_shop_detail' );
166
167
	$this->map( ['GET', 'POST'], '', function( $request, $response, $args ) {
168
		return \Aimeos\Slim\Controller\Catalog::listAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
169
	})->setName( 'aimeos_shop_list' );
170
171
});
172
173
174
$app->group( $config( 'routes/update', '' ), function() {
175
176
	$this->map( ['GET', 'POST'], '/update', function( $request, $response, $args ) {
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
177
		return \Aimeos\Slim\Controller\Checkout::updateAction( $this, $request, $response, $args );
0 ignored issues
show
Comprehensibility Best Practice introduced by
The variable $this seems to be never defined.
Loading history...
178
	})->setName( 'aimeos_shop_update' );
179
180
});
181
182
183
$app->map( ['GET', 'POST'], '/terms', function( $request, $response, $args ) {
184
	return 'terms';
185
})->setName( 'aimeos_shop_terms' );
186
187
$app->map( ['GET', 'POST'], '/privacy', function( $request, $response, $args ) {
188
	return 'privacy';
189
})->setName( 'aimeos_shop_privacy' );
190