Passed
Pull Request — 2.x (#729)
by Antonio Carlos
06:06
created

Manager::capsuleNamespace()   A

Complexity

Conditions 2
Paths 2

Size

Total Lines 7
Code Lines 3

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 4
CRAP Score 2

Importance

Changes 0
Metric Value
cc 2
eloc 3
nc 2
nop 2
dl 0
loc 7
ccs 4
cts 4
cp 1
crap 2
rs 10
c 0
b 0
f 0
1
<?php
2
3
namespace A17\Twill\Services\Capsules;
4
5
class Manager
6
{
7
    use HasCapsules;
0 ignored issues
show
Bug introduced by
The trait A17\Twill\Services\Capsules\HasCapsules requires the property $command which is not provided by A17\Twill\Services\Capsules\Manager.
Loading history...
8
9 8
    function capsuleNamespace($capsuleName, $type = null)
0 ignored issues
show
Best Practice introduced by
It is generally recommended to explicitly declare the visibility for methods.

Adding explicit visibility (private, protected, or public) is generally recommend to communicate to other developers how, and from where this method is intended to be used.

Loading history...
10
    {
11 8
        $base = config('twill.capsules.namespaces.base');
12
13 8
        $type = config("twill.capsules.namespaces.{$type}");
14
15 8
        return "{$base}\\{$capsuleName}" . (filled($type) ? "\\{$type}" : '');
16
    }
17
}
18