whitespace switch for code layout

This commit is contained in:
Mikael Nordfeldth 2016-01-01 18:43:37 +01:00
parent e02c10a589
commit f4309ed715
1 changed files with 10 additions and 11 deletions

View File

@ -2786,22 +2786,21 @@ class Notice extends Managed_DataObject
public function getParent() public function getParent()
{ {
$reply_to_id = null; $reply_to_id = null;
if (empty($this->reply_to)) { if (empty($this->reply_to)) {
throw new NoParentNoticeException($this); throw new NoParentNoticeException($this);
} }
// The reply_to ID in the table Notice could exist with a number // The reply_to ID in the table Notice could exist with a number
// however, the replied to notice might not exist in the database. // however, the replied to notice might not exist in the database.
// Thus we need to catch the exception and throw the NoParentNoticeException else // Thus we need to catch the exception and throw the NoParentNoticeException else
// the timeline will not display correctly. // the timeline will not display correctly.
try { try {
$reply_to_id = self::getByID($this->reply_to); $reply_to_id = self::getByID($this->reply_to);
} catch(Exception $e){ } catch(Exception $e){
throw new NoParentNoticeException($this); throw new NoParentNoticeException($this);
} }
return $reply_to_id; return $reply_to_id;
} }