GetsSetsPrint::print()   A
last analyzed

Complexity

Conditions 2
Paths 2

Size

Total Lines 9
Code Lines 4

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 0
Metric Value
cc 2
eloc 4
nc 2
nop 1
dl 0
loc 9
ccs 4
cts 4
cp 1
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
declare(strict_types=1);
4
5
namespace Conia\Quma;
6
7
trait GetsSetsPrint
8
{
9
    protected bool $print;
10
11 71
    public function print(bool $print = false): bool
12
    {
13
        // Normally this is bad practise but setting print should
14
        // only be used for debugging purposes
15 71
        if (func_num_args() > 0) {
16 4
            $this->print = $print;
17
        }
18
19 71
        return $this->print;
20
    }
21
}
22