for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Oc\Menu;
use Knp\Menu\FactoryInterface;
use Oc\Menu\Event\MenuEvent;
use Symfony\Component\EventDispatcher\EventDispatcherInterface;
class MenuBuilder
{
/**
* @var FactoryInterface
*/
private $factory;
* @var EventDispatcherInterface
private $eventDispatcher;
* @param FactoryInterface $factory
* @param EventDispatcherInterface $eventDispatcher
public function __construct(FactoryInterface $factory, EventDispatcherInterface $eventDispatcher)
$this->factory = $factory;
$this->eventDispatcher = $eventDispatcher;
}
public function createMainMenu(array $options)
$options
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.
$menu = $this->factory->createItem(MenuEnum::MENU_MAIN);
$this->eventDispatcher->dispatch(
MenuEnum::MENU_MAIN,
new MenuEvent($this->eventDispatcher, $this->factory, $menu, $menu)
);
return $menu;
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.