diff --git a/src/Mvc/Model.php b/src/Mvc/Model.php index ebcebc2..e53607f 100644 --- a/src/Mvc/Model.php +++ b/src/Mvc/Model.php @@ -40,6 +40,8 @@ use Phalcon\Mvc\Model\ValidationFailed; use Phalcon\Mvc\ModelInterface; use Phalcon\Filter\Validation\ValidationInterface; +use Phalcon\Support\Collection; +use Phalcon\Support\Collection\CollectionInterface; use Serializable; /** @@ -1294,6 +1296,17 @@ public function save(): bool { } + /** + * Inserted or updates model instance, expects a visited list of objects. + * + * @param CollectionInterface $visited + * + * @return bool + */ + public function doSave(\Phalcon\Support\Collection\CollectionInterface $visited): bool + { + } + /** * Serializes the object ignoring connections, services, related objects or * static properties @@ -1673,10 +1686,11 @@ protected function preSave(\Phalcon\Mvc\Model\MetaDataInterface $metaData, bool * Saves related records that must be stored prior to save the master record * * @param ModelInterface[] $related + * @param CollectionInterface $visited * @return bool * @param \Phalcon\Db\Adapter\AdapterInterface $connection */ - protected function preSaveRelatedRecords(\Phalcon\Db\Adapter\AdapterInterface $connection, $related): bool + protected function preSaveRelatedRecords(\Phalcon\Db\Adapter\AdapterInterface $connection, $related, \Phalcon\Support\Collection\CollectionInterface $visited): bool { } @@ -1695,10 +1709,11 @@ protected function postSave(bool $success, bool $exists): bool * Save the related records assigned in the has-one/has-many relations * * @param ModelInterface[] $related + * @param CollectionInterface $visited * @return bool * @param \Phalcon\Db\Adapter\AdapterInterface $connection */ - protected function postSaveRelatedRecords(\Phalcon\Db\Adapter\AdapterInterface $connection, $related): bool + protected function postSaveRelatedRecords(\Phalcon\Db\Adapter\AdapterInterface $connection, $related, \Phalcon\Support\Collection\CollectionInterface $visited): bool { } diff --git a/src/Mvc/Router/Route.php b/src/Mvc/Router/Route.php index 1614cde..a69e64e 100644 --- a/src/Mvc/Router/Route.php +++ b/src/Mvc/Router/Route.php @@ -42,9 +42,9 @@ class Route implements \Phalcon\Mvc\Router\RouteInterface protected $hostname = null; /** - * @var string|null + * @var string */ - protected $id = null; + protected $id = ''; /** * @var array|string @@ -204,9 +204,9 @@ public function getHostname(): ?string } /** - * @return string | null + * @return string */ - public function getId(): ?string + public function getId(): string { }