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 ( 008174...413772 )
by Bruno
20:15
created

Bundle/YumlBundle/Controller/YumlController.php (1 issue)

Severity

Upgrade to new PHP Analysis Engine

These results are based on our legacy PHP analysis, consider migrating to our new PHP analysis engine instead. Learn more

1
<?php
2
3
namespace Onurb\Bundle\YumlBundle\Controller;
4
5
use Onurb\Bundle\YumlBundle\Yuml\YumlClient;
6
use Onurb\Bundle\YumlBundle\Yuml\YumlClientInterface;
7
use Symfony\Bridge\Doctrine\RegistryInterface;
8
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
9
10
/**
11
 * Utility to generate Yuml compatible strings from metadata graphs
12
 * Adaptation of DoctrineORMModule\Yuml\YumlController for ZendFramework-Zend-Developer-Tools
13
 *
14
 * @license MIT
15
 * @link    http://www.doctrine-project.org/
16
 * @author  Bruno Heron <[email protected]>
17
 * @author  Marco Pivetta <[email protected]>
18
 */
19
class YumlController extends Controller
20
{
21
    /**
22
     * @param YumlClientInterface|null $yumlClient
23
     * @return \Symfony\Component\HttpFoundation\RedirectResponse
24
     */
25 1
    public function indexAction(YumlClientInterface $yumlClient = null)
26
    {
27 1
        $yumlClient = $yumlClient ? $yumlClient : new YumlClient($this->getDoctrine()->getManager());
0 ignored issues
show
$this->getDoctrine()->getManager() of type object<Doctrine\Common\Persistence\ObjectManager> is not a sub-type of object<Doctrine\ORM\EntityManagerInterface>. It seems like you assume a child interface of the interface Doctrine\Common\Persistence\ObjectManager to be always present.

This check looks for parameters that are defined as one type in their type hint or doc comment but seem to be used as a narrower type, i.e an implementation of an interface or a subclass.

Consider changing the type of the parameter or doing an instanceof check before assuming your parameter is of the expected type.

Loading history...
28
29 1
        $showDetailParam    = $this->container->getParameter('onurb_yuml.show_fields_description');
30 1
        $colorsParam        = $this->container->getParameter('onurb_yuml.colors');
31 1
        $notesParam         = $this->container->getParameter('onurb_yuml.notes');
32
33 1
        return $this->redirect(
34 1
            $yumlClient->getGraphUrl(
35 1
                $yumlClient->makeDslText($showDetailParam, $colorsParam, $notesParam)
36
            )
37
        );
38
    }
39
}
40