Skip to content

Commit e2004d4

Browse files
authored
Smart Search: Removing dependency on CMSObject (#43795)
Thanks @Hackwar & testers one more done!
1 parent abc5c23 commit e2004d4

File tree

3 files changed

+8
-10
lines changed

3 files changed

+8
-10
lines changed

administrator/components/com_finder/src/Indexer/Indexer.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
use Joomla\CMS\Component\ComponentHelper;
1414
use Joomla\CMS\Factory;
15-
use Joomla\CMS\Object\CMSObject;
1615
use Joomla\CMS\Plugin\PluginHelper;
1716
use Joomla\CMS\Profiler\Profiler;
1817
use Joomla\Database\DatabaseInterface;
@@ -83,7 +82,7 @@ class Indexer
8382
/**
8483
* The indexer state object.
8584
*
86-
* @var CMSObject
85+
* @var \stdClass
8786
* @since 2.5
8887
*/
8988
public static $state;
@@ -146,7 +145,7 @@ public function __construct(?DatabaseInterface $db = null)
146145
/**
147146
* Method to get the indexer state.
148147
*
149-
* @return CMSObject The indexer state object.
148+
* @return \stdClass The indexer state object.
150149
*
151150
* @since 2.5
152151
*/
@@ -163,7 +162,7 @@ public static function getState()
163162

164163
// If the state is empty, load the values for the first time.
165164
if (empty($data)) {
166-
$data = new CMSObject();
165+
$data = new \stdClass();
167166
$data->force = false;
168167

169168
// Load the default configuration options.
@@ -228,7 +227,7 @@ public static function getState()
228227
/**
229228
* Method to set the indexer state.
230229
*
231-
* @param CMSObject $data A new indexer state object.
230+
* @param \stdClass $data A new indexer state object.
232231
*
233232
* @return boolean True on success, false on failure.
234233
*
@@ -237,7 +236,7 @@ public static function getState()
237236
public static function setState($data)
238237
{
239238
// Check the state object.
240-
if (empty($data) || !$data instanceof CMSObject) {
239+
if (empty($data) || !$data instanceof \stdClass) {
241240
return false;
242241
}
243242

administrator/components/com_finder/src/Model/StatisticsModel.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212

1313
use Joomla\CMS\Factory;
1414
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
15-
use Joomla\CMS\Object\CMSObject;
1615
use Joomla\CMS\Plugin\PluginHelper;
1716

1817
// phpcs:disable PSR1.Files.SideEffects
@@ -29,7 +28,7 @@ class StatisticsModel extends BaseDatabaseModel
2928
/**
3029
* Method to get the component statistics
3130
*
32-
* @return CMSObject The component statistics
31+
* @return \stdClass The component statistics
3332
*
3433
* @since 2.5
3534
*/
@@ -38,7 +37,7 @@ public function getData()
3837
// Initialise
3938
$db = $this->getDatabase();
4039
$query = $db->getQuery(true);
41-
$data = new CMSObject();
40+
$data = new \stdClass();
4241

4342
$query->select('COUNT(term_id)')
4443
->from($db->quoteName('#__finder_terms'));

administrator/components/com_finder/src/View/Statistics/HtmlView.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class HtmlView extends BaseHtmlView
2828
/**
2929
* The index statistics
3030
*
31-
* @var \Joomla\CMS\Object\CMSObject
31+
* @var \stdClass
3232
*
3333
* @since 3.6.1
3434
*/

0 commit comments

Comments
 (0)