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 ( 4edf76...a91441 )
by Bruno
21:43
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\Bundle\FrameworkBundle\Controller\Controller;
8
9
/**
10
 * Utility to generate Yuml compatible strings from metadata graphs
11
 * Adaptation of DoctrineORMModule\Yuml\YumlController for ZendFramework-Zend-Developer-Tools
12
 *
13
 * @license MIT
14
 * @link    http://www.doctrine-project.org/
15
 * @author  Bruno Heron <[email protected]>
16
 * @author  Marco Pivetta <[email protected]>
17
 */
18
class YumlController extends Controller
19
{
20
    /**
21
     * @param YumlClientInterface|null $yumlClient
22
     * @return \Symfony\Component\HttpFoundation\RedirectResponse
23
     */
24 1
    public function indexAction(YumlClientInterface $yumlClient = null)
25
    {
26 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...
27
28 1
        $showDetailParam    = $this->container->getParameter('onurb_yuml.show_fields_description');
29 1
        $colorsParam        = $this->container->getParameter('onurb_yuml.colors');
30 1
        $notesParam         = $this->container->getParameter('onurb_yuml.notes');
31
32 1
        return $this->redirect(
33 1
            $yumlClient->getGraphUrl(
34 1
                $yumlClient->makeDslText($showDetailParam, $colorsParam, $notesParam)
35
            )
36
        );
37
    }
38
}
39