Failed Conditions
Push — psr2 ( e6686e...5c2aad )
by Andreas
10:49 queued 04:36
created

CallWriter   A

Complexity

Total Complexity 4

Size/Duplication

Total Lines 36
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 36
rs 10
c 0
b 0
f 0
wmc 4
lcom 1
cbo 1

4 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A writeCall() 0 4 1
A writeCalls() 0 4 1
A finalise() 0 4 1
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