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.
Completed
Push — master ( f019a9...6afc29 )
by Christian
14:27
created

BackendController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 23
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 4

Importance

Changes 3
Bugs 0 Features 1
Metric Value
wmc 2
c 3
b 0
f 1
lcom 0
cbo 4
dl 0
loc 23
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A shariffAction() 0 7 1
A getBackendManager() 0 4 1
1
<?php
2
3
/*
4
 * This file is part of the ni-ju-san CMS.
5
 *
6
 * (c) Christian Gripp <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Core23\ShariffBundle\Controller;
13
14
use Heise\Shariff\Backend\BackendManager;
15
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
16
use Symfony\Component\HttpFoundation\JsonResponse;
17
use Symfony\Component\HttpFoundation\Request;
18
19
class BackendController extends Controller
20
{
21
    /**
22
     * @param Request $request
23
     *
24
     * @return JsonResponse
25
     */
26
    public function shariffAction(Request $request)
27
    {
28
        $url    = $request->get('url');
29
        $result = $this->getBackendManager()->get($url);
30
31
        return new JsonResponse($result);
32
    }
33
34
    /**
35
     * @return BackendManager
36
     */
37
    private function getBackendManager()
38
    {
39
        return $this->get('core23.shariff.backend.manager');
40
    }
41
}
42