Passed
Push — master ( 317eaf...21e5db )
by Dāvis
03:10
created

ScriptController::lexikAction()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 1 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 1
b 1
f 0
1
<?php
2
3
namespace Sludio\HelperBundle\Script\Controller;
4
5
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
6
7
class ScriptController extends Controller
8
{
9
    use ControllerTrait;
10
11
    public function redisAction()
12
    {
13
        return $this->runApp('sludio:redis:flush');
14
    }
15
16
    public function cacheAction()
17
    {
18
        $commands = [
19
            'clear',
20
            'warmup',
21
        ];
22
        foreach ($commands as $command) {
23
            $this->runApp('cache:'.$command, ['--env' => $this->container->get('kernel')->getEnvironment()], false);
24
        }
25
26
        return $this->result();
27
    }
28
29
    public function lexikAction()
30
    {
31
        return $this->runApp('sludio:lexik:clear');
32
    }
33
34
    public function generateAction()
35
    {
36
        return $this->runApp('sludio:translations:generate');
37
    }
38
}
39