Skip to content

Commit ec3c12f

Browse files
authored
Merge pull request #93 from niden/master
v5.3.1
2 parents 70eab3c + f049bea commit ec3c12f

File tree

2 files changed

+21
-6
lines changed

2 files changed

+21
-6
lines changed

src/Mvc/Model.php

+17-2
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,8 @@
4040
use Phalcon\Mvc\Model\ValidationFailed;
4141
use Phalcon\Mvc\ModelInterface;
4242
use Phalcon\Filter\Validation\ValidationInterface;
43+
use Phalcon\Support\Collection;
44+
use Phalcon\Support\Collection\CollectionInterface;
4345
use Serializable;
4446

4547
/**
@@ -1294,6 +1296,17 @@ public function save(): bool
12941296
{
12951297
}
12961298

1299+
/**
1300+
* Inserted or updates model instance, expects a visited list of objects.
1301+
*
1302+
* @param CollectionInterface $visited
1303+
*
1304+
* @return bool
1305+
*/
1306+
public function doSave(\Phalcon\Support\Collection\CollectionInterface $visited): bool
1307+
{
1308+
}
1309+
12971310
/**
12981311
* Serializes the object ignoring connections, services, related objects or
12991312
* static properties
@@ -1673,10 +1686,11 @@ protected function preSave(\Phalcon\Mvc\Model\MetaDataInterface $metaData, bool
16731686
* Saves related records that must be stored prior to save the master record
16741687
*
16751688
* @param ModelInterface[] $related
1689+
* @param CollectionInterface $visited
16761690
* @return bool
16771691
* @param \Phalcon\Db\Adapter\AdapterInterface $connection
16781692
*/
1679-
protected function preSaveRelatedRecords(\Phalcon\Db\Adapter\AdapterInterface $connection, $related): bool
1693+
protected function preSaveRelatedRecords(\Phalcon\Db\Adapter\AdapterInterface $connection, $related, \Phalcon\Support\Collection\CollectionInterface $visited): bool
16801694
{
16811695
}
16821696

@@ -1695,10 +1709,11 @@ protected function postSave(bool $success, bool $exists): bool
16951709
* Save the related records assigned in the has-one/has-many relations
16961710
*
16971711
* @param ModelInterface[] $related
1712+
* @param CollectionInterface $visited
16981713
* @return bool
16991714
* @param \Phalcon\Db\Adapter\AdapterInterface $connection
17001715
*/
1701-
protected function postSaveRelatedRecords(\Phalcon\Db\Adapter\AdapterInterface $connection, $related): bool
1716+
protected function postSaveRelatedRecords(\Phalcon\Db\Adapter\AdapterInterface $connection, $related, \Phalcon\Support\Collection\CollectionInterface $visited): bool
17021717
{
17031718
}
17041719

src/Mvc/Router/Route.php

+4-4
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,9 @@ class Route implements \Phalcon\Mvc\Router\RouteInterface
4242
protected $hostname = null;
4343

4444
/**
45-
* @var string|null
45+
* @var string
4646
*/
47-
protected $id = null;
47+
protected $id = '';
4848

4949
/**
5050
* @var array|string
@@ -204,9 +204,9 @@ public function getHostname(): ?string
204204
}
205205

206206
/**
207-
* @return string | null
207+
* @return string
208208
*/
209-
public function getId(): ?string
209+
public function getId(): string
210210
{
211211
}
212212

0 commit comments

Comments
 (0)