GitHub Access Token became invalid

It seems like the GitHub access token used for retrieving details about this repository from GitHub became invalid. This might prevent certain types of inspections from being run (in particular, everything related to pull requests).
Please ask an admin of your repository to re-new the access token on this website.

ProgramController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 22
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 3

Importance

Changes 0
Metric Value
wmc 1
lcom 1
cbo 3
dl 0
loc 22
rs 10
c 0
b 0
f 0

1 Method

Rating   Name   Duplication   Size   Complexity  
A teachingIndexAction() 0 16 1
1
<?php
2
/*
3
  ÁTICA - Aplicación web para la gestión documental de centros educativos
4
5
  Copyright (C) 2015-2016: Luis Ramón López López
6
7
  This program is free software: you can redistribute it and/or modify
8
  it under the terms of the GNU Affero General Public License as published by
9
  the Free Software Foundation, either version 3 of the License, or
10
  (at your option) any later version.
11
12
  This program is distributed in the hope that it will be useful,
13
  but WITHOUT ANY WARRANTY; without even the implied warranty of
14
  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
  GNU Affero General Public License for more details.
16
17
  You should have received a copy of the GNU Affero General Public License
18
  along with this program.  If not, see [http://www.gnu.org/licenses/].
19
*/
20
21
namespace AppBundle\Controller;
22
23
use Doctrine\ORM\EntityManager;
24
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
25
use Sensio\Bundle\FrameworkExtraBundle\Configuration\Security;
26
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
27
28
/**
29
 * @Route("/programa")
30
 * @Security("is_granted('ROLE_ADMIN')")
31
 */
32
class ProgramController extends Controller
33
{
34
    /**
35
     * @Route("", name="admin_program", methods={"GET"})
36
     */
37
    public function teachingIndexAction()
38
    {
39
        /** @var EntityManager $em */
40
        $em = $this->getDoctrine()->getManager();
41
42
        $teachingQuery = $em->createQuery('SELECT t FROM AppBundle:Training t ORDER BY t.name');
43
44
        $items = $teachingQuery->getResult();
45
46
        return $this->render('activity/training_index.html.twig',
47
            [
48
                'menu_item' => $this->get('app.menu_builders_chain')->getMenuItemByRouteName('admin_program'),
49
                'title' => null,
50
                'elements' => $items
51
            ]);
52
    }
53
}
54