Failed Conditions
Push — psr2 ( e6686e...5c2aad )
by Andreas
04:32
created

CallWriter::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace dokuwiki\Handler;
4
5
class CallWriter implements CallWriterInterface
6
{
7
8
    /** @var \Doku_Handler $Handler */
9
    protected $Handler;
10
11
    /**
12
     * @param \Doku_Handler $Handler
13
     */
14
    public function __construct(\Doku_Handler $Handler)
15
    {
16
        $this->Handler = $Handler;
17
    }
18
19
    /** @inheritdoc */
20
    public function writeCall($call)
21
    {
22
        $this->Handler->calls[] = $call;
23
    }
24
25
    /** @inheritdoc */
26
    public function writeCalls($calls)
27
    {
28
        $this->Handler->calls = array_merge($this->Handler->calls, $calls);
29
    }
30
31
    /**
32
     * @inheritdoc
33
     * function is required, but since this call writer is first/highest in
34
     * the chain it is not required to do anything
35
     */
36
    public function finalise()
37
    {
38
        unset($this->Handler);
39
    }
40
}
41