Runtime   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 27
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 1

Test Coverage

Coverage 100%

Importance

Changes 0
Metric Value
wmc 2
lcom 1
cbo 1
dl 0
loc 27
c 0
b 0
f 0
ccs 5
cts 5
cp 1
rs 10

2 Methods

Rating   Name   Duplication   Size   Complexity  
A write() 0 4 1
A getItems() 0 4 1
1
<?php
2
3
/**
4
 * This file is part of the Apix Project.
5
 *
6
 * (c) Franck Cassedanne <franck at ouarz.net>
7
 *
8
 * @license http://opensource.org/licenses/BSD-3-Clause  New BSD License
9
 */
10
11
namespace Apix\Log\Logger;
12
13
use Apix\Log\LogEntry;
14
15
/**
16
 * Runtime (Array/ArrayObject) log wrapper.
17
 *
18
 * @author Franck Cassedanne <franck at ouarz.net>
19
 */
20
class Runtime extends AbstractLogger implements LoggerInterface
21
{
22
    /**
23
     * Holds the logged items.
24
     * @var array
25
     */
26
    protected $items = array();
27
28
    /**
29
     * {@inheritDoc}
30
     */
31 196
    public function write(LogEntry $log)
32
    {
33 196
        $this->items[] = (string) $log;
34 49
    }
35
36
    /**
37
     * Returns the logged items.
38
     *
39
     * @return array
40
     */
41 188
    public function getItems()
42
    {
43 188
        return $this->items;
44
    }
45
46
}
47