Passed
Push — feature/0.7.0 ( b4ac8e...ca90d0 )
by Ryuichi
43:26
created

Test1Service   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 21
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 21
rs 10
wmc 3

3 Methods

Rating   Name   Duplication   Size   Complexity  
A test1() 0 3 1
A init() 0 3 1
A error() 0 3 1
1
<?php
2
namespace WebStream\Test\Service;
3
4
use WebStream\Core\CoreService;
5
use WebStream\Annotation\Attributes\ExceptionHandler;
6
use WebStream\Annotation\Attributes\Filter;
7
8
class Test1Service extends CoreService
9
{
10
    /**
11
     * @Filter(type="before")
12
     */
13
    public function init()
14
    {
15
        echo "init";
16
    }
17
18
    public function test1()
19
    {
20
        $this->Test1->test1();
0 ignored issues
show
Bug Best Practice introduced by
The property Test1 does not exist on WebStream\Test\Service\Test1Service. Since you implemented __get, consider adding a @property annotation.
Loading history...
Bug introduced by
The method test1() does not exist on null. ( Ignorable by Annotation )

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

20
        $this->Test1->/** @scrutinizer ignore-call */ 
21
                      test1();

This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.

This is most likely a typographical error or the method has been renamed.

Loading history...
21
    }
22
23
    /**
24
     * @ExceptionHandler("\Exception")
25
     */
26
    public function error()
27
    {
28
        echo "error";
29
    }
30
}
31