Completed
Push — master ( 00db75...2b9193 )
by James Ekow Abaka
03:21
created
src/relationships/BelongsToRelationship.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -46,11 +46,11 @@
 block discarded – undo
46 46
     public function runSetup()
47 47
     {
48 48
         $model = InjectionContainer::resolve(Nibii::getClassName($this->options['model'], self::BELONGS_TO));
49
-        if($this->options['foreign_key'] == null) {
49
+        if ($this->options['foreign_key'] == null) {
50 50
             $this->options['foreign_key'] = $model->getDescription()->getPrimaryKey()[0];
51 51
         }
52
-        if($this->options['local_key'] == null) {
53
-            $this->options['local_key'] = Text::singularize($model->getTable()) . '_id';
52
+        if ($this->options['local_key'] == null) {
53
+            $this->options['local_key'] = Text::singularize($model->getTable()).'_id';
54 54
         }
55 55
     }
56 56
 }
Please login to merge, or discard this patch.
src/Nibii.php 1 patch
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -36,6 +36,9 @@  discard block
 block discarded – undo
36 36
             ->getJunctionClassName($classA, $classB);
37 37
     }
38 38
 
39
+    /**
40
+     * @param RecordWrapper $instance
41
+     */
39 42
     public static function getModelTable($instance) {
40 43
         return InjectionContainer::singleton(interfaces\TableNameResolverInterface::class)
41 44
             ->getTableName($instance);
@@ -46,6 +49,9 @@  discard block
 block discarded – undo
46 49
             ->getModelClassName($model, $context);
47 50
     }
48 51
 
52
+    /**
53
+     * @param string $class
54
+     */
49 55
     public static function getModelName($class) {
50 56
         return $class;
51 57
     }
Please login to merge, or discard this patch.