Skip to content

Commit 4bbbae9

Browse files
vidschofelixthePanz
authored andcommitted
Update return types on Doctrine_Record::safe() and Doctrine_Record::trySafe()
1 parent dbb12d0 commit 4bbbae9

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

lib/Doctrine/Record.php

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1725,11 +1725,11 @@ public function resetPendingUnlinks()
17251725
*
17261726
* this method also saves the related components
17271727
*
1728-
* @param Doctrine_Connection $conn optional connection parameter
1729-
* @throws Exception if record is not valid and validation is active
1728+
* @param Doctrine_Connection|null $conn optional connection parameter
17301729
* @return void
1730+
* @throws Exception if record is not valid and validation is active
17311731
*/
1732-
public function save(?Doctrine_Connection $conn = null)
1732+
public function save(?Doctrine_Connection $conn = null): void
17331733
{
17341734
if ($conn === null) {
17351735
$conn = $this->_table->getConnection();
@@ -1743,10 +1743,12 @@ public function save(?Doctrine_Connection $conn = null)
17431743
* throw an exception when validation fails but returns TRUE on
17441744
* success or FALSE on failure.
17451745
*
1746-
* @param Doctrine_Connection $conn optional connection parameter
1747-
* @return TRUE if the record was saved sucessfully without errors, FALSE otherwise.
1746+
* @param Doctrine_Connection|null $conn optional connection parameter
1747+
* @return bool TRUE if the record was saved successfully without errors, FALSE otherwise.
1748+
* @throws Exception
17481749
*/
1749-
public function trySave(?Doctrine_Connection $conn = null) {
1750+
public function trySave(?Doctrine_Connection $conn = null): bool
1751+
{
17501752
try {
17511753
$this->save($conn);
17521754
return true;

0 commit comments

Comments
 (0)