Completed
Push — master ( 6bc7cf...be821e )
by James Ekow Abaka
05:06
created
src/Context.php 4 patches
Doc Comments   +6 added lines patch added patch discarded remove patch
@@ -52,11 +52,17 @@
 block discarded – undo
52 52
             ->getJunctionClassName($classA, $classB);
53 53
     }
54 54
 
55
+    /**
56
+     * @param RecordWrapper $instance
57
+     */
55 58
     public function getModelTable($instance) {
56 59
         return$this->container->singleton(interfaces\TableNameResolverInterface::class)
57 60
             ->getTableName($instance);
58 61
     }
59 62
 
63
+    /**
64
+     * @param string $model
65
+     */
60 66
     public function getClassName($model, $context = null) {
61 67
         return$this->container->singleton(interfaces\ModelClassResolverInterface::class)
62 68
             ->getModelClassName($model, $context);
Please login to merge, or discard this patch.
Indentation   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -18,11 +18,11 @@
 block discarded – undo
18 18
         $this->container = $container;
19 19
         $this->dbContext = $container->resolve(\ntentan\atiaa\DbContext::class);
20 20
         $this->container->bind(interfaces\ModelJoinerInterface::class)
21
-             ->to(Resolver::class);
21
+                ->to(Resolver::class);
22 22
         $this->container->bind(interfaces\TableNameResolverInterface::class)
23
-             ->to(Resolver::class);
23
+                ->to(Resolver::class);
24 24
         $this->container->bind(interfaces\ModelClassResolverInterface::class)
25
-             ->to(Resolver::class);
25
+                ->to(Resolver::class);
26 26
         self::$instance = $this;
27 27
     }
28 28
 
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,7 @@
 block discarded – undo
67 67
     }
68 68
     
69 69
     public static function getInstance() {
70
-        if(self::$instance === null) throw new NibiiException("A context has not yet been initialized");
70
+        if (self::$instance === null) throw new NibiiException("A context has not yet been initialized");
71 71
         return self::$instance;
72 72
     }
73 73
     
Please login to merge, or discard this patch.
Braces   +3 added lines, -1 removed lines patch added patch discarded remove patch
@@ -67,7 +67,9 @@
 block discarded – undo
67 67
     }
68 68
     
69 69
     public static function getInstance() {
70
-        if(self::$instance === null) throw new NibiiException("A context has not yet been initialized");
70
+        if(self::$instance === null) {
71
+            throw new NibiiException("A context has not yet been initialized");
72
+        }
71 73
         return self::$instance;
72 74
     }
73 75
     
Please login to merge, or discard this patch.
src/QueryOperations.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,7 @@
 block discarded – undo
50 50
     /**
51 51
      * 
52 52
      * @param RecordWrapper $wrapper
53
-     * @param DataAdapter $adapter
53
+     * @param DataOperations $adapter
54 54
      * @param DataOperations $dataOperations
55 55
      */
56 56
     public function __construct(Container $container, $wrapper, $adapter, $dataOperations) {
Please login to merge, or discard this patch.
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -26,9 +26,9 @@
 block discarded – undo
26 26
 
27 27
 namespace ntentan\nibii;
28 28
 
29
-use ntentan\utils\Text;
30 29
 use ntentan\atiaa\Db;
31 30
 use ntentan\panie\Container;
31
+use ntentan\utils\Text;
32 32
 
33 33
 class QueryOperations {
34 34
 
Please login to merge, or discard this patch.
src/QueryParameters.php 1 patch
Doc Comments   +6 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,6 @@  discard block
 block discarded – undo
23 23
 
24 24
     /**
25 25
      *
26
-     * @param \ $model
27 26
      */
28 27
     public function __construct(DriverAdapter $db, $table) {
29 28
         $this->db = $db;
@@ -106,6 +105,9 @@  discard block
 block discarded – undo
106 105
         $this->boundData += $values;
107 106
     }
108 107
 
108
+    /**
109
+     * @param boolean $firstOnly
110
+     */
109 111
     public function setFirstOnly($firstOnly) {
110 112
         $this->firstOnly = $firstOnly;
111 113
         return $this;
@@ -123,6 +125,9 @@  discard block
 block discarded – undo
123 125
         $this->offset = $offset;
124 126
     }
125 127
 
128
+    /**
129
+     * @param string $field
130
+     */
126 131
     public function addSort($field, $direction = 'ASC') {
127 132
         $this->sorts[] = "$field $direction";
128 133
     }
Please login to merge, or discard this patch.
src/RecordWrapper.php 2 patches
Unused Use Statements   -1 removed lines patch added patch discarded remove patch
@@ -28,7 +28,6 @@
 block discarded – undo
28 28
 
29 29
 use ntentan\kaikai\Cache;
30 30
 use ntentan\utils\Text;
31
-use ntentan\atiaa\Db;
32 31
 
33 32
 /**
34 33
  * 
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -61,8 +61,8 @@  discard block
 block discarded – undo
61 61
             $this->quotedTable = $driver->quoteIdentifier($table);
62 62
             $this->table = $this->unquotedTable = $table;
63 63
         } else {
64
-            $this->quotedTable = ( isset($table['schema']) ? "{$driver->quoteIdentifier($table["schema"])}." : "") . $driver->quoteIdentifier($table["table"]);
65
-            $this->unquotedTable = (isset($table['schema']) ? "{$table['schema']}." : "") . $table['table'];
64
+            $this->quotedTable = (isset($table['schema']) ? "{$driver->quoteIdentifier($table["schema"])}." : "").$driver->quoteIdentifier($table["table"]);
65
+            $this->unquotedTable = (isset($table['schema']) ? "{$table['schema']}." : "").$table['table'];
66 66
             $this->table = $table['table'];
67 67
             $this->schema = $table['schema'];
68 68
         }
@@ -80,7 +80,7 @@  discard block
 block discarded – undo
80 80
      */
81 81
     public function getDescription() {
82 82
         return Cache::read(
83
-            (new \ReflectionClass($this))->getName() . '::desc', function() {
83
+            (new \ReflectionClass($this))->getName().'::desc', function() {
84 84
                 return new ModelDescription($this);
85 85
             }
86 86
         );
Please login to merge, or discard this patch.