Completed
Push — master ( bef35d...711c39 )
by James Ekow Abaka
01:36
created
src/ModelDescription.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -103,6 +103,9 @@
 block discarded – undo
103 103
         return $relationshipDetails;
104 104
     }
105 105
 
106
+    /**
107
+     * @param string $type
108
+     */
106 109
     private function createRelationships($type, $relationships)
107 110
     {
108 111
         foreach ($relationships as $relationship) {
Please login to merge, or discard this patch.
src/QueryOperations.php 1 patch
Doc Comments   -1 removed lines patch added patch discarded remove patch
@@ -50,7 +50,6 @@
 block discarded – undo
50 50
     /**
51 51
      * 
52 52
      * @param RecordWrapper $wrapper
53
-     * @param DriverAdapter $adapter
54 53
      * @param DataOperations $dataOperations
55 54
      */
56 55
     public function __construct(RecordWrapper $wrapper, DataOperations $dataOperations, Driver $driver) {
Please login to merge, or discard this patch.
src/RecordWrapper.php 2 patches
Doc Comments   +9 added lines, -2 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 
149 149
     /**
150 150
      * @method
151
-     * @param type $name
151
+     * @param string $name
152 152
      * @param type $arguments
153 153
      * @return type
154 154
      */
@@ -172,6 +172,10 @@  discard block
 block discarded – undo
172 172
         return $this->retrieveItem($name);
173 173
     }
174 174
 
175
+    /**
176
+     * @param Relationship[] $relationships
177
+     * @param integer $depth
178
+     */
175 179
     private function expandArrayValue($array, $relationships, $depth, $index = null)
176 180
     {
177 181
         foreach ($relationships as $name => $relationship) {
@@ -359,6 +363,9 @@  discard block
 block discarded – undo
359 363
 
360 364
     }
361 365
 
366
+    /**
367
+     * @param string $id
368
+     */
362 369
     public function postSaveCallback($id)
363 370
     {
364 371
 
@@ -387,7 +394,7 @@  discard block
 block discarded – undo
387 394
 
388 395
     /**
389 396
      *
390
-     * @return DataAdapter
397
+     * @return DriverAdapter
391 398
      */
392 399
     public function getAdapter()
393 400
     {
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -84,8 +84,8 @@  discard block
 block discarded – undo
84 84
             $this->table = $table['table'];
85 85
             $this->schema = $table['schema'];
86 86
         }
87
-        $this->quotedTable = ($this->schema ? "{$driver->quoteIdentifier($this->schema)}." : "") . $driver->quoteIdentifier($this->table);
88
-        $this->unquotedTable = ($this->schema ? "{$this->schema}." : "") . $this->table;
87
+        $this->quotedTable = ($this->schema ? "{$driver->quoteIdentifier($this->schema)}." : "").$driver->quoteIdentifier($this->table);
88
+        $this->unquotedTable = ($this->schema ? "{$this->schema}." : "").$this->table;
89 89
         $this->adapter->setModel($this, $this->quotedTable);
90 90
         $this->initialized = true;
91 91
     }
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
     {
105 105
         $this->initialize();
106 106
         return $this->context->getCache()->read(
107
-                "{$this->className}::desc", function () {
107
+                "{$this->className}::desc", function() {
108 108
                 return $this->context->getModelDescription($this);
109 109
             }
110 110
         );
Please login to merge, or discard this patch.
src/Operations.php 1 patch
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -23,6 +23,9 @@
 block discarded – undo
23 23
         'save', 'validate'
24 24
     ];
25 25
 
26
+    /**
27
+     * @param string $table
28
+     */
26 29
     public function __construct(RecordWrapper $wrapper, $table)
27 30
     {
28 31
         $this->wrapper = $wrapper;
Please login to merge, or discard this patch.
src/ORMContext.php 2 patches
Unused Use Statements   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,8 +4,8 @@
 block discarded – undo
4 4
 
5 5
 use ntentan\atiaa\DbContext;
6 6
 use ntentan\kaikai\Cache;
7
-use ntentan\nibii\interfaces\ModelFactoryInterface;
8 7
 use ntentan\nibii\interfaces\DriverAdapterFactoryInterface;
8
+use ntentan\nibii\interfaces\ModelFactoryInterface;
9 9
 use ntentan\nibii\interfaces\ValidatorFactoryInterface;
10 10
 
11 11
 /**
Please login to merge, or discard this patch.
Doc Comments   +3 added lines patch added patch discarded remove patch
@@ -89,6 +89,9 @@
 block discarded – undo
89 89
         return $this->config;
90 90
     }
91 91
 
92
+    /**
93
+     * @param RecordWrapper $model
94
+     */
92 95
     public function getModelDescription($model) : ModelDescription
93 96
     {
94 97
         return new ModelDescription($model);
Please login to merge, or discard this patch.
src/factories/DriverAdapterFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 
24 24
     public function createDriverAdapter()
25 25
     {
26
-        $class = 'ntentan\nibii\adapters\\' . Text::ucamelize($this->driverName) . 'Adapter';
26
+        $class = 'ntentan\nibii\adapters\\'.Text::ucamelize($this->driverName).'Adapter';
27 27
         return new $class();
28 28
     }
29 29
 }
Please login to merge, or discard this patch.
src/interfaces/ModelFactoryInterface.php 1 patch
Doc Comments   +10 added lines patch added patch discarded remove patch
@@ -12,6 +12,16 @@
 block discarded – undo
12 12
 interface ModelFactoryInterface
13 13
 {
14 14
     public function createModel($name, $context);
15
+
16
+    /**
17
+     * @param \ntentan\nibii\RecordWrapper $instance
18
+     *
19
+     * @return string
20
+     */
15 21
     public function getModelTable($instance);
22
+
23
+    /**
24
+     * @return string
25
+     */
16 26
     public function getJunctionClassName($classA, $classB);
17 27
 }
18 28
\ No newline at end of file
Please login to merge, or discard this patch.
src/factories/DefaultModelFactory.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -33,7 +33,7 @@
 block discarded – undo
33 33
         }
34 34
         $classes = [$classA['class'], $classB['class']];
35 35
         sort($classes);
36
-        return "{$classA['namespace']}\\" . implode('', $classes);
36
+        return "{$classA['namespace']}\\".implode('', $classes);
37 37
     }
38 38
     
39 39
     private function getClassFileDetails($className) {
Please login to merge, or discard this patch.
src/DataOperations.php 1 patch
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -226,7 +226,7 @@
 block discarded – undo
226 226
     /**
227 227
      * 
228 228
      * @param array $data
229
-     * @param type $mode
229
+     * @param integer $mode
230 230
      * @return bool|array
231 231
      */
232 232
     private function validate(array $data, int $mode)
Please login to merge, or discard this patch.