Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions lib/Doctrine/Record.php
Original file line number Diff line number Diff line change
Expand Up @@ -1725,11 +1725,11 @@ public function resetPendingUnlinks()
*
* this method also saves the related components
*
* @param Doctrine_Connection $conn optional connection parameter
* @throws Exception if record is not valid and validation is active
* @param Doctrine_Connection|null $conn optional connection parameter
* @return void
* @throws Exception if record is not valid and validation is active
*/
public function save(?Doctrine_Connection $conn = null)
public function save(?Doctrine_Connection $conn = null): void
{
if ($conn === null) {
$conn = $this->_table->getConnection();
Expand All @@ -1743,10 +1743,12 @@ public function save(?Doctrine_Connection $conn = null)
* throw an exception when validation fails but returns TRUE on
* success or FALSE on failure.
*
* @param Doctrine_Connection $conn optional connection parameter
* @return TRUE if the record was saved sucessfully without errors, FALSE otherwise.
* @param Doctrine_Connection|null $conn optional connection parameter
* @return bool TRUE if the record was saved successfully without errors, FALSE otherwise.
* @throws Exception
*/
public function trySave(?Doctrine_Connection $conn = null) {
public function trySave(?Doctrine_Connection $conn = null): bool
{
try {
$this->save($conn);
return true;
Expand Down