Completed
Push — master ( 396d48...e9761c )
by James Ekow Abaka
02:19
created

Nibii::setTableResolver()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 1
Bugs 0 Features 1
Metric Value
c 1
b 0
f 1
dl 0
loc 4
rs 10
ccs 0
cts 3
cp 0
cc 1
eloc 2
nc 1
nop 1
crap 2
1
<?php
2
3
namespace ntentan\nibii;
4
5
use ntentan\panie\Container;
6
7
class Nibii
8
{
9
    public static function load($path)
10
    {
11
        return (new \ReflectionClass(self::getClassName($path)))->newInstance();
12 4
    }
13
    
14 4
    public static function joinModels($classA, $classB)
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
15
    {
16
        return Container::singleton(interfaces\ModelJoinerInterface::class)->getJunctionClass($classA, $classB);
17 4
    }
18
    
19 4
    public static function getModelTable($instance)
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
20 4
    {
21 4
        return Container::singleton(interfaces\TableNameResolverInterface::class)->getTableName($instance);
22 4
    }
23 4
24 4
    public static function getClassName($model, $context = null)
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
25
    {
26
        return Container::singleton(interfaces\ClassResolverInterface::class)->getClassName($model, $context);
27 4
    }
28
    
29 4
    public static function getModelName($class)
0 ignored issues
show
Documentation introduced by
The return type could not be reliably inferred; please add a @return annotation.

Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a @return annotation as described here.

Loading history...
30
    {
31
        return $class;
32
    }
33
}
34