for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* This file is part of the Zemit Framework.
*
* (c) Zemit Team <[email protected]>
* For the full copyright and license information, please view the LICENSE.txt
* file that was distributed with this source code.
*/
namespace Zemit\Mvc\Dispatcher;
use Zemit\Di\Injectable;
use Phalcon\Dispatcher\DispatcherInterface;
use Phalcon\Events\Event;
class Module extends Injectable
{
public function beforeForward(Event $event, DispatcherInterface $dispatcher, array $forward): void
$event
If this is a false-positive, you can also ignore this issue in your code via the ignore-unused annotation
ignore-unused
public function beforeForward(/** @scrutinizer ignore-unused */ Event $event, DispatcherInterface $dispatcher, array $forward): void
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.
if (!empty($forward['module'])) {
$dispatcher->setModuleName($forward['module']);
// @todo automatically add namepsace https://docs.phalcon.io/3.4/en/dispatcher#using-the-events-manager
}
This check looks for parameters that have been defined for a function or method, but which are not used in the method body.