Skip to content

Commit

Permalink
[5.2] Fixing typehint for getListQuery to QueryInterface (joomla#43265)
Browse files Browse the repository at this point in the history
* Fixing typehint for getListQuery to QueryInterface

* Missed 2 things

* Updating docblock comments

* docblock fixes
  • Loading branch information
Hackwar authored and dgrammatiko committed Oct 17, 2024
1 parent 10fd8b4 commit fbae8dd
Show file tree
Hide file tree
Showing 65 changed files with 170 additions and 143 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,8 @@
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\Database\DatabaseIterator;
use Joomla\Database\DatabaseQuery;
use Joomla\Database\ParameterType;
use Joomla\Database\QueryInterface;
use Joomla\Utilities\ArrayHelper;

// phpcs:disable PSR1.Files.SideEffects
Expand Down Expand Up @@ -79,7 +79,7 @@ protected function populateState($ordering = 'a.id', $direction = 'desc')
/**
* Build an SQL query to load the list data.
*
* @return DatabaseQuery
* @return QueryInterface
*
* @since 3.9.0
*
Expand Down Expand Up @@ -298,7 +298,7 @@ public function getLogDataAsIterator($pks = null)
*
* @param integer[]|null $pks An optional array of log record IDs to load
*
* @return DatabaseQuery
* @return QueryInterface
*
* @since 3.9.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
use Joomla\Component\Associations\Administrator\Helper\AssociationsHelper;
use Joomla\Database\Exception\ExecutionFailureException;
use Joomla\Database\ParameterType;
use Joomla\Database\QueryInterface;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
Expand Down Expand Up @@ -152,7 +153,7 @@ protected function getStoreId($id = '')
/**
* Build an SQL query to load the list data.
*
* @return \Joomla\Database\DatabaseQuery|boolean
* @return QueryInterface|boolean
*
* @since 3.7.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\CMS\Table\Table;
use Joomla\Database\ParameterType;
use Joomla\Database\QueryInterface;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
Expand Down Expand Up @@ -94,7 +95,7 @@ public function &getCategoryOrders()
/**
* Build an SQL query to load the list data.
*
* @return \Joomla\Database\DatabaseQuery
* @return QueryInterface
*
* @since 1.6
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\Database\ParameterType;
use Joomla\Database\QueryInterface;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
Expand Down Expand Up @@ -94,7 +95,7 @@ protected function getStoreId($id = '')
/**
* Build an SQL query to load the list data.
*
* @return \Joomla\Database\DatabaseQuery
* @return QueryInterface
*/
protected function getListQuery()
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\Database\ParameterType;
use Joomla\Database\QueryInterface;
use Joomla\Filesystem\File;
use Joomla\Filesystem\Folder;
use Joomla\String\StringHelper;
Expand Down Expand Up @@ -87,7 +88,7 @@ protected function populateState($ordering = 'b.name', $direction = 'asc')
/**
* Build an SQL query to load the list data.
*
* @return \Joomla\Database\DatabaseQuery
* @return QueryInterface
*
* @since 1.6
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\CMS\Table\Table;
use Joomla\Database\DatabaseQuery;
use Joomla\Database\ParameterType;
use Joomla\Database\QueryInterface;
use Joomla\Utilities\ArrayHelper;

// phpcs:disable PSR1.Files.SideEffects
Expand Down Expand Up @@ -156,7 +156,7 @@ protected function getStoreId($id = '')
/**
* Method to get a database query to list categories.
*
* @return \Joomla\Database\DatabaseQuery
* @return QueryInterface
*
* @since 1.6
*/
Expand Down Expand Up @@ -493,7 +493,7 @@ public function countItems(&$items, $extension)
/**
* Manipulate the query to be used to evaluate if this is an Empty State to provide specific conditions for this extension.
*
* @return DatabaseQuery
* @return QueryInterface
*
* @since 4.0.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\CMS\Table\Table;
use Joomla\Database\ParameterType;
use Joomla\Database\QueryInterface;
use Joomla\Utilities\ArrayHelper;

// phpcs:disable PSR1.Files.SideEffects
Expand Down Expand Up @@ -135,7 +136,7 @@ protected function getStoreId($id = '')
/**
* Build an SQL query to load the list data.
*
* @return \Joomla\Database\DatabaseQuery
* @return QueryInterface
*
* @since 1.6
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Joomla\CMS\Table\Table;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Database\ParameterType;
use Joomla\Database\QueryInterface;
use Joomla\Registry\Registry;
use Joomla\Utilities\ArrayHelper;

Expand Down Expand Up @@ -217,7 +218,7 @@ protected function getStoreId($id = '')
/**
* Build an SQL query to load the list data.
*
* @return \Joomla\Database\DatabaseQuery
* @return QueryInterface
*
* @since 1.6
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
namespace Joomla\Component\Content\Administrator\Model;

// phpcs:disable PSR1.Files.SideEffects
use Joomla\Database\QueryInterface;

\defined('_JEXEC') or die;
// phpcs:enable PSR1.Files.SideEffects

Expand Down Expand Up @@ -88,7 +90,7 @@ protected function populateState($ordering = 'a.title', $direction = 'asc')
/**
* Build an SQL query to load the list data.
*
* @return \Joomla\Database\DatabaseQuery
* @return QueryInterface
*
* @since 4.0.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
use Joomla\CMS\Table\ContentType;
use Joomla\CMS\Table\Table;
use Joomla\Database\ParameterType;
use Joomla\Database\QueryInterface;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
Expand Down Expand Up @@ -317,7 +318,7 @@ protected function populateState($ordering = 'h.save_date', $direction = 'DESC')
/**
* Build an SQL query to load the list data.
*
* @return \Joomla\Database\DatabaseQuery
* @return QueryInterface
*
* @since 3.2
*/
Expand Down
5 changes: 3 additions & 2 deletions administrator/components/com_fields/src/Model/FieldsModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\Component\Fields\Administrator\Helper\FieldsHelper;
use Joomla\Database\ParameterType;
use Joomla\Database\QueryInterface;
use Joomla\Registry\Registry;
use Joomla\Utilities\ArrayHelper;

Expand Down Expand Up @@ -129,9 +130,9 @@ protected function getStoreId($id = '')
}

/**
* Method to get a DatabaseQuery object for retrieving the data set from a database.
* Method to get a QueryInterface object for retrieving the data set from a database.
*
* @return \Joomla\Database\DatabaseQuery A DatabaseQuery object to retrieve the data set.
* @return QueryInterface An object implementing QueryInterface to retrieve the data set.
*
* @since 3.7.0
*/
Expand Down
5 changes: 3 additions & 2 deletions administrator/components/com_fields/src/Model/GroupsModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\Database\ParameterType;
use Joomla\Database\QueryInterface;
use Joomla\Registry\Registry;
use Joomla\Utilities\ArrayHelper;

Expand Down Expand Up @@ -117,9 +118,9 @@ protected function getStoreId($id = '')
}

/**
* Method to get a DatabaseQuery object for retrieving the data set from a database.
* Method to get a QueryInterface object for retrieving the data set from a database.
*
* @return \Joomla\Database\DatabaseQuery A DatabaseQuery object to retrieve the data set.
* @return QueryInterface An object implementing QueryInterface to retrieve the data set.
*
* @since 3.7.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\Database\QueryInterface;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
Expand Down Expand Up @@ -53,7 +54,7 @@ public function __construct($config = [], MVCFactoryInterface $factory = null)
/**
* Build an SQL query to load the list data.
*
* @return \Joomla\Database\DatabaseQuery
* @return QueryInterface
*
* @since 2.5
*/
Expand Down
3 changes: 2 additions & 1 deletion administrator/components/com_finder/src/Model/IndexModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\Database\QueryInterface;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
Expand Down Expand Up @@ -174,7 +175,7 @@ public function delete(&$pks)
/**
* Build an SQL query to load the list data.
*
* @return \Joomla\Database\DatabaseQuery
* @return QueryInterface
*
* @since 2.5
*/
Expand Down
3 changes: 2 additions & 1 deletion administrator/components/com_finder/src/Model/MapsModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\Database\DatabaseQuery;
use Joomla\Database\QueryInterface;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
Expand Down Expand Up @@ -155,7 +156,7 @@ public function delete(&$pks)
/**
* Build an SQL query to load the list data.
*
* @return \Joomla\Database\DatabaseQuery
* @return QueryInterface
*
* @since 2.5
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\Database\QueryInterface;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
Expand Down Expand Up @@ -96,7 +97,7 @@ protected function getStoreId($id = '')
/**
* Build an SQL query to load the list data.
*
* @return \Joomla\Database\DatabaseQuery
* @return QueryInterface
*
* @since 4.0.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\Component\Guidedtours\Administrator\Helper\GuidedtoursHelper;
use Joomla\Database\DatabaseQuery;
use Joomla\Database\ParameterType;
use Joomla\Database\QueryInterface;
use Joomla\Registry\Registry;
use Joomla\Utilities\ArrayHelper;

Expand Down Expand Up @@ -62,7 +62,7 @@ public function __construct($config = [])
/**
* Provide a query to be used to evaluate if this is an Empty State, can be overridden in the model to provide granular control.
*
* @return DatabaseQuery
* @return QueryInterface
*
* @since 4.3.0
*/
Expand Down Expand Up @@ -138,7 +138,7 @@ protected function getStoreId($id = '')
/**
* Build an SQL query to load the list data.
*
* @return \Joomla\Database\DatabaseQuery
* @return QueryInterface
*
* @since 4.3.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\Component\Guidedtours\Administrator\Helper\GuidedtoursHelper;
use Joomla\Database\ParameterType;
use Joomla\Database\QueryInterface;
use Joomla\Registry\Registry;
use Joomla\Utilities\ArrayHelper;

Expand Down Expand Up @@ -108,7 +109,7 @@ public function getFilterForm($data = [], $loadData = true)
/**
* Method to get the data that should be injected in the form.
*
* @return string The query to database.
* @return QueryInterface The query to database.
*
* @since 4.3.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@
use Joomla\CMS\Table\Extension;
use Joomla\CMS\Version;
use Joomla\Component\Installer\Administrator\Helper\InstallerHelper;
use Joomla\Database\DatabaseQuery;
use Joomla\Database\Exception\ExecutionFailureException;
use Joomla\Database\ParameterType;
use Joomla\Database\QueryInterface;
use Joomla\Registry\Registry;

\JLoader::register('JoomlaInstallerScript', JPATH_ADMINISTRATOR . '/components/com_admin/script.php');
Expand Down Expand Up @@ -320,7 +320,7 @@ public function getItems()
/**
* Method to get the database query
*
* @return DatabaseQuery The database query
* @return QueryInterface The database query
*
* @since 4.0.0
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
use Joomla\CMS\Installer\Installer;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\Database\DatabaseQuery;
use Joomla\Database\Exception\ExecutionFailureException;
use Joomla\Database\ParameterType;
use Joomla\Database\QueryInterface;
use Joomla\Utilities\ArrayHelper;

// phpcs:disable PSR1.Files.SideEffects
Expand Down Expand Up @@ -89,7 +89,7 @@ protected function populateState($ordering = 'name', $direction = 'asc')
/**
* Method to get the database query.
*
* @return DatabaseQuery The database query
* @return QueryInterface The database query
*
* @since 3.1
*/
Expand Down Expand Up @@ -280,7 +280,7 @@ public function purge()
/**
* Manipulate the query to be used to evaluate if this is an Empty State to provide specific conditions for this extension.
*
* @return DatabaseQuery
* @return QueryInterface
*
* @since 4.0.0
*/
Expand Down
Loading

0 comments on commit fbae8dd

Please sign in to comment.