Conditions | 1 |
Paths | 1 |
Total Lines | 17 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
1 | <?php |
||
15 | public function setData($data) |
||
16 | { |
||
17 | $fullClassName = $this->composer->getClassNamespace($data['name']); |
||
18 | |||
19 | $testName = str_replace("\\", "", Str::substr($fullClassName, strlen($this->composer->getRootNamespace()) + 1)) . 'Test'; |
||
20 | |||
21 | $data = array_merge([ |
||
22 | 'namespace' => Utils::getJustNamespace($fullClassName), |
||
23 | 'className' => Utils::getJustClassName($fullClassName), |
||
24 | 'testName' => $testName |
||
25 | ], $data); |
||
26 | |||
27 | |||
28 | |||
29 | $this->data = $data; |
||
30 | return $this; |
||
31 | } |
||
32 | |||
45 |
Adding explicit visibility (
private
,protected
, orpublic
) is generally recommend to communicate to other developers how, and from where this method is intended to be used.