ArrayLogger   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 25
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 25
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A getMessages() 0 4 1
A log() 0 4 1
1
<?php
2
3
namespace RDV\Bundle\MigrationBundle\Migration;
4
5
use Psr\Log\AbstractLogger;
6
7
class ArrayLogger extends AbstractLogger
8
{
9
    /**
10
     * @var string[]
11
     */
12
    protected $message = [];
13
14
    /**
15
     * Returns logged messages
16
     *
17
     * @return string[]
18
     */
19
    public function getMessages()
20
    {
21
        return $this->message;
22
    }
23
24
    /**
25
     * {@inheritdoc}
26
     */
27
    public function log($level, $message, array $context = array())
28
    {
29
        $this->message[] = $message;
30
    }
31
}
32