Passed
Push — master ( ab8dec...906584 )
by Julito
09:36
created

ToolController::profileAction()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 5
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 5
rs 10
1
<?php
2
3
/* For licensing terms, see /license.txt */
4
5
namespace Chamilo\CoreBundle\Controller;
6
7
use Chamilo\CoreBundle\ToolChain;
8
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
9
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
10
use Symfony\Component\HttpFoundation\Response;
11
use Symfony\Component\Routing\Annotation\Route;
12
13
/**
14
 * @Route("/tool")
15
 */
16
class ToolController extends AbstractController
17
{
18
    /**
19
     * Updates the table tool and resource_type with the content of tools.yml.
20
     *
21
     * @Security("has_role('ROLE_ADMIN')")
22
     * @Route("/update", methods={"GET"})
23
     */
24
    public function profileAction(ToolChain $toolChain)
25
    {
26
        $toolChain->createTools();
27
28
        return new Response('Updated');
29
    }
30
}
31