EchoLogger   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 18
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 2
Bugs 0 Features 0
Metric Value
c 2
b 0
f 0
dl 0
loc 18
wmc 3
lcom 0
cbo 1
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A log() 0 12 3
1
<?php
2
3
namespace Arthem\GoogleApi\Infrastructure\Logger;
4
5
use Psr\Log\AbstractLogger;
6
7
class EchoLogger extends AbstractLogger
8
{
9
    /**
10
     * {@inheritdoc}
11
     */
12
    public function log($level, $message, array $context = [])
13
    {
14
        echo $message;
15
16
        if (!empty($context)) {
17
            echo ' [';
18
            foreach ($context as $key => $value) {
19
                echo sprintf('%s: %s', $key, $value);
20
            }
21
            echo ']';
22
        }
23
    }
24
}
25