Passed
Push — feature/0.7.0 ( f8dc8d...75a66b )
by Ryuichi
42:58
created

Test1Service   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 15
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
dl 0
loc 15
rs 10
c 0
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A test1() 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\Util\PropertyProxy;
7
8
class Test1Service extends CoreService
9
{
10
    use PropertyProxy;
11
12
    public function test1()
13
    {
14
        $this->result = $this->Test1->test1();
0 ignored issues
show
Bug Best Practice introduced by
The property result does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
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

14
        /** @scrutinizer ignore-call */ 
15
        $this->result = $this->Test1->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...
15
    }
16
17
    /**
18
     * @ExceptionHandler("\Exception")
19
     */
20
    public function error()
21
    {
22
        echo "error";
23
    }
24
}
25