Passed
Push — master ( 01670e...58eefd )
by Ryuichi
29:01 queued 26:56
created

Annotation.php$0 ➔ __construct()   A

Complexity

Conditions 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
c 0
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
crap 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A Annotation.php$0 ➔ __call() 0 1 1
1
<?php
2
3
namespace WebStream\Annotation\Base;
4
5
use WebStream\DI\Injector;
0 ignored issues
show
Bug introduced by
The type WebStream\DI\Injector was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
6
7
/**
8
 * Annotaion
9
 * @author Ryuichi TANAKA.
10
 * @since 2014/05/11
11
 * @version 0.7
12
 */
13
abstract class Annotation
14
{
15
    use Injector;
16
17
    /**
18
     * @var Psr\Log\LoggerInterface
0 ignored issues
show
Bug introduced by
The type WebStream\Annotation\Base\Psr\Log\LoggerInterface was not found. Maybe you did not declare it correctly or list all dependencies?

The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g. excluded_paths: ["lib/*"], you can move it to the dependency path list as follows:

filter:
    dependency_paths: ["lib/*"]

For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths

Loading history...
19
     */
20
    protected $logger;
21
22
    /**
23
     * constructor
24
     * @param array $annotations
25
     */
26 148
    public function __construct(array $annotations = [])
27
    {
28 148
        $this->logger = new class () { public function __call($name, $args) {} };
0 ignored issues
show
Coding Style introduced by
Closing brace must not be followed by any comment or statement on the same line
Loading history...
Coding Style introduced by
The closing brace for the class must go on the next line after the body
Loading history...
Documentation Bug introduced by
It seems like new ClassNode() of type anonymous//Base/Annotation.php$0 is incompatible with the declared type WebStream\Annotation\Base\Psr\Log\LoggerInterface of property $logger.

Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.

Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..

Loading history...
29 148
        $this->onInject($annotations);
30
    }
31
32
    /**
33
     * Injected event
34
     * @param array $annotations
35
     */
36
    abstract public function onInject(array $annotations);
37
}
38