This project does not seem to handle request data directly as such no vulnerable execution paths were found.
include
, or for example
via PHP's auto-loading mechanism.
These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | /** |
||
3 | * Hummingbird Anime Client |
||
4 | * |
||
5 | * An API client for Hummingbird to manage anime and manga watch lists |
||
6 | * |
||
7 | * PHP version 5.6 |
||
8 | * |
||
9 | * @package HummingbirdAnimeClient |
||
10 | * @author Timothy J. Warren <[email protected]> |
||
11 | * @copyright 2015 - 2016 Timothy J. Warren |
||
12 | * @license http://www.opensource.org/licenses/mit-license.html MIT License |
||
13 | * @version 3.1 |
||
14 | * @link https://github.com/timw4mail/HummingBirdAnimeClient |
||
15 | */ |
||
16 | |||
17 | use const Aviat\AnimeClient\{ |
||
18 | DEFAULT_CONTROLLER_METHOD, |
||
19 | DEFAULT_CONTROLLER_NAMESPACE |
||
20 | }; |
||
21 | |||
22 | use Aviat\AnimeClient\AnimeClient; |
||
23 | |||
24 | return [ |
||
25 | // ------------------------------------------------------------------------- |
||
26 | // Routing options |
||
27 | // |
||
28 | // Specify default paths and views |
||
29 | // ------------------------------------------------------------------------- |
||
30 | 'route_config' => [ |
||
31 | // Path to public directory, where images/css/javascript are located, |
||
32 | // appended to the url |
||
33 | 'asset_path' => '/public', |
||
34 | |||
35 | // Which list should be the default? |
||
36 | 'default_list' => 'anime', // anime or manga |
||
37 | |||
38 | // Default pages for anime/manga |
||
39 | 'default_anime_list_path' => "watching", // watching|plan_to_watch|on_hold|dropped|completed|all |
||
0 ignored issues
–
show
|
|||
40 | 'default_manga_list_path' => "reading", // reading|plan_to_read|on_hold|dropped|completed|all |
||
0 ignored issues
–
show
Unused Code
Comprehensibility
introduced
by
42% of this comment could be valid code. Did you maybe forget this after debugging?
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it. The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production. This check looks for comments that seem to be mostly valid code and reports them. ![]() |
|||
41 | |||
42 | // Default view type (cover_view/list_view) |
||
43 | 'default_view_type' => 'cover_view', |
||
44 | ], |
||
45 | // ------------------------------------------------------------------------- |
||
46 | // Routing Config |
||
47 | // |
||
48 | // Maps paths to controlers and methods |
||
49 | // ------------------------------------------------------------------------- |
||
50 | 'routes' => [ |
||
51 | // --------------------------------------------------------------------- |
||
52 | // Anime List Routes |
||
53 | // --------------------------------------------------------------------- |
||
54 | 'anime.add.get' => [ |
||
55 | 'path' => '/anime/add', |
||
56 | 'action' => 'add_form', |
||
57 | 'verb' => 'get', |
||
58 | ], |
||
59 | 'anime.add.post' => [ |
||
60 | 'path' => '/anime/add', |
||
61 | 'action' => 'add', |
||
62 | 'verb' => 'post', |
||
63 | ], |
||
64 | 'anime.details' => [ |
||
65 | 'path' => '/anime/details/{id}', |
||
66 | 'action' => 'details', |
||
67 | 'tokens' => [ |
||
68 | 'id' => '[a-z0-9\-]+', |
||
69 | ], |
||
70 | ], |
||
71 | 'anime.delete' => [ |
||
72 | 'path' => '/anime/delete', |
||
73 | 'action' => 'delete', |
||
74 | 'verb' => 'post', |
||
75 | ], |
||
76 | // --------------------------------------------------------------------- |
||
77 | // Manga Routes |
||
78 | // --------------------------------------------------------------------- |
||
79 | 'manga.search' => [ |
||
80 | 'path' => '/manga/search', |
||
81 | 'action' => 'search', |
||
82 | ], |
||
83 | 'manga.add.get' => [ |
||
84 | 'path' => '/manga/add', |
||
85 | 'action' => 'add_form', |
||
86 | 'verb' => 'get', |
||
87 | ], |
||
88 | 'manga.add.post' => [ |
||
89 | 'path' => '/manga/add', |
||
90 | 'action' => 'add', |
||
91 | 'verb' => 'post', |
||
92 | ], |
||
93 | 'manga.delete' => [ |
||
94 | 'path' => '/manga/delete', |
||
95 | 'action' => 'delete', |
||
96 | 'verb' => 'post', |
||
97 | ], |
||
98 | 'manga.details' => [ |
||
99 | 'path' => '/manga/details/{id}', |
||
100 | 'action' => 'details', |
||
101 | 'tokens' => [ |
||
102 | 'id' => '[a-z0-9\-]+', |
||
103 | ], |
||
104 | ], |
||
105 | // --------------------------------------------------------------------- |
||
106 | // Anime Collection Routes |
||
107 | // --------------------------------------------------------------------- |
||
108 | 'collection.search' => [ |
||
109 | 'path' => '/collection/search', |
||
110 | 'action' => 'search', |
||
111 | ], |
||
112 | 'collection.add.get' => [ |
||
113 | 'path' => '/collection/add', |
||
114 | 'action' => 'form', |
||
115 | 'params' => [], |
||
116 | ], |
||
117 | 'collection.edit.get' => [ |
||
118 | 'path' => '/collection/edit/{id}', |
||
119 | 'action' => 'form', |
||
120 | 'tokens' => [ |
||
121 | 'id' => '[0-9]+', |
||
122 | ], |
||
123 | ], |
||
124 | 'collection.add.post' => [ |
||
125 | 'path' => '/collection/add', |
||
126 | 'action' => 'add', |
||
127 | 'verb' => 'post', |
||
128 | ], |
||
129 | 'collection.edit.post' => [ |
||
130 | 'path' => '/collection/edit', |
||
131 | 'action' => 'edit', |
||
132 | 'verb' => 'post', |
||
133 | ], |
||
134 | 'collection.view' => [ |
||
135 | 'path' => '/collection/view{/view}', |
||
136 | 'action' => 'index', |
||
137 | 'params' => [], |
||
138 | 'tokens' => [ |
||
139 | 'view' => '[a-z_]+', |
||
140 | ], |
||
141 | ], |
||
142 | 'collection.delete' => [ |
||
143 | 'path' => '/collection/delete', |
||
144 | 'action' => 'delete', |
||
145 | 'verb' => 'post', |
||
146 | ], |
||
147 | // --------------------------------------------------------------------- |
||
148 | // Manga Collection Routes |
||
149 | // --------------------------------------------------------------------- |
||
150 | // --------------------------------------------------------------------- |
||
151 | // Default / Shared routes |
||
152 | // --------------------------------------------------------------------- |
||
153 | 'cache_purge' => [ |
||
154 | 'path' => '/cache_purge', |
||
155 | 'action' => 'clearCache', |
||
156 | 'controller' => DEFAULT_CONTROLLER_NAMESPACE, |
||
157 | 'verb' => 'get', |
||
158 | ], |
||
159 | 'login' => [ |
||
160 | 'path' => '/login', |
||
161 | 'action' => 'login', |
||
162 | 'controller' => DEFAULT_CONTROLLER_NAMESPACE, |
||
163 | 'verb' => 'get', |
||
164 | ], |
||
165 | 'login.post' => [ |
||
166 | 'path' => '/login', |
||
167 | 'action' => 'loginAction', |
||
168 | 'controller' => DEFAULT_CONTROLLER_NAMESPACE, |
||
169 | 'verb' => 'post', |
||
170 | ], |
||
171 | 'logout' => [ |
||
172 | 'path' => '/logout', |
||
173 | 'action' => 'logout', |
||
174 | 'controller' => DEFAULT_CONTROLLER_NAMESPACE, |
||
175 | ], |
||
176 | 'update' => [ |
||
177 | 'path' => '/{controller}/update', |
||
178 | 'action' => 'update', |
||
179 | 'verb' => 'post', |
||
180 | 'tokens' => [ |
||
181 | 'controller' => '[a-z_]+', |
||
182 | ], |
||
183 | ], |
||
184 | 'update.post' => [ |
||
185 | 'path' => '/{controller}/update_form', |
||
186 | 'action' => 'form_update', |
||
187 | 'verb' => 'post', |
||
188 | 'tokens' => [ |
||
189 | 'controller' => '[a-z_]+', |
||
190 | ], |
||
191 | ], |
||
192 | 'edit' => [ |
||
193 | 'path' => '/{controller}/edit/{id}/{status}', |
||
194 | 'action' => 'edit', |
||
195 | 'tokens' => [ |
||
196 | 'id' => '[0-9a-z_]+', |
||
197 | 'status' => '([a-zA-Z\-_]|%20)+', |
||
198 | ], |
||
199 | ], |
||
200 | 'list' => [ |
||
201 | 'path' => '/{controller}/{type}{/view}', |
||
202 | 'action' => DEFAULT_CONTROLLER_METHOD, |
||
203 | 'tokens' => [ |
||
204 | 'type' => '[a-z_]+', |
||
205 | 'view' => '[a-z_]+', |
||
206 | ], |
||
207 | ], |
||
208 | 'index_redirect' => [ |
||
209 | 'path' => '/', |
||
210 | 'controller' => DEFAULT_CONTROLLER_NAMESPACE, |
||
211 | 'action' => 'redirectToDefaultRoute', |
||
212 | ], |
||
213 | ], |
||
214 | ]; |
Sometimes obsolete code just ends up commented out instead of removed. In this case it is better to remove the code once you have checked you do not need it.
The code might also have been commented out for debugging purposes. In this case it is vital that someone uncomments it again or your project may behave in very unexpected ways in production.
This check looks for comments that seem to be mostly valid code and reports them.