Completed
Push — master ( f71d4e...c66cbf )
by
unknown
08:22 queued 01:15
created

web/app_dev.php (1 issue)

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
use Symfony\Component\HttpFoundation\Request;
4
use Symfony\Component\Debug\Debug;
5
6
// If you don't want to setup permissions the proper way, just uncomment the following PHP line
7
// read http://symfony.com/doc/current/book/installation.html#configuration-and-setup for more information
8
//umask(0000);
9
10
// This check prevents access to debug front controllers that are deployed by accident to production servers.
0 ignored issues
show
Unused Code Comprehensibility introduced by
47% 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.

Loading history...
11
// Feel free to remove this, extend it, or make something more sophisticated.
12
/*if (isset($_SERVER['HTTP_CLIENT_IP'])
13
    || (isset($_SERVER['HTTP_X_FORWARDED_FOR']) && !in_array(@$_SERVER['HTTP_X_FORWARDED_FOR'], array('10.0.50.79')))
14
    || !in_array(@$_SERVER['REMOTE_ADDR'], array('127.0.0.1', 'fe80::1', '::1'))
15
) {
16
    header('HTTP/1.0 403 Forbidden');
17
    exit('You are not allowed to access this file. Check '.basename(__FILE__).' for more information.');
18
}*/
19
20
$loader = require_once __DIR__.'/../app/autoload.php';
21
Debug::enable();
22
23
$kernel = new AppKernel('dev', true);
24
$kernel->loadClassCache();
25
$request = Request::createFromGlobals();
26
$response = $kernel->handle($request);
27
$response->send();
28
$kernel->terminate($request, $response);
29