Passed
Push — master ( a624d4...6f2d98 )
by Alexander
01:22
created

AbstractProviderConfigurator::detach()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 1
c 1
b 0
f 0
nc 1
nop 1
dl 0
loc 3
cc 1
rs 10
ccs 0
cts 2
cp 0
crap 2
1
<?php
2
3
namespace Yiisoft\EventDispatcher\Provider;
4
5
abstract class AbstractProviderConfigurator
6
{
7
    protected function attach(callable $listener, string $eventClassName = ''): void
0 ignored issues
show
Unused Code introduced by
The parameter $listener 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

7
    protected function attach(/** @scrutinizer ignore-unused */ callable $listener, string $eventClassName = ''): 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...
Unused Code introduced by
The parameter $eventClassName 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

7
    protected function attach(callable $listener, /** @scrutinizer ignore-unused */ string $eventClassName = ''): 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...
8
    {
9
        throw new \RuntimeException("Method 'attach' does not exist.");
10
    }
11
12
    protected function detach(string $eventClassName): void
0 ignored issues
show
Unused Code introduced by
The parameter $eventClassName 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

12
    protected function detach(/** @scrutinizer ignore-unused */ string $eventClassName): 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...
13
    {
14
        throw new \RuntimeException("Method 'detach' does not exist.");
15
    }
16
}
17