@@ -9,5 +9,8 @@ |
||
9 | 9 | */ |
10 | 10 | interface TableNameResolverInterface |
11 | 11 | { |
12 | + /** |
|
13 | + * @return string |
|
14 | + */ |
|
12 | 15 | public function getTableName($instance); |
13 | 16 | } |
@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace ntentan\nibii; |
4 | 4 | |
5 | -use ntentan\utils\Text; |
|
6 | 5 | use ntentan\atiaa\Db; |
7 | 6 | |
8 | 7 | /** |
@@ -118,6 +118,9 @@ |
||
118 | 118 | return $this->queryEngine; |
119 | 119 | } |
120 | 120 | |
121 | + /** |
|
122 | + * @param RecordWrapper $model |
|
123 | + */ |
|
121 | 124 | public function setModel($model) { |
122 | 125 | $this->modelInstance = $model; |
123 | 126 | } |
@@ -26,7 +26,6 @@ |
||
26 | 26 | |
27 | 27 | namespace ntentan\nibii; |
28 | 28 | |
29 | -use ntentan\utils\Utils; |
|
30 | 29 | use ntentan\atiaa\Db; |
31 | 30 | use ntentan\panie\InjectionContainer; |
32 | 31 |
@@ -227,6 +227,9 @@ |
||
227 | 227 | } |
228 | 228 | } |
229 | 229 | |
230 | + /** |
|
231 | + * @param string $event |
|
232 | + */ |
|
230 | 233 | private function runBehaviours($event, $args) { |
231 | 234 | foreach ($this->wrapper->getBehaviours() as $behaviour) { |
232 | 235 | $args[0] = call_user_func_array([$behaviour, $event], $args); |
@@ -9,5 +9,8 @@ |
||
9 | 9 | */ |
10 | 10 | interface ModelJoinerInterface |
11 | 11 | { |
12 | + /** |
|
13 | + * @return string |
|
14 | + */ |
|
12 | 15 | public function getJunctionClassName($classA, $classB); |
13 | 16 | } |
@@ -8,10 +8,10 @@ |
||
8 | 8 | |
9 | 9 | namespace ntentan\nibii; |
10 | 10 | |
11 | +use ntentan\config\Config; |
|
11 | 12 | use ntentan\nibii\interfaces\ModelClassResolverInterface; |
12 | 13 | use ntentan\nibii\interfaces\ModelJoinerInterface; |
13 | 14 | use ntentan\nibii\interfaces\TableNameResolverInterface; |
14 | -use ntentan\config\Config; |
|
15 | 15 | use ntentan\utils\Text; |
16 | 16 | |
17 | 17 | /** |
@@ -36,6 +36,9 @@ discard block |
||
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 |
||
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 | } |
@@ -190,6 +190,10 @@ |
||
190 | 190 | return $return; |
191 | 191 | } |
192 | 192 | |
193 | + /** |
|
194 | + * @param integer $level |
|
195 | + * @param string $opr |
|
196 | + */ |
|
193 | 197 | private function parseRightExpression($level, $opr) { |
194 | 198 | switch ($opr) { |
195 | 199 | case 'between': return $this->parseBetween(); |
@@ -90,6 +90,9 @@ |
||
90 | 90 | return $relationshipDetails; |
91 | 91 | } |
92 | 92 | |
93 | + /** |
|
94 | + * @param string $type |
|
95 | + */ |
|
93 | 96 | private function createRelationships($type, $relationships) { |
94 | 97 | foreach ($relationships as $relationship) { |
95 | 98 | $relationship = $this->getRelationshipDetails($relationship); |
@@ -22,6 +22,11 @@ |
||
22 | 22 | 'save' |
23 | 23 | ]; |
24 | 24 | |
25 | + /** |
|
26 | + * @param RecordWrapper $wrapper |
|
27 | + * @param DriverAdapter $adapter |
|
28 | + * @param string $table |
|
29 | + */ |
|
25 | 30 | public function __construct($wrapper, $adapter, $table) { |
26 | 31 | $this->wrapper = $wrapper; |
27 | 32 | $this->adapter = $adapter; |