These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more
1 | <?php |
||
2 | |||
3 | /* |
||
4 | * This file is part of EC-CUBE |
||
5 | * |
||
6 | * Copyright(c) EC-CUBE CO.,LTD. All Rights Reserved. |
||
7 | * |
||
8 | * http://www.ec-cube.co.jp/ |
||
9 | * |
||
10 | * For the full copyright and license information, please view the LICENSE |
||
11 | * file that was distributed with this source code. |
||
12 | */ |
||
13 | |||
14 | namespace Eccube\Controller\Admin\Setting\System; |
||
15 | |||
16 | use Eccube\Common\Constant; |
||
17 | use Eccube\Service\SystemService; |
||
18 | use Symfony\Component\Routing\Annotation\Route; |
||
19 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Template; |
||
20 | use Symfony\Component\HttpFoundation\Request; |
||
21 | use Symfony\Component\HttpFoundation\Response; |
||
22 | |||
23 | class SystemController |
||
24 | { |
||
25 | /** |
||
26 | * @var SystemService |
||
27 | */ |
||
28 | protected $systemService; |
||
29 | |||
30 | /** |
||
31 | * SystemController constructor. |
||
32 | * |
||
33 | * @param SystemService $systemService |
||
34 | */ |
||
35 | 2 | public function __construct(SystemService $systemService) |
|
36 | { |
||
37 | 2 | $this->systemService = $systemService; |
|
38 | } |
||
39 | |||
40 | /** |
||
41 | * @Route("/%eccube_admin_route%/setting/system/system", name="admin_setting_system_system") |
||
42 | * @Template("@admin/Setting/System/system.twig") |
||
43 | */ |
||
44 | 2 | public function index(Request $request) |
|
45 | { |
||
46 | 2 | $info = []; |
|
47 | 2 | $info[] = ['title' => trans('admin.setting.system.system.eccube'), 'value' => Constant::VERSION]; |
|
48 | 2 | $info[] = ['title' => trans('admin.setting.system.system.server_os'), 'value' => php_uname()]; |
|
49 | 2 | $info[] = ['title' => trans('admin.setting.system.system.database_server'), 'value' => $this->systemService->getDbversion()]; |
|
50 | 2 | $info[] = ['title' => trans('admin.setting.system.system.web_server'), 'value' => $request->server->get('SERVER_SOFTWARE')]; |
|
51 | |||
52 | 2 | $value = phpversion().' ('.implode(', ', get_loaded_extensions()).')'; |
|
53 | 2 | $info[] = ['title' => trans('admin.setting.system.system.php'), 'value' => $value]; |
|
54 | 2 | $info[] = ['title' => trans('admin.setting.system.system.user_agent'), 'value' => $request->headers->get('User-Agent')]; |
|
55 | |||
56 | return [ |
||
57 | 2 | 'info' => $info, |
|
58 | ]; |
||
59 | } |
||
60 | |||
61 | /** |
||
62 | * @Route("/%eccube_admin_route%/setting/system/system/phpinfo", name="admin_setting_system_system_phpinfo") |
||
63 | */ |
||
64 | public function phpinfo(Request $request) |
||
0 ignored issues
–
show
|
|||
65 | { |
||
66 | ob_start(); |
||
67 | phpinfo(); |
||
68 | $phpinfo = ob_get_contents(); |
||
69 | ob_end_clean(); |
||
70 | |||
71 | return new Response($phpinfo); |
||
72 | } |
||
73 | } |
||
74 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.