Passed
Push — master ( b44114...bdd733 )
by Yaro
08:29
created

Readonly   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Test Coverage

Coverage 100%

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
c 1
b 0
f 0
dl 0
loc 14
ccs 5
cts 5
cp 1
rs 10
wmc 2
1
<?php
2
3
namespace Yaro\Jarboe\Table\Fields\Traits;
4
5
trait Readonly
0 ignored issues
show
Bug introduced by
A parse error occurred: Syntax error, unexpected T_READONLY, expecting T_STRING on line 5 at column 6
Loading history...
6
{
7
    protected $readonly = false;
8
9 17
    public function readonly(bool $isReadonly = true)
10
    {
11 17
        $this->readonly = $isReadonly;
12
13 17
        return $this;
14
    }
15
16 63
    public function isReadonly(): bool
17
    {
18 63
        return $this->readonly;
19
    }
20
}
21