Completed
Push — master ( b3febe...348067 )
by Zach
04:06 queued 02:03
created

Loggable::log()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 1
dl 0
loc 4
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace Yarak\Helpers;
4
5
trait Loggable
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
    protected 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