CommandController::execAction()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 9
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
dl 0
loc 9
c 0
b 0
f 0
ccs 0
cts 7
cp 0
rs 9.6666
cc 1
eloc 5
nc 1
nop 1
crap 2
1
<?php
2
/**
3
 * AnimeDb package.
4
 *
5
 * @author    Peter Gribanov <[email protected]>
6
 * @copyright Copyright (c) 2011, Peter Gribanov
7
 * @license   http://opensource.org/licenses/GPL-3.0 GPL v3
8
 */
9
namespace AnimeDb\Bundle\AppBundle\Controller;
10
11
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
12
use Symfony\Component\HttpFoundation\Request;
13
use Symfony\Component\HttpFoundation\Response;
14
15
class CommandController extends Controller
16
{
17
    /**
18
     * Execute command in background.
19
     *
20
     * @param Request $request
21
     *
22
     * @return Response
23
     */
24
    public function execAction(Request $request)
25
    {
26
        ignore_user_abort(true);
27
        set_time_limit(0);
28
29
        $this->get('anime_db.command')->execute($request->get('command'), 0);
30
31
        return new Response();
32
    }
33
}
34