LoggerTrait::log()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 2
eloc 2
nc 2
nop 3
1
<?php
2
/**
3
 * Created by PhpStorm.
4
 * User: Guillaume
5
 * Date: 28/02/2018
6
 * Time: 13:28
7
 */
8
9
namespace Starkerxp\DatabaseChecker;
10
11
12
use Psr\Log\LoggerAwareTrait;
13
14
trait LoggerTrait
15
{
16
    use LoggerAwareTrait;
17
    use \Psr\Log\LoggerTrait;
18
19
    public function log($level, $message, array $context = []): void
20
    {
21
        if ($this->logger) {
22
            $this->logger->log($level, $message, $context);
23
        }
24
    }
25
26
}
27