Completed
Branch master (389090)
by Ryuichi
04:54 queued 02:16
created

Annotation.php$0 ➔ __construct()   A

Complexity

Conditions 1

Size

Total Lines 4

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
namespace WebStream\Annotation\Base;
3
4
use WebStream\DI\Injector;
5
6
/**
7
 * Annotaion
8
 * @author Ryuichi TANAKA.
9
 * @since 2014/05/11
10
 * @version 0.7
11
 */
12
abstract class Annotation
13
{
14
    use Injector;
15
16
    /**
17
     * @var Psr\Log\LoggerInterface
18
     */
19
    protected $logger;
20
21
    /**
22
     * constructor
23
     * @param array<string> アノテーションリスト
24
     */
25
    public function __construct(array $annotations = [])
26
    {
27
        $this->logger = new class() { function __call($name, $args) {} };
0 ignored issues
show
Documentation Bug introduced by
It seems like new class { function...e, $args) { } } of type object<WebStream\Annotat.../Base/Annotation.php$0> is incompatible with the declared type object<WebStream\Annotat...sr\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...
28 137
        $this->onInject($annotations);
29 137
    }
30
31
    /**
32
     * Injected event
33
     * @param array<string> アノテーションコンテナ
34
     */
35
    abstract public function onInject(array $annotations);
36
}
37