Completed
Push — master ( e9761c...d669e8 )
by James Ekow Abaka
02:46
created
src/DefaultModelResolvers.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 {
23 23
     public function getClassName($default, $context)
24 24
     {
25
-        if(self::$classResolver !== null && $model[0] !== "\\") {
25
+        if (self::$classResolver !== null && $model[0] !== "\\") {
26 26
             $resolver = self::$classResolver;
27 27
             $className = $resolver($model, $context);
28 28
         } else {
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
     {
36 36
         $arrayed = explode('\\', $className);
37 37
         $class = array_pop($arrayed);
38
-        if($arrayed[0] == '') {
38
+        if ($arrayed[0] == '') {
39 39
             array_shift($arrayed);
40 40
         }
41 41
         return ['class' => $class, 'namespace' => implode('\\', $arrayed)];
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
     {
46 46
         $classA = $this->getClassFileDetails($classA);
47 47
         $classB = $this->getClassFileDetails($classB);
48
-        if($classA['namespace'] != $classB['namespace']) {
48
+        if ($classA['namespace'] != $classB['namespace']) {
49 49
             throw new NibiiException(
50 50
                 "Cannot automatically join two classes of different "
51 51
                     . "namespaces. Please provide a model joiner or "
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
         }
55 55
         $classes = [$classA['class'], $classB['class']];
56 56
         sort($classes);
57
-        return "{$classA['namespace']}\\" . implode('', $classes);        
57
+        return "{$classA['namespace']}\\".implode('', $classes);        
58 58
     }
59 59
 
60 60
     public function getTableName($instance)
Please login to merge, or discard this patch.
src/interfaces/ModelJoinerInterface.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -9,5 +9,8 @@
 block discarded – undo
9 9
  */
10 10
 interface TableNameResolverInterface
11 11
 {
12
+    /**
13
+     * @return string
14
+     */
12 15
     public function getTableName($instance);
13 16
 }
Please login to merge, or discard this patch.