Passed
Push — master ( 1faa52...d67625 )
by Dispositif
05:49 queued 11s
created

SummaryLogTrait::getSummaryLog()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 3
rs 10
c 1
b 0
f 0
1
<?php
2
/**
3
 * This file is part of dispositif/wikibot application (@github)
4
 * 2019/2020 © Philippe M. <[email protected]>
5
 * For the full copyright and MIT license information, please view the license file.
6
 */
7
8
declare(strict_types=1);
9
10
11
namespace App\Domain;
12
13
/**
14
 * Refac to inject class ?
15
 * Trait SummaryLogTrait
16
 */
17
trait SummaryLogTrait
18
{
19
    protected $summaryLog = [];
20
21
    /**
22
     * @return array
23
     */
24
    public function getSummaryLog(): array
25
    {
26
        return $this->summaryLog;
27
    }
28
29
    /**
30
     * @param string $string
31
     */
32
    protected function addSummaryLog(string $string): void
33
    {
34
        if (!empty($string)) {
35
            $this->summaryLog[] = trim($string);
36
        }
37
    }
38
}
39