Completed
Push — master ( 9f49ce...6e65c6 )
by Zach
02:45 queued 40s
created

Logger   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 29
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 0

Importance

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

2 Methods

Rating   Name   Duplication   Size   Complexity  
A log() 0 4 1
A getLog() 0 4 1
1
<?php
2
3
namespace Yarak\Helpers;
4
5
trait Logger
6
{
7
    /**
8
     * Log of info/error messages.
9
     *
10
     * @var array
11
     */
12
    protected $log = [];
13
14
    /**
15
     * Log a message.
16
     *
17
     * @param string $message
18
     */
19
    public function log($message)
20
    {
21
        $this->log[] = $message;
22
    }
23
24
    /**
25
     * Return the object log.
26
     *
27
     * @return array
28
     */
29
    public function getLog()
30
    {
31
        return $this->log;
32
    }
33
}
34