Skip to content

Commit 91a6c4c

Browse files
authored
Change the getItem return type to stdClass abd make the CMSObject inherit it (#42717)
1 parent 9898eb6 commit 91a6c4c

File tree

7 files changed

+8
-11
lines changed

7 files changed

+8
-11
lines changed

administrator/components/com_guidedtours/src/Model/StepModel.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
use Joomla\CMS\Factory;
1414
use Joomla\CMS\Language\Text;
1515
use Joomla\CMS\MVC\Model\AdminModel;
16-
use Joomla\CMS\Object\CMSObject;
1716
use Joomla\CMS\Table\Table;
1817
use Joomla\Component\Guidedtours\Administrator\Helper\GuidedtoursHelper;
1918

@@ -232,7 +231,7 @@ protected function loadFormData()
232231
*
233232
* @param integer $pk The id of the primary key.
234233
*
235-
* @return CMSObject|boolean Object on success, false on failure.
234+
* @return \stdClass|boolean Object on success, false on failure.
236235
*
237236
* @since 4.3.0
238237
*/

administrator/components/com_guidedtours/src/Model/TourModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ protected function loadFormData()
191191
*
192192
* @param integer|string $pk The id or uid of the tour.
193193
*
194-
* @return CMSObject|boolean Object on success, false on failure.
194+
* @return \stdClass|boolean Object on success, false on failure.
195195
*
196196
* @since 4.3.0
197197
*/

administrator/components/com_installer/src/Model/UpdatesiteModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ protected function loadFormData()
7878
*
7979
* @param integer $pk The id of the primary key.
8080
*
81-
* @return CMSObject|boolean Object on success, false on failure.
81+
* @return \stdClass|boolean Object on success, false on failure.
8282
*
8383
* @since 4.0.0
8484
*/

administrator/components/com_mails/src/Model/TemplateModel.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ public function getForm($data = [], $loadData = true)
148148
*
149149
* @param integer $pk The id of the primary key.
150150
*
151-
* @return CMSObject|boolean Object on success, false on failure.
151+
* @return \stdClass|boolean Object on success, false on failure.
152152
*
153153
* @since 4.0.0
154154
*/
@@ -195,7 +195,7 @@ public function getItem($pk = null)
195195
*
196196
* @param integer $pk The id of the primary key.
197197
*
198-
* @return CMSObject|boolean Object on success, false on failure.
198+
* @return \stdClass|boolean Object on success, false on failure.
199199
*
200200
* @since 4.0.0
201201
*/

libraries/src/MVC/Model/AdminModel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -977,7 +977,7 @@ protected function generateNewTitle($categoryId, $alias, $title)
977977
*
978978
* @param integer $pk The id of the primary key.
979979
*
980-
* @return CMSObject|boolean Object on success, false on failure.
980+
* @return \stdClass|boolean Object on success, false on failure.
981981
*
982982
* @since 1.6
983983
*/

libraries/src/Object/CMSObject.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@
2525
* Use \stdClass or \Joomla\Registry\Registry instead.
2626
* Example: new \Joomla\Registry\Registry();
2727
*/
28-
#[\AllowDynamicProperties]
29-
class CMSObject
28+
class CMSObject extends \stdClass
3029
{
3130
use LegacyErrorHandlingTrait;
3231
use LegacyPropertyManagementTrait;

libraries/src/Workflow/WorkflowPluginTrait.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
namespace Joomla\CMS\Workflow;
1111

1212
use Joomla\CMS\Form\Form;
13-
use Joomla\CMS\Object\CMSObject;
1413

1514
// phpcs:disable PSR1.Files.SideEffects
1615
\defined('_JEXEC') or die;
@@ -62,7 +61,7 @@ protected function enhanceWorkflowTransitionForm(Form $form, $data)
6261
*
6362
* @param int|null $workflowId ID of the workflow
6463
*
65-
* @return CMSObject|boolean Object on success, false on failure.
64+
* @return \stdClass|boolean Object on success, false on failure.
6665
*
6766
* @since 4.0.0
6867
*/

0 commit comments

Comments
 (0)