@@ -64,7 +64,7 @@ |
||
| 64 | 64 | * @param int $limit The number of Models to limit. |
| 65 | 65 | * @return Collection |
| 66 | 66 | */ |
| 67 | - public function findQuery($typeKey, array $criteria, array $fields = [], array $sort = [], array $inclusions =[], $offset = 0, $limit = 0); |
|
| 67 | + public function findQuery($typeKey, array $criteria, array $fields = [], array $sort = [], array $inclusions = [], $offset = 0, $limit = 0); |
|
| 68 | 68 | |
| 69 | 69 | /** |
| 70 | 70 | * Creates a new model. |
@@ -9,5 +9,5 @@ |
||
| 9 | 9 | */ |
| 10 | 10 | class Events |
| 11 | 11 | { |
| 12 | - const onMetadataLoad = 'onMetadataLoad'; |
|
| 12 | + const onMetadataLoad = 'onMetadataLoad'; |
|
| 13 | 13 | } |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | /** |
| 65 | 65 | * Sets the embed type: one or many. |
| 66 | 66 | * |
| 67 | - * @param string $relType |
|
| 67 | + * @param string $embedType |
|
| 68 | 68 | * @return self |
| 69 | 69 | */ |
| 70 | 70 | public function setEmbedType($embedType) |
@@ -78,7 +78,7 @@ discard block |
||
| 78 | 78 | /** |
| 79 | 79 | * Validates the embed type. |
| 80 | 80 | * |
| 81 | - * @param string $type |
|
| 81 | + * @param string $embedType |
|
| 82 | 82 | * @return bool |
| 83 | 83 | * @throws MetadataException |
| 84 | 84 | */ |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | * Gets the parent entity type. |
| 122 | 122 | * For entities that are extended. |
| 123 | 123 | * |
| 124 | - * @return string|null |
|
| 124 | + * @return boolean |
|
| 125 | 125 | */ |
| 126 | 126 | public function getParentEntityType() |
| 127 | 127 | { |
@@ -334,7 +334,7 @@ discard block |
||
| 334 | 334 | /** |
| 335 | 335 | * Merges attributes with this instance's attributes. |
| 336 | 336 | * |
| 337 | - * @param array $toAdd |
|
| 337 | + * @param AttributeMetadata[] $toAdd |
|
| 338 | 338 | * @return self |
| 339 | 339 | */ |
| 340 | 340 | private function mergeAttributes(array $toAdd) |
@@ -348,7 +348,7 @@ discard block |
||
| 348 | 348 | /** |
| 349 | 349 | * Merges embeds with this instance's embeds. |
| 350 | 350 | * |
| 351 | - * @param array $toAdd |
|
| 351 | + * @param EmbeddedPropMetadata[] $toAdd |
|
| 352 | 352 | * @return self |
| 353 | 353 | */ |
| 354 | 354 | private function mergeEmbeds(array $toAdd) |
@@ -362,7 +362,7 @@ discard block |
||
| 362 | 362 | /** |
| 363 | 363 | * Merges mixins with this instance's mixins. |
| 364 | 364 | * |
| 365 | - * @param array $toAdd |
|
| 365 | + * @param MixinMetadata[] $toAdd |
|
| 366 | 366 | * @return self |
| 367 | 367 | */ |
| 368 | 368 | private function mergeMixins(array $toAdd) |
@@ -378,7 +378,7 @@ discard block |
||
| 378 | 378 | /** |
| 379 | 379 | * Merges relationships with this instance's relationships. |
| 380 | 380 | * |
| 381 | - * @param array $toAdd |
|
| 381 | + * @param RelationshipMetadata[] $toAdd |
|
| 382 | 382 | * @return self |
| 383 | 383 | */ |
| 384 | 384 | private function mergeRelationships(array $toAdd) |
@@ -357,7 +357,6 @@ discard block |
||
| 357 | 357 | * |
| 358 | 358 | * @api |
| 359 | 359 | * @param string $key |
| 360 | - * @param Embed $model |
|
| 361 | 360 | * @return self |
| 362 | 361 | */ |
| 363 | 362 | public function pushEmbed($key, Embed $embed) |
@@ -380,7 +379,7 @@ discard block |
||
| 380 | 379 | * |
| 381 | 380 | * @api |
| 382 | 381 | * @param string $key The has-many embed key. |
| 383 | - * @param Model $embed The embed to remove from the collection. |
|
| 382 | + * @param Embed $embed The embed to remove from the collection. |
|
| 384 | 383 | * @return self |
| 385 | 384 | */ |
| 386 | 385 | public function removeEmbed($key, Embed $embed) |
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace As3\Modlr\Models; |
| 4 | 4 | |
| 5 | 5 | use As3\Modlr\Metadata\Interfaces\AttributeInterface; |
| 6 | -use As3\Modlr\Persister\Record; |
|
| 7 | 6 | use As3\Modlr\Store\Store; |
| 8 | 7 | |
| 9 | 8 | /** |
@@ -481,12 +481,12 @@ |
||
| 481 | 481 | return $this; |
| 482 | 482 | } |
| 483 | 483 | |
| 484 | - /** |
|
| 485 | - * Removes properties marked as non-saved. |
|
| 486 | - * |
|
| 487 | - * @param array $properties |
|
| 488 | - * @return array |
|
| 489 | - */ |
|
| 484 | + /** |
|
| 485 | + * Removes properties marked as non-saved. |
|
| 486 | + * |
|
| 487 | + * @param array $properties |
|
| 488 | + * @return array |
|
| 489 | + */ |
|
| 490 | 490 | protected function filterNotSavedProperties(array $properties) |
| 491 | 491 | { |
| 492 | 492 | foreach ($this->getMetadata()->getAttributes() as $fieldKey => $propMeta) { |
@@ -2,8 +2,6 @@ |
||
| 2 | 2 | |
| 3 | 3 | namespace As3\Modlr\Models\Collections; |
| 4 | 4 | |
| 5 | -use As3\Modlr\Models\AbstractModel; |
|
| 6 | - |
|
| 7 | 5 | /** |
| 8 | 6 | * Model collection that contains record representations from a persistence (database) layer. |
| 9 | 7 | * |
@@ -34,7 +34,7 @@ |
||
| 34 | 34 | /** |
| 35 | 35 | * Returns all models in this collection without triggering auto-loading. |
| 36 | 36 | * |
| 37 | - * @return Model[] |
|
| 37 | + * @return AbstractModel[] |
|
| 38 | 38 | */ |
| 39 | 39 | public function allWithoutLoad() |
| 40 | 40 | { |
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace As3\Modlr\Models; |
| 4 | 4 | |
| 5 | 5 | use As3\Modlr\Metadata\EmbedMetadata; |
| 6 | -use As3\Modlr\Persister\Record; |
|
| 7 | 6 | use As3\Modlr\Store\Store; |
| 8 | 7 | |
| 9 | 8 | /** |
@@ -167,6 +167,7 @@ discard block |
||
| 167 | 167 | * |
| 168 | 168 | * Overloaded to support relationships. |
| 169 | 169 | * |
| 170 | + * @param string $key |
|
| 170 | 171 | */ |
| 171 | 172 | public function get($key) |
| 172 | 173 | { |
@@ -412,6 +413,7 @@ discard block |
||
| 412 | 413 | * Sets a model property: an attribute value, a has-one model, or an entire has-many model collection. |
| 413 | 414 | * Note: To push/remove a single Model into a has-many collection, or clear a collection, use @see push(), remove() and clear(). |
| 414 | 415 | * |
| 416 | + * @param Model|null $value |
|
| 415 | 417 | */ |
| 416 | 418 | public function set($key, $value) |
| 417 | 419 | { |
@@ -3,7 +3,6 @@ |
||
| 3 | 3 | namespace As3\Modlr\Models; |
| 4 | 4 | |
| 5 | 5 | use As3\Modlr\Models\Relationships; |
| 6 | -use As3\Modlr\Persister\Record; |
|
| 7 | 6 | use As3\Modlr\Store\Store; |
| 8 | 7 | use As3\Modlr\Metadata\EntityMetadata; |
| 9 | 8 | |