@@ -204,6 +204,10 @@ |
||
| 204 | 204 | return $return; |
| 205 | 205 | } |
| 206 | 206 | |
| 207 | + /** |
|
| 208 | + * @param integer $level |
|
| 209 | + * @param string $opr |
|
| 210 | + */ |
|
| 207 | 211 | private function parseRightExpression($level, $opr) |
| 208 | 212 | { |
| 209 | 213 | switch ($opr) { |
@@ -103,6 +103,9 @@ |
||
| 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) { |
@@ -89,6 +89,9 @@ |
||
| 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); |
@@ -17,5 +17,10 @@ |
||
| 17 | 17 | */ |
| 18 | 18 | interface ValidatorFactoryInterface |
| 19 | 19 | { |
| 20 | + /** |
|
| 21 | + * @param integer $mode |
|
| 22 | + * |
|
| 23 | + * @return \ntentan\nibii\DefaultValidator |
|
| 24 | + */ |
|
| 20 | 25 | public function createModelValidator(RecordWrapper $model, $mode); |
| 21 | 26 | } |
@@ -12,7 +12,17 @@ |
||
| 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); |
| 16 | 22 | public function getClassName($model); |
| 23 | + |
|
| 24 | + /** |
|
| 25 | + * @return string |
|
| 26 | + */ |
|
| 17 | 27 | public function getJunctionClassName($classA, $classB); |
| 18 | 28 | } |
| 19 | 29 | \ No newline at end of file |
@@ -25,6 +25,9 @@ discard block |
||
| 25 | 25 | 'save', 'validate' |
| 26 | 26 | ]; |
| 27 | 27 | |
| 28 | + /** |
|
| 29 | + * @param string $table |
|
| 30 | + */ |
|
| 28 | 31 | public function __construct(RecordWrapper $wrapper, $table) |
| 29 | 32 | { |
| 30 | 33 | $this->wrapper = $wrapper; |
@@ -34,6 +37,9 @@ discard block |
||
| 34 | 37 | $this->queryOperations = new QueryOperations($wrapper, $this->dataOperations, $driver); |
| 35 | 38 | } |
| 36 | 39 | |
| 40 | + /** |
|
| 41 | + * @param string $name |
|
| 42 | + */ |
|
| 37 | 43 | public function perform($name, $arguments) |
| 38 | 44 | { |
| 39 | 45 | //@todo Think of using a hash here in future |
@@ -228,7 +228,6 @@ |
||
| 228 | 228 | |
| 229 | 229 | /** |
| 230 | 230 | * |
| 231 | - * @param array $data |
|
| 232 | 231 | * @param int $mode |
| 233 | 232 | * @return bool|array |
| 234 | 233 | */ |
@@ -465,7 +465,7 @@ discard block |
||
| 465 | 465 | * Callback for when a new record has been created. |
| 466 | 466 | * This callback can be most useful for obtaining the primary key of a newly created record. |
| 467 | 467 | * |
| 468 | - * @param $id |
|
| 468 | + * @param string $id |
|
| 469 | 469 | */ |
| 470 | 470 | public function postCreateCallback($id) |
| 471 | 471 | { |
@@ -509,6 +509,10 @@ discard block |
||
| 509 | 509 | return $this->adapter; |
| 510 | 510 | } |
| 511 | 511 | |
| 512 | + /** |
|
| 513 | + * @param Relationship[] $relationships |
|
| 514 | + * @param integer $depth |
|
| 515 | + */ |
|
| 512 | 516 | private function expandArrayValue($array, $relationships, $depth, $expandableModels = [], $index = null) |
| 513 | 517 | { |
| 514 | 518 | if (empty($expandableModels)) { |