GSCPSettersTrait::setFilename()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 3
CRAP Score 1

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
ccs 3
cts 3
cp 1
rs 10
cc 1
nc 1
nop 1
crap 1
1
<?php
2
namespace GSCP;
3
4
trait GSCPSettersTrait
5
{
6
    /**
7
     * @param string $filename
8
     * @return self
9
     */
10 3
    public function setFilename(string $filename): self
11
    {
12 3
        $this->filename = $filename;
0 ignored issues
show
Bug Best Practice introduced by
The property filename does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
13 3
        return $this;
14
    }
15
16
    /**
17
     * @param string $locale
18
     * @return self
19
     */
20 2
    public function setLocale(string $locale): self
21
    {
22 2
        $this->locale = str_replace('_', '-', $locale);
0 ignored issues
show
Bug Best Practice introduced by
The property locale does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
23 2
        return $this;
24
    }
25
26
    /**
27
     * @param array $columns
28
     * @return self
29
     */
30 1
    public function setColumns(array $columns): self
31
    {
32 1
        $this->columns = $columns;
0 ignored issues
show
Bug Best Practice introduced by
The property columns does not exist. Although not strictly required by PHP, it is generally a best practice to declare properties explicitly.
Loading history...
33 1
        return $this;
34
    }
35
}