Test Failed
Pull Request — master (#103)
by Maximo
05:41
created

EventsManager::fireToQueue()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 6

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 2
eloc 1
c 1
b 0
f 1
nc 2
nop 4
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 6
rs 10
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Canvas;
6
7
use Phalcon\Traits\EventManagerAwareTrait;
8
9
/**
10
 * New event Manager to allow use to use fireToQueue.
11
 */
12
class EventsManager
13
{
14
    use EventManagerAwareTrait;
15
16
    /**
17
    * Checking if event manager is defined - fire event.
18
    *
19
    * @param string $event
20
    * @param object $source
21
    * @param mixed $data
22
    * @param boolean $cancelable
23
    *
24
    */
25
    public function fireToQueue($event, $source, $data = null, $cancelable = true)
0 ignored issues
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

25
    public function fireToQueue(/** @scrutinizer ignore-unused */ $event, $source, $data = null, $cancelable = true)

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...
Unused Code introduced by
The parameter $cancelable 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

25
    public function fireToQueue($event, $source, $data = null, /** @scrutinizer ignore-unused */ $cancelable = true)

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...
Unused Code introduced by
The parameter $data 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

25
    public function fireToQueue($event, $source, /** @scrutinizer ignore-unused */ $data = null, $cancelable = true)

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...
Unused Code introduced by
The parameter $source 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

25
    public function fireToQueue($event, /** @scrutinizer ignore-unused */ $source, $data = null, $cancelable = true)

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...
26
    {
27
        if ($manager = $this->getEventsManager()) {
0 ignored issues
show
Unused Code introduced by
The assignment to $manager is dead and can be removed.
Loading history...
28
            /**
29
             * @todo add the the event manager to send to queue
30
             */
31
        }
32
    }
33
}
34