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

Test1Service::init()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 3
rs 10
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