Passed
Push — master ( 956c87...edca9d )
by AHMED JOHARI
03:35
created

Grammar   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
wmc 1
eloc 4
c 1
b 0
f 0
dl 0
loc 14
rs 10

1 Method

Rating   Name   Duplication   Size   Complexity  
A registerNamespace() 0 5 1
1
<?php
2
3
namespace Joesama\Pintu\Components\Concerns;
4
5
use ReflectionClass;
6
7
trait Grammar
8
{
9
    /**
10
     * Register default controller namespace.
11
     *
12
     * @param ReflectionClass $reflectionClass
13
     *
14
     * @return array
15
     */
16
    public function registerNamespace(ReflectionClass $reflectionClass): array
17
    {
18
        return [
19
            'component' => $reflectionClass->getNamespaceName() . '\Http\ComponentControllers',
20
            'api' => $reflectionClass->getNamespaceName() . '\Http\ApiControllers'
21
        ];
22
    }
23
}
24