From a5e685a0d9fda4405cf5f9d84606010f787c684a Mon Sep 17 00:00:00 2001 From: Artem Vasilev Date: Tue, 12 Mar 2024 13:31:13 +0300 Subject: [PATCH] Update php doc --- .../src/Model/GetItemByIdentifierTrait.php | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/com_oauthserver/administrator/src/Model/GetItemByIdentifierTrait.php b/com_oauthserver/administrator/src/Model/GetItemByIdentifierTrait.php index 46c063a..a8f0f56 100644 --- a/com_oauthserver/administrator/src/Model/GetItemByIdentifierTrait.php +++ b/com_oauthserver/administrator/src/Model/GetItemByIdentifierTrait.php @@ -22,7 +22,7 @@ trait GetItemByIdentifierTrait /** * @param $identifier * - * @return object|bool + * @return CMSObject|bool * @throws \Exception * @since version */ @@ -36,9 +36,12 @@ trait GetItemByIdentifierTrait if ($return === false) { // If there was no underlying error, then the false means there simply was not a row in the db for this $pk. - if (!$table->getError()) { + if (!$table->getError()) + { $this->setError(Text::_('JLIB_APPLICATION_ERROR_NOT_EXIST')); - } else { + } + else + { $this->setError($table->getError()); } @@ -49,7 +52,8 @@ trait GetItemByIdentifierTrait $properties = $table->getProperties(1); $item = ArrayHelper::toObject($properties, CMSObject::class); - if (property_exists($item, 'params')) { + if (property_exists($item, 'params')) + { $registry = new Registry($item->params); $item->params = $registry->toArray(); }