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

Manager   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 11
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 5
dl 0
loc 11
rs 10
c 1
b 0
f 0
wmc 2

1 Method

Rating   Name   Duplication   Size   Complexity  
A capsuleNamespace() 0 7 2
1
<?php
2
3
namespace A17\Twill\Services\Capsules;
4
5
class Manager
6
{
7
    use HasCapsules;
8
9
    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
        $base = config('twill.capsules.namespaces.base');
12
13
        $type = config("twill.capsules.namespaces.{$type}");
14
15
        return "{$base}\\{$capsuleName}" . (filled($type) ? "\\{$type}" : '');
16
    }
17
}
18