AbstractHandler::allowOutput()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 0
Metric Value
dl 0
loc 4
c 0
b 0
f 0
ccs 3
cts 3
cp 1
rs 10
cc 1
eloc 2
nc 1
nop 0
crap 1
1
<?php
2
namespace Subreality\Dilmun\Nabu\LoggerHandler;
3
4
/**
5
 * Class AbstractHandler
6
 * @package Subreality\Dilmun\Nabu\LoggerHandler
7
 */
8
abstract class AbstractHandler implements HandlerInterface
9
{
10
    protected $output_allowed = true;
11
12
    /**
13
     * @return bool
14
     */
15
    abstract public function initialize();
16
17
    /**
18
     * @param string $message
19
     * @return bool
20
     */
21
    abstract public function write($message);
22
23
    /**
24
     * @return void
25
     */
26 2
    public function allowOutput()
27
    {
28 2
        $this->output_allowed = true;
29 2
    }
30
31
    /**
32
     * @return void
33
     */
34 4
    public function suppressOutput()
35
    {
36 4
        $this->output_allowed = false;
37 4
    }
38
}
39