AbstractDriver::prepare()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 1
Code Lines 0

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 0
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 1
rs 10
1
<?php 
2
3
namespace Yaro\LogEnvelope\Drivers;
4
5
abstract class AbstractDriver
6
{
7
    
8
    protected $config = [];
9
    protected $data   = [];
10
    
11
    public function __construct($data)
12
    {
13
        $this->data = $data;
14
    } // end __construct
15
    
16
    public function setConfig($config)
17
    {
18
        $this->config = $config;
19
        $this->prepare();
20
        
21
        return $this;
22
    } // end setConfig
23
    
24
    protected function prepare() {} // end prepare
25
    
26
    protected function isEnabled()
27
    {
28
        return isset($this->config['enabled']) && $this->config['enabled'];
29
    } // end isEnabled
30
    
31
    abstract public function send();
32
    
33
    abstract protected function check();
34
    
35
}
36