Test Failed
Push — master ( 72bd91...62e8aa )
by Julien
04:22
created

Module::beforeDispatchLoop()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 0
dl 0
loc 2
ccs 0
cts 1
cp 0
rs 10
c 1
b 0
f 0
cc 1
nc 1
nop 2
crap 2
1
<?php
2
3
/**
4
 * This file is part of the Zemit Framework.
5
 *
6
 * (c) Zemit Team <[email protected]>
7
 *
8
 * For the full copyright and license information, please view the LICENSE.txt
9
 * file that was distributed with this source code.
10
 */
11
12
namespace Zemit\Mvc\Dispatcher;
13
14
use Zemit\Di\Injectable;
15
use Phalcon\Dispatcher\DispatcherInterface;
16
use Phalcon\Events\Event;
17
18
class Module extends Injectable
19
{
20
    public function beforeForward(Event $event, DispatcherInterface $dispatcher, array $forward): void
1 ignored issue
show
Unused Code introduced by
The parameter $event is not used and could be removed. ( Ignorable by Annotation )

If this is a false-positive, you can also ignore this issue in your code via the ignore-unused  annotation

20
    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.

Loading history...
21
    {
22
        if (!empty($forward['module'])) {
23
            $dispatcher->setModuleName($forward['module']);
24
            // @todo automatically add namepsace https://docs.phalcon.io/3.4/en/dispatcher#using-the-events-manager
25
        }
26
    }
27
}
28