Observer   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 9
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 2
eloc 1
c 1
b 0
f 0
dl 0
loc 9
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A update() 0 2 1
A reportError() 0 2 1
1
<?php
2
/**
3
 * @author: jiangyi
4
 * @date: 下午5:26 2018/11/28
5
 */
6
7
namespace Hello;
8
9
class Observer
10
{
11
    public function update($argument)
0 ignored issues
show
Unused Code introduced by
The parameter $argument 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

11
    public function update(/** @scrutinizer ignore-unused */ $argument)

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...
12
    {
13
        // 做点什么。
14
    }
15
16
    public function reportError($errorCode, $errorMessage, Subject $subject)
0 ignored issues
show
Unused Code introduced by
The parameter $errorMessage 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

16
    public function reportError($errorCode, /** @scrutinizer ignore-unused */ $errorMessage, Subject $subject)

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 $errorCode 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

16
    public function reportError(/** @scrutinizer ignore-unused */ $errorCode, $errorMessage, Subject $subject)

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 $subject 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

16
    public function reportError($errorCode, $errorMessage, /** @scrutinizer ignore-unused */ Subject $subject)

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...
17
    {
18
        // 做点什么。
19
    }
20
}
21