1 | <?php |
||
13 | class InitStateMiddleware implements HTTPMiddleware |
||
14 | { |
||
15 | use Configurable; |
||
16 | |||
17 | /** |
||
18 | * URL paths that should be considered as admin only, i.e. not frontend |
||
19 | * |
||
20 | * @config |
||
21 | * @var array |
||
22 | */ |
||
23 | private static $admin_url_paths = [ |
||
|
|||
24 | 'dev/', |
||
25 | 'graphql/', |
||
26 | ]; |
||
27 | |||
28 | public function process(HTTPRequest $request, callable $delegate) |
||
40 | |||
41 | /** |
||
42 | * Determine whether the website is being viewed from an admin protected area or not |
||
43 | * |
||
44 | * @param HTTPRequest $request |
||
45 | * @return bool |
||
46 | */ |
||
47 | public function getIsAdmin(HTTPRequest $request) |
||
59 | |||
60 | /** |
||
61 | * Use the given request to detect the current subsite ID |
||
62 | * |
||
63 | * @param HTTPRequest $request |
||
64 | * @return int |
||
65 | */ |
||
66 | protected function detectSubsiteId(HTTPRequest $request) |
||
84 | } |
||
85 |
This check marks private properties in classes that are never used. Those properties can be removed.