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) |
||
53 | |||
54 | /** |
||
55 | * Determine whether the website is being viewed from an admin protected area or not |
||
56 | * |
||
57 | * @param HTTPRequest $request |
||
58 | * @return bool |
||
59 | */ |
||
60 | public function getIsAdmin(HTTPRequest $request) |
||
72 | |||
73 | /** |
||
74 | * Use the given request to detect the current subsite ID |
||
75 | * |
||
76 | * @param HTTPRequest $request |
||
77 | * @return int |
||
78 | */ |
||
79 | protected function detectSubsiteId(HTTPRequest $request) |
||
97 | } |
||
98 |
This check marks private properties in classes that are never used. Those properties can be removed.