diff --git a/administrator/components/com_actionlogs/src/Plugin/ActionLogPlugin.php b/administrator/components/com_actionlogs/src/Plugin/ActionLogPlugin.php
index 662c90a14bad..3b2ca52e3a3d 100644
--- a/administrator/components/com_actionlogs/src/Plugin/ActionLogPlugin.php
+++ b/administrator/components/com_actionlogs/src/Plugin/ActionLogPlugin.php
@@ -10,11 +10,11 @@
namespace Joomla\Component\Actionlogs\Administrator\Plugin;
-use Joomla\CMS\Application\CMSApplicationInterface;
use Joomla\CMS\Application\CMSApplication;
-use Joomla\Database\DatabaseDriver;
-use Joomla\Component\Actionlogs\Administrator\Model\ActionlogModel;
+use Joomla\CMS\Application\CMSApplicationInterface;
use Joomla\CMS\Plugin\CMSPlugin;
+use Joomla\Component\Actionlogs\Administrator\Model\ActionlogModel;
+use Joomla\Database\DatabaseDriver;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_admin/script.php b/administrator/components/com_admin/script.php
index e93832dd9d03..3b81bf760ff9 100644
--- a/administrator/components/com_admin/script.php
+++ b/administrator/components/com_admin/script.php
@@ -9,10 +9,6 @@
*
* @phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
*/
-use Joomla\Component\Scheduler\Administrator\Extension\SchedulerComponent;
-use Joomla\Component\Scheduler\Administrator\Model\TaskModel;
-use Joomla\CMS\Table\Asset;
-use Joomla\Component\Cache\Administrator\Model\CacheModel;
use Joomla\CMS\Application\ApplicationHelper;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Extension\ExtensionHelper;
@@ -20,8 +16,12 @@
use Joomla\CMS\Installer\Installer;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Log\Log;
+use Joomla\CMS\Table\Asset;
use Joomla\CMS\Table\Table;
use Joomla\CMS\Uri\Uri;
+use Joomla\Component\Cache\Administrator\Model\CacheModel;
+use Joomla\Component\Scheduler\Administrator\Extension\SchedulerComponent;
+use Joomla\Component\Scheduler\Administrator\Model\TaskModel;
use Joomla\Database\ParameterType;
use Joomla\Filesystem\File;
use Joomla\Filesystem\Folder;
diff --git a/administrator/components/com_admin/src/Model/HelpModel.php b/administrator/components/com_admin/src/Model/HelpModel.php
index bb7e8a24ebf1..18ecf16120ef 100644
--- a/administrator/components/com_admin/src/Model/HelpModel.php
+++ b/administrator/components/com_admin/src/Model/HelpModel.php
@@ -157,7 +157,7 @@ public function &getToc()
foreach ($files as $file) {
$buffer = file_get_contents(JPATH_BASE . '/help/' . $lang_tag . '/' . $file);
- if (in_array(preg_match('#
(.*?)#', $buffer, $m), [0, false], true)) {
+ if (\in_array(preg_match('#(.*?)#', $buffer, $m), [0, false], true)) {
continue;
}
diff --git a/administrator/components/com_associations/src/Controller/AssociationsController.php b/administrator/components/com_associations/src/Controller/AssociationsController.php
index 0cebbb1769f8..d91ac6eb0272 100644
--- a/administrator/components/com_associations/src/Controller/AssociationsController.php
+++ b/administrator/components/com_associations/src/Controller/AssociationsController.php
@@ -10,9 +10,9 @@
namespace Joomla\Component\Associations\Administrator\Controller;
-use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Router\Route;
use Joomla\Component\Associations\Administrator\Helper\AssociationsHelper;
diff --git a/administrator/components/com_associations/src/Helper/AssociationsHelper.php b/administrator/components/com_associations/src/Helper/AssociationsHelper.php
index 2bd2db6ad74e..8083e6e3f0e9 100644
--- a/administrator/components/com_associations/src/Helper/AssociationsHelper.php
+++ b/administrator/components/com_associations/src/Helper/AssociationsHelper.php
@@ -11,7 +11,6 @@
namespace Joomla\Component\Associations\Administrator\Helper;
use Joomla\CMS\Association\AssociationExtensionHelper;
-use Joomla\CMS\Table\Table;
use Joomla\CMS\Association\AssociationExtensionInterface;
use Joomla\CMS\Association\AssociationServiceInterface;
use Joomla\CMS\Factory;
@@ -20,6 +19,7 @@
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
+use Joomla\CMS\Table\Table;
use Joomla\Database\ParameterType;
use Joomla\Registry\Registry;
diff --git a/administrator/components/com_associations/src/View/Associations/HtmlView.php b/administrator/components/com_associations/src/View/Associations/HtmlView.php
index bb6b38a134b0..6c7be63f2c08 100644
--- a/administrator/components/com_associations/src/View/Associations/HtmlView.php
+++ b/administrator/components/com_associations/src/View/Associations/HtmlView.php
@@ -10,17 +10,17 @@
namespace Joomla\Component\Associations\Administrator\View\Associations;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\Registry\Registry;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Associations\Administrator\Helper\AssociationsHelper;
use Joomla\Component\Associations\Administrator\Model\AssociationsModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_banners/src/Controller/BannersController.php b/administrator/components/com_banners/src/Controller/BannersController.php
index a669b6fdbefb..13a5e5c01b29 100644
--- a/administrator/components/com_banners/src/Controller/BannersController.php
+++ b/administrator/components/com_banners/src/Controller/BannersController.php
@@ -10,13 +10,13 @@
namespace Joomla\Component\Banners\Administrator\Controller;
-use Joomla\CMS\MVC\Model\BaseDatabaseModel;
-use Joomla\Component\Banners\Administrator\Model\BannerModel;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Response\JsonResponse;
+use Joomla\Component\Banners\Administrator\Model\BannerModel;
use Joomla\Input\Input;
use Joomla\Utilities\ArrayHelper;
diff --git a/administrator/components/com_banners/src/Controller/ClientsController.php b/administrator/components/com_banners/src/Controller/ClientsController.php
index b0f50781d1a3..ba8c360697f8 100644
--- a/administrator/components/com_banners/src/Controller/ClientsController.php
+++ b/administrator/components/com_banners/src/Controller/ClientsController.php
@@ -10,8 +10,8 @@
namespace Joomla\Component\Banners\Administrator\Controller;
-use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\MVC\Controller\AdminController;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_banners/src/Controller/TracksController.php b/administrator/components/com_banners/src/Controller/TracksController.php
index abbf4088d830..292a42f5c7e2 100644
--- a/administrator/components/com_banners/src/Controller/TracksController.php
+++ b/administrator/components/com_banners/src/Controller/TracksController.php
@@ -10,11 +10,11 @@
namespace Joomla\Component\Banners\Administrator\Controller;
-use Joomla\CMS\MVC\Model\BaseDatabaseModel;
-use Joomla\Component\Banners\Administrator\Model\TracksModel;
use Joomla\CMS\Application\ApplicationHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
+use Joomla\Component\Banners\Administrator\Model\TracksModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_banners/src/Helper/BannersHelper.php b/administrator/components/com_banners/src/Helper/BannersHelper.php
index 094dc8ddbadb..65853fbd7ecc 100644
--- a/administrator/components/com_banners/src/Helper/BannersHelper.php
+++ b/administrator/components/com_banners/src/Helper/BannersHelper.php
@@ -10,13 +10,13 @@
namespace Joomla\Component\Banners\Administrator\Helper;
-use Joomla\Component\Banners\Administrator\Table\ClientTable;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Table\Table;
+use Joomla\Component\Banners\Administrator\Table\ClientTable;
use Joomla\Database\ParameterType;
// phpcs:disable PSR1.Files.SideEffects
diff --git a/administrator/components/com_banners/src/Model/BannerModel.php b/administrator/components/com_banners/src/Model/BannerModel.php
index 3e5f9faa3279..92ae4b65cd9b 100644
--- a/administrator/components/com_banners/src/Model/BannerModel.php
+++ b/administrator/components/com_banners/src/Model/BannerModel.php
@@ -10,8 +10,6 @@
namespace Joomla\Component\Banners\Administrator\Model;
-use Joomla\Component\Banners\Administrator\Table\BannerTable;
-use Joomla\Component\Categories\Administrator\Model\CategoryModel;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
@@ -19,7 +17,9 @@
use Joomla\CMS\Table\Table;
use Joomla\CMS\Table\TableInterface;
use Joomla\CMS\Versioning\VersionableModelTrait;
+use Joomla\Component\Banners\Administrator\Table\BannerTable;
use Joomla\Component\Categories\Administrator\Helper\CategoriesHelper;
+use Joomla\Component\Categories\Administrator\Model\CategoryModel;
use Joomla\Database\ParameterType;
// phpcs:disable PSR1.Files.SideEffects
@@ -447,7 +447,7 @@ public function save($data)
$origTable->load($input->getInt('id'));
if ($data['name'] == $origTable->name) {
- [$name, $alias] = $this->generateNewTitle($data['catid'], $data['alias'], $data['name']);
+ [$name, $alias] = $this->generateNewTitle($data['catid'], $data['alias'], $data['name']);
$data['name'] = $name;
$data['alias'] = $alias;
} elseif ($data['alias'] == $origTable->alias) {
diff --git a/administrator/components/com_banners/src/Model/ClientModel.php b/administrator/components/com_banners/src/Model/ClientModel.php
index 6798bce05d05..07b5e5e2a684 100644
--- a/administrator/components/com_banners/src/Model/ClientModel.php
+++ b/administrator/components/com_banners/src/Model/ClientModel.php
@@ -10,8 +10,8 @@
namespace Joomla\Component\Banners\Administrator\Model;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\MVC\Model\AdminModel;
use Joomla\CMS\Table\Table;
use Joomla\CMS\Versioning\VersionableModelTrait;
diff --git a/administrator/components/com_banners/src/Model/DownloadModel.php b/administrator/components/com_banners/src/Model/DownloadModel.php
index 97b0f04b6c7d..adf5642bb922 100644
--- a/administrator/components/com_banners/src/Model/DownloadModel.php
+++ b/administrator/components/com_banners/src/Model/DownloadModel.php
@@ -10,9 +10,9 @@
namespace Joomla\Component\Banners\Administrator\Model;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Application\ApplicationHelper;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\MVC\Model\FormModel;
// phpcs:disable PSR1.Files.SideEffects
diff --git a/administrator/components/com_banners/src/Model/TracksModel.php b/administrator/components/com_banners/src/Model/TracksModel.php
index 44925e6a60ab..d0be7c3c1923 100644
--- a/administrator/components/com_banners/src/Model/TracksModel.php
+++ b/administrator/components/com_banners/src/Model/TracksModel.php
@@ -272,7 +272,7 @@ public function getBaseName()
$categoryId = $this->getState('filter.category_id');
if (is_numeric($categoryId)) {
- $basename = $categoryId > 0 ? str_replace('__CATID__', $categoryId, $basename) : str_replace('__CATID__', '', $basename);
+ $basename = $categoryId > 0 ? str_replace('__CATID__', $categoryId, $basename) : str_replace('__CATID__', '', $basename);
$categoryName = $this->getCategoryName();
$basename = str_replace('__CATNAME__', $categoryName, $basename);
} else {
diff --git a/administrator/components/com_banners/src/View/Client/HtmlView.php b/administrator/components/com_banners/src/View/Client/HtmlView.php
index 78b7f0a507fe..292a94e732e3 100644
--- a/administrator/components/com_banners/src/View/Client/HtmlView.php
+++ b/administrator/components/com_banners/src/View/Client/HtmlView.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Banners\Administrator\View\Client;
-use Joomla\Registry\Registry;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Form;
@@ -21,6 +20,7 @@
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Banners\Administrator\Model\ClientModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_banners/src/View/Clients/HtmlView.php b/administrator/components/com_banners/src/View/Clients/HtmlView.php
index 7387fad0d3f0..04b67be2d337 100644
--- a/administrator/components/com_banners/src/View/Clients/HtmlView.php
+++ b/administrator/components/com_banners/src/View/Clients/HtmlView.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Banners\Administrator\View\Clients;
-use Joomla\Registry\Registry;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
@@ -19,6 +18,7 @@
use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Banners\Administrator\Model\ClientsModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_banners/src/View/Tracks/HtmlView.php b/administrator/components/com_banners/src/View/Tracks/HtmlView.php
index 3cd16a9ab3ce..a8f8bb2c6c1b 100644
--- a/administrator/components/com_banners/src/View/Tracks/HtmlView.php
+++ b/administrator/components/com_banners/src/View/Tracks/HtmlView.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Banners\Administrator\View\Tracks;
-use Joomla\Registry\Registry;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
@@ -20,6 +19,7 @@
use Joomla\CMS\Router\Route;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Banners\Administrator\Model\TracksModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_cache/src/Controller/DisplayController.php b/administrator/components/com_cache/src/Controller/DisplayController.php
index 93e7ca17e36d..79f92f291af8 100644
--- a/administrator/components/com_cache/src/Controller/DisplayController.php
+++ b/administrator/components/com_cache/src/Controller/DisplayController.php
@@ -10,12 +10,12 @@
namespace Joomla\Component\Cache\Administrator\Controller;
-use Joomla\Component\Cache\Administrator\Model\CacheModel;
use Joomla\CMS\Event\Cache\AfterPurgeEvent;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Response\JsonResponse;
+use Joomla\Component\Cache\Administrator\Model\CacheModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_cache/src/View/Cache/HtmlView.php b/administrator/components/com_cache/src/View/Cache/HtmlView.php
index 121be7844f9c..ce288e490a5b 100644
--- a/administrator/components/com_cache/src/View/Cache/HtmlView.php
+++ b/administrator/components/com_cache/src/View/Cache/HtmlView.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Cache\Administrator\View\Cache;
-use Joomla\Registry\Registry;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
@@ -18,6 +17,7 @@
use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Cache\Administrator\Model\CacheModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_categories/src/Controller/CategoriesController.php b/administrator/components/com_categories/src/Controller/CategoriesController.php
index 9210e856bbec..1b55803e7960 100644
--- a/administrator/components/com_categories/src/Controller/CategoriesController.php
+++ b/administrator/components/com_categories/src/Controller/CategoriesController.php
@@ -10,12 +10,12 @@
namespace Joomla\Component\Categories\Administrator\Controller;
-use Joomla\CMS\MVC\Model\BaseDatabaseModel;
-use Joomla\Component\Categories\Administrator\Model\CategoryModel;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Response\JsonResponse;
use Joomla\CMS\Router\Route;
+use Joomla\Component\Categories\Administrator\Model\CategoryModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_categories/src/Controller/CategoryController.php b/administrator/components/com_categories/src/Controller/CategoryController.php
index 565b4896fc47..2dbbb55facd6 100644
--- a/administrator/components/com_categories/src/Controller/CategoryController.php
+++ b/administrator/components/com_categories/src/Controller/CategoryController.php
@@ -10,13 +10,13 @@
namespace Joomla\Component\Categories\Administrator\Controller;
-use Joomla\Component\Categories\Administrator\Model\CategoryModel;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Versioning\VersionableControllerTrait;
+use Joomla\Component\Categories\Administrator\Model\CategoryModel;
use Joomla\Input\Input;
use Joomla\Registry\Registry;
diff --git a/administrator/components/com_categories/src/Field/CategoryeditField.php b/administrator/components/com_categories/src/Field/CategoryeditField.php
index 79eb33764b23..b49e412b0b4f 100644
--- a/administrator/components/com_categories/src/Field/CategoryeditField.php
+++ b/administrator/components/com_categories/src/Field/CategoryeditField.php
@@ -98,9 +98,9 @@ public function setup(\SimpleXMLElement $element, $value, $group = null)
public function __get($name)
{
return match ($name) {
- 'allowAdd' => (bool) $this->$name,
+ 'allowAdd' => (bool) $this->$name,
'customPrefix' => $this->$name,
- default => parent::__get($name),
+ default => parent::__get($name),
};
}
diff --git a/administrator/components/com_categories/src/Model/CategoryModel.php b/administrator/components/com_categories/src/Model/CategoryModel.php
index 5dfbdba509bc..79a18d344504 100644
--- a/administrator/components/com_categories/src/Model/CategoryModel.php
+++ b/administrator/components/com_categories/src/Model/CategoryModel.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Categories\Administrator\Model;
-use Joomla\CMS\Table\Table;
use Joomla\CMS\Access\Rules;
use Joomla\CMS\Association\AssociationServiceInterface;
use Joomla\CMS\Categories\CategoryServiceInterface;
@@ -26,6 +25,7 @@
use Joomla\CMS\MVC\Model\AdminModel;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Table\Category;
+use Joomla\CMS\Table\Table;
use Joomla\CMS\UCM\UCMType;
use Joomla\CMS\Versioning\VersionableModelTrait;
use Joomla\Component\Categories\Administrator\Helper\CategoriesHelper;
@@ -406,16 +406,16 @@ protected function preprocessForm(Form $form, $data, $group = 'content')
$name = 'category' . ($section ? ('.' . $section) : '');
// Looking first in the component forms folder
- $path = Path::clean(JPATH_ADMINISTRATOR . sprintf('/components/%s/forms/%s.xml', $component, $name));
+ $path = Path::clean(JPATH_ADMINISTRATOR . \sprintf('/components/%s/forms/%s.xml', $component, $name));
// Looking in the component models/forms folder (J! 3)
if (!file_exists($path)) {
- $path = Path::clean(JPATH_ADMINISTRATOR . sprintf('/components/%s/models/forms/%s.xml', $component, $name));
+ $path = Path::clean(JPATH_ADMINISTRATOR . \sprintf('/components/%s/models/forms/%s.xml', $component, $name));
}
// Old way: looking in the component folder
if (!file_exists($path)) {
- $path = Path::clean(JPATH_ADMINISTRATOR . sprintf('/components/%s/%s.xml', $component, $name));
+ $path = Path::clean(JPATH_ADMINISTRATOR . \sprintf('/components/%s/%s.xml', $component, $name));
}
if (file_exists($path)) {
@@ -434,7 +434,7 @@ protected function preprocessForm(Form $form, $data, $group = 'content')
} else {
// Try to find the component helper.
$eName = str_replace('com_', '', $component);
- $path = Path::clean(JPATH_ADMINISTRATOR . sprintf('/components/%s/helpers/category.php', $component));
+ $path = Path::clean(JPATH_ADMINISTRATOR . \sprintf('/components/%s/helpers/category.php', $component));
if (file_exists($path)) {
$cName = ucfirst($eName) . ucfirst((string) $section) . 'HelperCategory';
diff --git a/administrator/components/com_categories/src/View/Categories/HtmlView.php b/administrator/components/com_categories/src/View/Categories/HtmlView.php
index 85e566da5ec4..27245f2ee160 100644
--- a/administrator/components/com_categories/src/View/Categories/HtmlView.php
+++ b/administrator/components/com_categories/src/View/Categories/HtmlView.php
@@ -10,10 +10,9 @@
namespace Joomla\Component\Categories\Administrator\View\Categories;
-use Joomla\CMS\Form\Form;
-use Joomla\CMS\WebAsset\WebAssetManager;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
@@ -22,6 +21,7 @@
use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\Button\DropdownButton;
use Joomla\CMS\Toolbar\ToolbarHelper;
+use Joomla\CMS\WebAsset\WebAssetManager;
use Joomla\Component\Categories\Administrator\Model\CategoriesModel;
use Joomla\Filesystem\Path;
@@ -285,11 +285,11 @@ protected function addToolbar()
$name = 'category' . ($section ? ('.' . $section) : '');
// Looking first in the component forms folder
- $path = Path::clean(JPATH_ADMINISTRATOR . sprintf('/components/%s/forms/%s.xml', $component, $name));
+ $path = Path::clean(JPATH_ADMINISTRATOR . \sprintf('/components/%s/forms/%s.xml', $component, $name));
// Looking in the component models/forms folder (J! 3)
if (!file_exists($path)) {
- $path = Path::clean(JPATH_ADMINISTRATOR . sprintf('/components/%s/models/forms/%s.xml', $component, $name));
+ $path = Path::clean(JPATH_ADMINISTRATOR . \sprintf('/components/%s/models/forms/%s.xml', $component, $name));
}
$ref_key = '';
diff --git a/administrator/components/com_categories/src/View/Category/HtmlView.php b/administrator/components/com_categories/src/View/Category/HtmlView.php
index 9ff686a6d5af..fa8d654a89d0 100644
--- a/administrator/components/com_categories/src/View/Category/HtmlView.php
+++ b/administrator/components/com_categories/src/View/Category/HtmlView.php
@@ -10,11 +10,9 @@
namespace Joomla\Component\Categories\Administrator\View\Category;
-use Joomla\CMS\Form\Form;
-use Joomla\Registry\Registry;
-use Joomla\CMS\WebAsset\WebAssetManager;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Helper\TagsHelper;
use Joomla\CMS\Language\Associations;
@@ -23,8 +21,10 @@
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
+use Joomla\CMS\WebAsset\WebAssetManager;
use Joomla\Component\Associations\Administrator\Helper\AssociationsHelper;
use Joomla\Component\Categories\Administrator\Model\CategoryModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_checkin/src/Controller/DisplayController.php b/administrator/components/com_checkin/src/Controller/DisplayController.php
index 064e0b78f225..3f7573cc318a 100644
--- a/administrator/components/com_checkin/src/Controller/DisplayController.php
+++ b/administrator/components/com_checkin/src/Controller/DisplayController.php
@@ -10,10 +10,10 @@
namespace Joomla\Component\Checkin\Administrator\Controller;
-use Joomla\Component\Checkin\Administrator\Model\CheckinModel;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Response\JsonResponse;
+use Joomla\Component\Checkin\Administrator\Model\CheckinModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_checkin/src/View/Checkin/HtmlView.php b/administrator/components/com_checkin/src/View/Checkin/HtmlView.php
index 8002ff0371cb..33a259a85fb1 100644
--- a/administrator/components/com_checkin/src/View/Checkin/HtmlView.php
+++ b/administrator/components/com_checkin/src/View/Checkin/HtmlView.php
@@ -10,14 +10,14 @@
namespace Joomla\Component\Checkin\Administrator\View\Checkin;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\Registry\Registry;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Checkin\Administrator\Model\CheckinModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_config/src/Controller/ApplicationController.php b/administrator/components/com_config/src/Controller/ApplicationController.php
index bc2757cff7a0..d90a6b3471a4 100644
--- a/administrator/components/com_config/src/Controller/ApplicationController.php
+++ b/administrator/components/com_config/src/Controller/ApplicationController.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Config\Administrator\Controller;
-use Joomla\Component\Config\Administrator\Model\ApplicationModel;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Application\CMSWebApplicationInterface;
use Joomla\CMS\Language\Text;
@@ -19,6 +18,7 @@
use Joomla\CMS\Response\JsonResponse;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
+use Joomla\Component\Config\Administrator\Model\ApplicationModel;
use Joomla\Input\Input;
// phpcs:disable PSR1.Files.SideEffects
diff --git a/administrator/components/com_config/src/Controller/ComponentController.php b/administrator/components/com_config/src/Controller/ComponentController.php
index 84d10728b3c6..085425af6038 100644
--- a/administrator/components/com_config/src/Controller/ComponentController.php
+++ b/administrator/components/com_config/src/Controller/ComponentController.php
@@ -10,13 +10,13 @@
namespace Joomla\Component\Config\Administrator\Controller;
-use Joomla\Component\Config\Administrator\Model\ComponentModel;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
+use Joomla\Component\Config\Administrator\Model\ComponentModel;
use Joomla\Input\Input;
// phpcs:disable PSR1.Files.SideEffects
@@ -69,7 +69,7 @@ public function save($key = null, $urlVar = null)
$id = $this->input->get('id', null, 'INT');
$option = $this->input->get('component');
$user = $this->app->getIdentity();
- $context = sprintf('%s.edit.%s.%s', $this->option, $this->context, $option);
+ $context = \sprintf('%s.edit.%s.%s', $this->option, $this->context, $option);
/** @var ComponentModel $model */
$model = $this->getModel('Component', 'Administrator');
@@ -192,7 +192,7 @@ public function cancel($key = null)
$component = $this->input->get('component');
// Clear session data.
- $this->app->setUserState(sprintf('%s.edit.%s.%s.data', $this->option, $this->context, $component), null);
+ $this->app->setUserState(\sprintf('%s.edit.%s.%s.data', $this->option, $this->context, $component), null);
// Calculate redirect URL
$returnUri = $this->input->post->get('return', null, 'base64');
diff --git a/administrator/components/com_config/src/Controller/RequestController.php b/administrator/components/com_config/src/Controller/RequestController.php
index 23582c5b97c0..cc905d9a4148 100644
--- a/administrator/components/com_config/src/Controller/RequestController.php
+++ b/administrator/components/com_config/src/Controller/RequestController.php
@@ -10,9 +10,9 @@
namespace Joomla\Component\Config\Administrator\Controller;
-use Joomla\Component\Config\Administrator\Model\ApplicationModel;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
+use Joomla\Component\Config\Administrator\Model\ApplicationModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_config/src/View/Application/HtmlView.php b/administrator/components/com_config/src/View/Application/HtmlView.php
index 8d95b14511f5..d89d35b219ed 100644
--- a/administrator/components/com_config/src/View/Application/HtmlView.php
+++ b/administrator/components/com_config/src/View/Application/HtmlView.php
@@ -10,16 +10,16 @@
namespace Joomla\Component\Config\Administrator\View\Application;
-use Joomla\CMS\User\User;
-use Joomla\Registry\Registry;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
+use Joomla\CMS\User\User;
use Joomla\Component\Config\Administrator\Helper\ConfigHelper;
use Joomla\Component\Config\Administrator\Model\ApplicationModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_config/src/View/Component/HtmlView.php b/administrator/components/com_config/src/View/Component/HtmlView.php
index 36c89978e009..2f2e8b4a1ad7 100644
--- a/administrator/components/com_config/src/View/Component/HtmlView.php
+++ b/administrator/components/com_config/src/View/Component/HtmlView.php
@@ -10,15 +10,15 @@
namespace Joomla\Component\Config\Administrator\View\Component;
-use Joomla\Registry\Registry;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Component\ComponentRecord;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Config\Administrator\Helper\ConfigHelper;
use Joomla\Component\Config\Administrator\Model\ComponentModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_contact/src/Controller/ContactController.php b/administrator/components/com_contact/src/Controller/ContactController.php
index 5a1bcc1c6a82..381d04719d71 100644
--- a/administrator/components/com_contact/src/Controller/ContactController.php
+++ b/administrator/components/com_contact/src/Controller/ContactController.php
@@ -10,11 +10,11 @@
namespace Joomla\Component\Contact\Administrator\Controller;
-use Joomla\Component\Contact\Administrator\Model\ContactModel;
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Versioning\VersionableControllerTrait;
+use Joomla\Component\Contact\Administrator\Model\ContactModel;
use Joomla\Utilities\ArrayHelper;
// phpcs:disable PSR1.Files.SideEffects
diff --git a/administrator/components/com_contact/src/Controller/ContactsController.php b/administrator/components/com_contact/src/Controller/ContactsController.php
index 040b2a9b8e4f..0ef86a06a84b 100644
--- a/administrator/components/com_contact/src/Controller/ContactsController.php
+++ b/administrator/components/com_contact/src/Controller/ContactsController.php
@@ -10,13 +10,13 @@
namespace Joomla\Component\Contact\Administrator\Controller;
-use Joomla\Component\Contact\Administrator\Model\ContactModel;
-use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Response\JsonResponse;
+use Joomla\Component\Contact\Administrator\Model\ContactModel;
use Joomla\Input\Input;
use Joomla\Utilities\ArrayHelper;
diff --git a/administrator/components/com_contact/src/Model/ContactModel.php b/administrator/components/com_contact/src/Model/ContactModel.php
index 5edbfce355d4..30f6352f8384 100644
--- a/administrator/components/com_contact/src/Model/ContactModel.php
+++ b/administrator/components/com_contact/src/Model/ContactModel.php
@@ -10,8 +10,6 @@
namespace Joomla\Component\Contact\Administrator\Model;
-use Joomla\Component\Categories\Administrator\Model\CategoryModel;
-use Joomla\CMS\Table\Table;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\TagsHelper;
@@ -20,8 +18,10 @@
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Model\AdminModel;
use Joomla\CMS\String\PunycodeHelper;
+use Joomla\CMS\Table\Table;
use Joomla\CMS\Versioning\VersionableModelTrait;
use Joomla\Component\Categories\Administrator\Helper\CategoriesHelper;
+use Joomla\Component\Categories\Administrator\Model\CategoryModel;
use Joomla\Database\ParameterType;
use Joomla\Registry\Registry;
use Joomla\Utilities\ArrayHelper;
@@ -322,7 +322,7 @@ public function save($data)
$origTable->load($input->getInt('id'));
if ($data['name'] == $origTable->name) {
- [$name, $alias] = $this->generateNewTitle($data['catid'], $data['alias'], $data['name']);
+ [$name, $alias] = $this->generateNewTitle($data['catid'], $data['alias'], $data['name']);
$data['name'] = $name;
$data['alias'] = $alias;
} elseif ($data['alias'] == $origTable->alias) {
diff --git a/administrator/components/com_contact/src/View/Contact/HtmlView.php b/administrator/components/com_contact/src/View/Contact/HtmlView.php
index 3811e27c98bb..5076368f9cf3 100644
--- a/administrator/components/com_contact/src/View/Contact/HtmlView.php
+++ b/administrator/components/com_contact/src/View/Contact/HtmlView.php
@@ -10,10 +10,9 @@
namespace Joomla\Component\Contact\Administrator\View\Contact;
-use Joomla\CMS\Form\Form;
-use Joomla\Registry\Registry;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
@@ -22,6 +21,7 @@
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Contact\Administrator\Model\ContactModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_contact/src/View/Contacts/HtmlView.php b/administrator/components/com_contact/src/View/Contacts/HtmlView.php
index 0fa9e563294a..a4af77fd08af 100644
--- a/administrator/components/com_contact/src/View/Contacts/HtmlView.php
+++ b/administrator/components/com_contact/src/View/Contacts/HtmlView.php
@@ -10,18 +10,18 @@
namespace Joomla\Component\Contact\Administrator\View\Contacts;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\Registry\Registry;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\Button\DropdownButton;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Contact\Administrator\Model\ContactsModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_content/src/Controller/ArticleController.php b/administrator/components/com_content/src/Controller/ArticleController.php
index e8690570b79c..4c7edb17f3a7 100644
--- a/administrator/components/com_content/src/Controller/ArticleController.php
+++ b/administrator/components/com_content/src/Controller/ArticleController.php
@@ -10,13 +10,13 @@
namespace Joomla\Component\Content\Administrator\Controller;
-use Joomla\Component\Content\Administrator\Model\ArticleModel;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Versioning\VersionableControllerTrait;
+use Joomla\Component\Content\Administrator\Model\ArticleModel;
use Joomla\Input\Input;
use Joomla\Utilities\ArrayHelper;
diff --git a/administrator/components/com_content/src/Controller/ArticlesController.php b/administrator/components/com_content/src/Controller/ArticlesController.php
index 1034115d5939..b6b15b7ab0ab 100644
--- a/administrator/components/com_content/src/Controller/ArticlesController.php
+++ b/administrator/components/com_content/src/Controller/ArticlesController.php
@@ -10,14 +10,14 @@
namespace Joomla\Component\Content\Administrator\Controller;
-use Joomla\Component\Content\Administrator\Model\ArticleModel;
-use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Response\JsonResponse;
use Joomla\CMS\Router\Route;
+use Joomla\Component\Content\Administrator\Model\ArticleModel;
use Joomla\Input\Input;
use Joomla\Utilities\ArrayHelper;
diff --git a/administrator/components/com_content/src/Controller/FeaturedController.php b/administrator/components/com_content/src/Controller/FeaturedController.php
index 7e63c82d93d4..ae3c5d70a7e8 100644
--- a/administrator/components/com_content/src/Controller/FeaturedController.php
+++ b/administrator/components/com_content/src/Controller/FeaturedController.php
@@ -10,10 +10,10 @@
namespace Joomla\Component\Content\Administrator\Controller;
-use Joomla\Component\Content\Administrator\Model\FeatureModel;
-use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Language\Text;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Response\JsonResponse;
+use Joomla\Component\Content\Administrator\Model\FeatureModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_content/src/Event/Model/FeatureEvent.php b/administrator/components/com_content/src/Event/Model/FeatureEvent.php
index fdc7906eef19..29a5834a4717 100644
--- a/administrator/components/com_content/src/Event/Model/FeatureEvent.php
+++ b/administrator/components/com_content/src/Event/Model/FeatureEvent.php
@@ -35,15 +35,15 @@ class FeatureEvent extends AbstractImmutableEvent
public function __construct($name, array $arguments = [])
{
if (!isset($arguments['extension'])) {
- throw new \BadMethodCallException(sprintf("Argument 'extension' of event %s is required but has not been provided", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'extension' of event %s is required but has not been provided", $this->name));
}
if (!isset($arguments['extension']) || !\is_string($arguments['extension'])) {
- throw new \BadMethodCallException(sprintf("Argument 'extension' of event %s is not of type 'string'", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'extension' of event %s is not of type 'string'", $this->name));
}
if (!str_contains($arguments['extension'], '.')) {
- throw new \BadMethodCallException(sprintf("Argument 'extension' of event %s has wrong format. Valid format: 'component.section'", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'extension' of event %s has wrong format. Valid format: 'component.section'", $this->name));
}
if (!\array_key_exists('extensionName', $arguments) || !\array_key_exists('section', $arguments)) {
@@ -54,17 +54,17 @@ public function __construct($name, array $arguments = [])
}
if (!isset($arguments['pks']) || !\is_array($arguments['pks'])) {
- throw new \BadMethodCallException(sprintf("Argument 'pks' of event %s is not of type 'array'", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'pks' of event %s is not of type 'array'", $this->name));
}
if (!isset($arguments['value']) || !is_numeric($arguments['value'])) {
- throw new \BadMethodCallException(sprintf("Argument 'value' of event %s is not of type 'numeric'", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'value' of event %s is not of type 'numeric'", $this->name));
}
$arguments['value'] = (int) $arguments['value'];
if ($arguments['value'] !== 0 && $arguments['value'] !== 1) {
- throw new \BadMethodCallException(sprintf("Argument 'value' of event %s is not 0 or 1", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'value' of event %s is not 0 or 1", $this->name));
}
parent::__construct($name, $arguments);
diff --git a/administrator/components/com_content/src/Helper/ContentHelper.php b/administrator/components/com_content/src/Helper/ContentHelper.php
index 204e29a90636..7249350a3326 100644
--- a/administrator/components/com_content/src/Helper/ContentHelper.php
+++ b/administrator/components/com_content/src/Helper/ContentHelper.php
@@ -69,7 +69,7 @@ public static function filterTransitions(array $transitions, int $pk, int $workf
return array_values(
array_filter(
$transitions,
- fn($var) => \in_array($var['from_stage_id'], [-1, $pk]) && $workflowId == $var['workflow_id']
+ fn ($var) => \in_array($var['from_stage_id'], [-1, $pk]) && $workflowId == $var['workflow_id']
)
);
}
diff --git a/administrator/components/com_content/src/Model/ArticleModel.php b/administrator/components/com_content/src/Model/ArticleModel.php
index fa0d1fdf22d5..9ed8ce51756d 100644
--- a/administrator/components/com_content/src/Model/ArticleModel.php
+++ b/administrator/components/com_content/src/Model/ArticleModel.php
@@ -10,8 +10,6 @@
namespace Joomla\Component\Content\Administrator\Model;
-use Joomla\CMS\Table\Table;
-use Joomla\Component\Categories\Administrator\Model\CategoryModel;
use Joomla\CMS\Date\Date;
use Joomla\CMS\Event\AbstractEvent;
use Joomla\CMS\Factory;
@@ -28,12 +26,14 @@
use Joomla\CMS\MVC\Model\WorkflowModelInterface;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\String\PunycodeHelper;
+use Joomla\CMS\Table\Table;
use Joomla\CMS\Table\TableInterface;
use Joomla\CMS\Tag\TaggableTableInterface;
use Joomla\CMS\UCM\UCMType;
use Joomla\CMS\Versioning\VersionableModelTrait;
use Joomla\CMS\Workflow\Workflow;
use Joomla\Component\Categories\Administrator\Helper\CategoriesHelper;
+use Joomla\Component\Categories\Administrator\Model\CategoryModel;
use Joomla\Component\Content\Administrator\Event\Model\FeatureEvent;
use Joomla\Component\Fields\Administrator\Helper\FieldsHelper;
use Joomla\Database\ParameterType;
@@ -738,7 +738,7 @@ public function save($data)
}
if ($data['title'] == $origTable->title) {
- [$title, $alias] = $this->generateNewTitle($data['catid'], $data['alias'], $data['title']);
+ [$title, $alias] = $this->generateNewTitle($data['catid'], $data['alias'], $data['title']);
$data['title'] = $title;
$data['alias'] = $alias;
} elseif ($data['alias'] == $origTable->alias) {
@@ -757,7 +757,7 @@ public function save($data)
if ($table->load(['alias' => $data['alias'], 'catid' => $data['catid']])) {
$msg = Text::_('COM_CONTENT_SAVE_WARNING');
}
- [$title, $alias] = $this->generateNewTitle($data['catid'], $data['alias'], $data['title']);
+ [$title, $alias] = $this->generateNewTitle($data['catid'], $data['alias'], $data['title']);
$data['alias'] = $alias;
if (isset($msg)) {
$app->enqueueMessage($msg, 'warning');
diff --git a/administrator/components/com_content/src/Model/ArticlesModel.php b/administrator/components/com_content/src/Model/ArticlesModel.php
index a6d0a55f1994..77d3a44f844b 100644
--- a/administrator/components/com_content/src/Model/ArticlesModel.php
+++ b/administrator/components/com_content/src/Model/ArticlesModel.php
@@ -10,9 +10,9 @@
namespace Joomla\Component\Content\Administrator\Model;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
diff --git a/administrator/components/com_content/src/View/Article/HtmlView.php b/administrator/components/com_content/src/View/Article/HtmlView.php
index afb7d8d68a01..78d617b00c8c 100644
--- a/administrator/components/com_content/src/View/Article/HtmlView.php
+++ b/administrator/components/com_content/src/View/Article/HtmlView.php
@@ -10,10 +10,9 @@
namespace Joomla\Component\Content\Administrator\View\Article;
-use Joomla\CMS\Form\Form;
-use Joomla\Registry\Registry;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
@@ -25,6 +24,7 @@
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Content\Administrator\Model\ArticleModel;
use Joomla\Component\Content\Site\Helper\RouteHelper;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_content/src/View/Articles/HtmlView.php b/administrator/components/com_content/src/View/Articles/HtmlView.php
index 357dd2985168..4659852b7124 100644
--- a/administrator/components/com_content/src/View/Articles/HtmlView.php
+++ b/administrator/components/com_content/src/View/Articles/HtmlView.php
@@ -10,21 +10,21 @@
namespace Joomla\Component\Content\Administrator\View\Articles;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\Registry\Registry;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Toolbar\Button\DropdownButton;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Component\Content\Administrator\Helper\ContentHelper;
use Joomla\Component\Content\Administrator\Model\ArticlesModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_content/src/View/Featured/HtmlView.php b/administrator/components/com_content/src/View/Featured/HtmlView.php
index c853abc6882c..b8e8cc466b00 100644
--- a/administrator/components/com_content/src/View/Featured/HtmlView.php
+++ b/administrator/components/com_content/src/View/Featured/HtmlView.php
@@ -10,20 +10,20 @@
namespace Joomla\Component\Content\Administrator\View\Featured;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\Registry\Registry;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Component\ComponentHelper;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Toolbar\Button\DropdownButton;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Component\Content\Administrator\Helper\ContentHelper;
use Joomla\Component\Content\Administrator\Model\FeaturedModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_contenthistory/src/Controller/HistoryController.php b/administrator/components/com_contenthistory/src/Controller/HistoryController.php
index 914f09ae19f6..cd2c344e5302 100644
--- a/administrator/components/com_contenthistory/src/Controller/HistoryController.php
+++ b/administrator/components/com_contenthistory/src/Controller/HistoryController.php
@@ -10,9 +10,9 @@
namespace Joomla\Component\Contenthistory\Administrator\Controller;
-use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
diff --git a/administrator/components/com_contenthistory/src/Controller/PreviewController.php b/administrator/components/com_contenthistory/src/Controller/PreviewController.php
index 7667a185c434..f8c9f85b062a 100644
--- a/administrator/components/com_contenthistory/src/Controller/PreviewController.php
+++ b/administrator/components/com_contenthistory/src/Controller/PreviewController.php
@@ -10,8 +10,8 @@
namespace Joomla\Component\Contenthistory\Administrator\Controller;
-use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\MVC\Controller\BaseController;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_contenthistory/src/View/Compare/HtmlView.php b/administrator/components/com_contenthistory/src/View/Compare/HtmlView.php
index ce63e168ca98..0b8afa517b59 100644
--- a/administrator/components/com_contenthistory/src/View/Compare/HtmlView.php
+++ b/administrator/components/com_contenthistory/src/View/Compare/HtmlView.php
@@ -10,10 +10,10 @@
namespace Joomla\Component\Contenthistory\Administrator\View\Compare;
-use Joomla\Registry\Registry;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\Component\Contenthistory\Administrator\Model\CompareModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_contenthistory/src/View/History/HtmlView.php b/administrator/components/com_contenthistory/src/View/History/HtmlView.php
index 92a420336e6c..1eeffc024f3e 100644
--- a/administrator/components/com_contenthistory/src/View/History/HtmlView.php
+++ b/administrator/components/com_contenthistory/src/View/History/HtmlView.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Contenthistory\Administrator\View\History;
-use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
use Joomla\CMS\Filter\InputFilter;
use Joomla\CMS\MVC\View\GenericDataException;
@@ -21,6 +20,7 @@
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarFactoryInterface;
use Joomla\Component\Contenthistory\Administrator\Model\HistoryModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_contenthistory/src/View/Preview/HtmlView.php b/administrator/components/com_contenthistory/src/View/Preview/HtmlView.php
index 49479e880403..bc957e6c3d96 100644
--- a/administrator/components/com_contenthistory/src/View/Preview/HtmlView.php
+++ b/administrator/components/com_contenthistory/src/View/Preview/HtmlView.php
@@ -10,11 +10,11 @@
namespace Joomla\Component\Contenthistory\Administrator\View\Preview;
-use Joomla\Registry\Registry;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\Component\Contenthistory\Administrator\Model\PreviewModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_fields/src/Controller/FieldsController.php b/administrator/components/com_fields/src/Controller/FieldsController.php
index 8220fef42d7b..0206a9cf8f47 100644
--- a/administrator/components/com_fields/src/Controller/FieldsController.php
+++ b/administrator/components/com_fields/src/Controller/FieldsController.php
@@ -10,8 +10,8 @@
namespace Joomla\Component\Fields\Administrator\Controller;
-use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\MVC\Controller\AdminController;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_fields/src/Controller/GroupsController.php b/administrator/components/com_fields/src/Controller/GroupsController.php
index 71cd8bc41576..28954bfc2b94 100644
--- a/administrator/components/com_fields/src/Controller/GroupsController.php
+++ b/administrator/components/com_fields/src/Controller/GroupsController.php
@@ -10,8 +10,8 @@
namespace Joomla\Component\Fields\Administrator\Controller;
-use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\MVC\Controller\AdminController;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_fields/src/Field/SubfieldsField.php b/administrator/components/com_fields/src/Field/SubfieldsField.php
index 2c9d757188c8..66e0ddb20032 100644
--- a/administrator/components/com_fields/src/Field/SubfieldsField.php
+++ b/administrator/components/com_fields/src/Field/SubfieldsField.php
@@ -85,7 +85,7 @@ protected function getOptions()
// Sorting the fields based on the text which is displayed
usort(
$options,
- fn($a, $b) => strcmp($a->text, $b->text)
+ fn ($a, $b) => strcmp($a->text, $b->text)
);
if (\count($options) == 0) {
diff --git a/administrator/components/com_fields/src/Field/TypeField.php b/administrator/components/com_fields/src/Field/TypeField.php
index 703f9902990a..cf7eebd0c71a 100644
--- a/administrator/components/com_fields/src/Field/TypeField.php
+++ b/administrator/components/com_fields/src/Field/TypeField.php
@@ -73,7 +73,7 @@ protected function getOptions()
// Sorting the fields based on the text which is displayed
usort(
$options,
- fn($a, $b) => strcmp($a->text, $b->text)
+ fn ($a, $b) => strcmp($a->text, $b->text)
);
// Load scripts
diff --git a/administrator/components/com_fields/src/Helper/FieldsHelper.php b/administrator/components/com_fields/src/Helper/FieldsHelper.php
index a3bdd08aa866..fdd9137cee54 100644
--- a/administrator/components/com_fields/src/Helper/FieldsHelper.php
+++ b/administrator/components/com_fields/src/Helper/FieldsHelper.php
@@ -175,7 +175,7 @@ public static function getFields(
PluginHelper::importPlugin('fields', null, true, $dispatcher);
$fieldIds = array_map(
- fn($f) => $f->id,
+ fn ($f) => $f->id,
$fields
);
@@ -224,7 +224,7 @@ public static function getFields(
]))->getArgument('result', []);
if (\is_array($value)) {
- $value = array_filter($value, fn($v) => $v !== '' && $v !== null);
+ $value = array_filter($value, fn ($v) => $v !== '' && $v !== null);
$value = $value !== [] ? implode(' ', $value) : '';
}
diff --git a/administrator/components/com_fields/src/Model/FieldModel.php b/administrator/components/com_fields/src/Model/FieldModel.php
index 92ac4a86029e..761b5284a9b5 100644
--- a/administrator/components/com_fields/src/Model/FieldModel.php
+++ b/administrator/components/com_fields/src/Model/FieldModel.php
@@ -145,7 +145,7 @@ public function save($data)
$origTable->load($input->getInt('id'));
if ($data['title'] == $origTable->title) {
- [$title, $name] = $this->generateNewTitle($data['group_id'], $data['name'], $data['title']);
+ [$title, $name] = $this->generateNewTitle($data['group_id'], $data['name'], $data['title']);
$data['title'] = $title;
$data['label'] = $title;
$data['name'] = $name;
diff --git a/administrator/components/com_fields/src/Model/FieldsModel.php b/administrator/components/com_fields/src/Model/FieldsModel.php
index 1129e077b2bc..95246bdff162 100644
--- a/administrator/components/com_fields/src/Model/FieldsModel.php
+++ b/administrator/components/com_fields/src/Model/FieldsModel.php
@@ -11,10 +11,10 @@
namespace Joomla\Component\Fields\Administrator\Model;
use Joomla\CMS\Categories\CategoryInterface;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Categories\CategoryServiceInterface;
use Joomla\CMS\Categories\SectionNotFoundException;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\Component\Fields\Administrator\Helper\FieldsHelper;
diff --git a/administrator/components/com_fields/src/View/Field/HtmlView.php b/administrator/components/com_fields/src/View/Field/HtmlView.php
index 27600bfd0acb..44d5773fec93 100644
--- a/administrator/components/com_fields/src/View/Field/HtmlView.php
+++ b/administrator/components/com_fields/src/View/Field/HtmlView.php
@@ -10,9 +10,8 @@
namespace Joomla\Component\Fields\Administrator\View\Field;
-use Joomla\CMS\Form\Form;
-use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
@@ -21,6 +20,7 @@
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Fields\Administrator\Model\FieldModel;
use Joomla\Filesystem\Path;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_fields/src/View/Fields/HtmlView.php b/administrator/components/com_fields/src/View/Fields/HtmlView.php
index 334592ba3cdd..4e0f02f6c1c6 100644
--- a/administrator/components/com_fields/src/View/Fields/HtmlView.php
+++ b/administrator/components/com_fields/src/View/Fields/HtmlView.php
@@ -10,15 +10,14 @@
namespace Joomla\Component\Fields\Administrator\View\Fields;
-use Joomla\CMS\Form\Form;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Toolbar\Button\DropdownButton;
@@ -26,6 +25,7 @@
use Joomla\Component\Fields\Administrator\Helper\FieldsHelper;
use Joomla\Component\Fields\Administrator\Model\FieldsModel;
use Joomla\Filesystem\Path;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_fields/src/View/Group/HtmlView.php b/administrator/components/com_fields/src/View/Group/HtmlView.php
index 14d637ad8f50..528340a93ef8 100644
--- a/administrator/components/com_fields/src/View/Group/HtmlView.php
+++ b/administrator/components/com_fields/src/View/Group/HtmlView.php
@@ -10,9 +10,8 @@
namespace Joomla\Component\Fields\Administrator\View\Group;
-use Joomla\CMS\Form\Form;
-use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
@@ -22,6 +21,7 @@
use Joomla\Component\Fields\Administrator\Helper\FieldsHelper;
use Joomla\Component\Fields\Administrator\Model\GroupModel;
use Joomla\Filesystem\Path;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_fields/src/View/Groups/HtmlView.php b/administrator/components/com_fields/src/View/Groups/HtmlView.php
index c8b410bd7e22..ac87aa86af5d 100644
--- a/administrator/components/com_fields/src/View/Groups/HtmlView.php
+++ b/administrator/components/com_fields/src/View/Groups/HtmlView.php
@@ -10,15 +10,14 @@
namespace Joomla\Component\Fields\Administrator\View\Groups;
-use Joomla\CMS\Form\Form;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Toolbar\Button\DropdownButton;
@@ -26,6 +25,7 @@
use Joomla\Component\Fields\Administrator\Helper\FieldsHelper;
use Joomla\Component\Fields\Administrator\Model\GroupsModel;
use Joomla\Filesystem\Path;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_finder/src/Controller/FilterController.php b/administrator/components/com_finder/src/Controller/FilterController.php
index 098c0b279fbf..d6418192b6ac 100644
--- a/administrator/components/com_finder/src/Controller/FilterController.php
+++ b/administrator/components/com_finder/src/Controller/FilterController.php
@@ -10,11 +10,11 @@
namespace Joomla\Component\Finder\Administrator\Controller;
-use Joomla\Component\Finder\Administrator\Model\FilterModel;
use Joomla\CMS\Application\CMSWebApplicationInterface;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\Router\Route;
+use Joomla\Component\Finder\Administrator\Model\FilterModel;
use Joomla\Utilities\ArrayHelper;
// phpcs:disable PSR1.Files.SideEffects
@@ -48,7 +48,7 @@ public function save($key = null, $urlVar = null)
$table = $model->getTable();
$data = $this->input->post->get('jform', [], 'array');
$checkin = $table->hasField('checked_out');
- $context = sprintf('%s.edit.%s', $this->option, $this->context);
+ $context = \sprintf('%s.edit.%s', $this->option, $this->context);
$task = $this->getTask();
// Determine the name of the primary key for the data.
diff --git a/administrator/components/com_finder/src/Controller/FiltersController.php b/administrator/components/com_finder/src/Controller/FiltersController.php
index b199cadb16ba..e7dc69dc6f38 100644
--- a/administrator/components/com_finder/src/Controller/FiltersController.php
+++ b/administrator/components/com_finder/src/Controller/FiltersController.php
@@ -10,8 +10,8 @@
namespace Joomla\Component\Finder\Administrator\Controller;
-use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\MVC\Controller\AdminController;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_finder/src/Controller/IndexController.php b/administrator/components/com_finder/src/Controller/IndexController.php
index 35d55fce1c69..ea9fff5191e3 100644
--- a/administrator/components/com_finder/src/Controller/IndexController.php
+++ b/administrator/components/com_finder/src/Controller/IndexController.php
@@ -10,13 +10,13 @@
namespace Joomla\Component\Finder\Administrator\Controller;
-use Joomla\CMS\MVC\Model\BaseDatabaseModel;
-use Joomla\Component\Finder\Administrator\Model\IndexModel;
use Joomla\CMS\Event\Finder\GarbageCollectionEvent;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\Component\Finder\Administrator\Indexer\Indexer;
+use Joomla\Component\Finder\Administrator\Model\IndexModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_finder/src/Controller/IndexerController.php b/administrator/components/com_finder/src/Controller/IndexerController.php
index 727937cffd79..d96dff7dc6b2 100644
--- a/administrator/components/com_finder/src/Controller/IndexerController.php
+++ b/administrator/components/com_finder/src/Controller/IndexerController.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Finder\Administrator\Controller;
-use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Event\Finder\BeforeIndexEvent;
use Joomla\CMS\Event\Finder\BuildIndexEvent;
@@ -19,6 +18,7 @@
use Joomla\CMS\Language\Text;
use Joomla\CMS\Log\Log;
use Joomla\CMS\MVC\Controller\BaseController;
+use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Session\Session;
use Joomla\Component\Finder\Administrator\Indexer\Adapter;
diff --git a/administrator/components/com_finder/src/Controller/MapsController.php b/administrator/components/com_finder/src/Controller/MapsController.php
index fa53142c27c2..78ce6c092551 100644
--- a/administrator/components/com_finder/src/Controller/MapsController.php
+++ b/administrator/components/com_finder/src/Controller/MapsController.php
@@ -10,8 +10,8 @@
namespace Joomla\Component\Finder\Administrator\Controller;
-use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\MVC\Controller\AdminController;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_finder/src/Indexer/Indexer.php b/administrator/components/com_finder/src/Indexer/Indexer.php
index 97bf7117e73e..23ed3899a36a 100644
--- a/administrator/components/com_finder/src/Indexer/Indexer.php
+++ b/administrator/components/com_finder/src/Indexer/Indexer.php
@@ -10,12 +10,12 @@
namespace Joomla\Component\Finder\Administrator\Indexer;
-use Joomla\Database\DatabaseDriver;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Profiler\Profiler;
+use Joomla\Database\DatabaseDriver;
use Joomla\Database\DatabaseInterface;
use Joomla\Database\ParameterType;
use Joomla\Database\QueryInterface;
diff --git a/administrator/components/com_finder/src/Indexer/Language/El.php b/administrator/components/com_finder/src/Indexer/Language/El.php
index 671446bc09f0..f445b30c9cd9 100644
--- a/administrator/components/com_finder/src/Indexer/Language/El.php
+++ b/administrator/components/com_finder/src/Indexer/Language/El.php
@@ -401,7 +401,7 @@ public function stem($token)
$token = $match[1];
$re = '/(ΟΚ|ΜΑΜ|ΜΑΝ|ΜΠΑΜΠ|ΠΑΤΕΡ|ΓΙΑΓΙ|ΝΤΑΝΤ|ΚΥΡ|ΘΕΙ|ΠΕΘΕΡ)$/';
- if (in_array(preg_match($re, $token), [0, false], true)) {
+ if (\in_array(preg_match($re, $token), [0, false], true)) {
$token .= "ΑΔ";
}
}
@@ -667,7 +667,7 @@ public function stem($token)
if (
(preg_match($exept18, $token) || preg_match($exept19, $token))
- && (in_array(preg_match($exept17, $token), [0, false], true) && in_array(preg_match($exept20, $token), [0, false], true))
+ && (\in_array(preg_match($exept17, $token), [0, false], true) && \in_array(preg_match($exept20, $token), [0, false], true))
) {
$token .= "ΑΓ";
}
diff --git a/administrator/components/com_finder/src/Model/IndexModel.php b/administrator/components/com_finder/src/Model/IndexModel.php
index 44769acf592b..e1f0433f50dd 100644
--- a/administrator/components/com_finder/src/Model/IndexModel.php
+++ b/administrator/components/com_finder/src/Model/IndexModel.php
@@ -10,13 +10,13 @@
namespace Joomla\Component\Finder\Administrator\Model;
-use Joomla\CMS\Table\Table;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\CMS\Plugin\PluginHelper;
+use Joomla\CMS\Table\Table;
use Joomla\Database\QueryInterface;
// phpcs:disable PSR1.Files.SideEffects
@@ -228,7 +228,7 @@ protected function getListQuery()
$orSearchSql = $db->quoteName('l.title') . ' LIKE ' . $search . ' OR ' . $db->quoteName('l.url') . ' LIKE ' . $search;
// Filter by indexdate only if $search doesn't contains non-ascii characters
- if (in_array(preg_match('/[^\x00-\x7F]/', $search), [0, false], true)) {
+ if (\in_array(preg_match('/[^\x00-\x7F]/', $search), [0, false], true)) {
$orSearchSql .= ' OR ' . $query->castAsChar($db->quoteName('l.indexdate')) . ' LIKE ' . $search;
}
diff --git a/administrator/components/com_finder/src/Model/MapsModel.php b/administrator/components/com_finder/src/Model/MapsModel.php
index 24b416dca07a..12d58756ef63 100644
--- a/administrator/components/com_finder/src/Model/MapsModel.php
+++ b/administrator/components/com_finder/src/Model/MapsModel.php
@@ -10,13 +10,13 @@
namespace Joomla\Component\Finder\Administrator\Model;
-use Joomla\CMS\Table\Table;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\CMS\Plugin\PluginHelper;
+use Joomla\CMS\Table\Table;
use Joomla\Database\DatabaseQuery;
use Joomla\Database\QueryInterface;
diff --git a/administrator/components/com_finder/src/Service/HTML/Filter.php b/administrator/components/com_finder/src/Service/HTML/Filter.php
index f6e9b6b2fb91..019b18011058 100644
--- a/administrator/components/com_finder/src/Service/HTML/Filter.php
+++ b/administrator/components/com_finder/src/Service/HTML/Filter.php
@@ -10,11 +10,11 @@
namespace Joomla\Component\Finder\Administrator\Service\HTML;
-use Joomla\CMS\WebAsset\WebAssetManager;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
+use Joomla\CMS\WebAsset\WebAssetManager;
use Joomla\Component\Finder\Administrator\Helper\LanguageHelper;
use Joomla\Component\Finder\Administrator\Indexer\Query;
use Joomla\Database\DatabaseAwareTrait;
diff --git a/administrator/components/com_finder/src/View/Filter/HtmlView.php b/administrator/components/com_finder/src/View/Filter/HtmlView.php
index f5fad02daa11..05c1bf001f43 100644
--- a/administrator/components/com_finder/src/View/Filter/HtmlView.php
+++ b/administrator/components/com_finder/src/View/Filter/HtmlView.php
@@ -10,10 +10,8 @@
namespace Joomla\Component\Finder\Administrator\View\Filter;
-use Joomla\Component\Finder\Administrator\Table\FilterTable;
-use Joomla\CMS\Form\Form;
-use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
@@ -21,6 +19,8 @@
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Finder\Administrator\Model\FilterModel;
+use Joomla\Component\Finder\Administrator\Table\FilterTable;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_finder/src/View/Filters/HtmlView.php b/administrator/components/com_finder/src/View/Filters/HtmlView.php
index 04b7b0dcafbb..d41b8d55f02c 100644
--- a/administrator/components/com_finder/src/View/Filters/HtmlView.php
+++ b/administrator/components/com_finder/src/View/Filters/HtmlView.php
@@ -10,16 +10,16 @@
namespace Joomla\Component\Finder\Administrator\View\Filters;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\Registry\Registry;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\Button\DropdownButton;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Finder\Administrator\Model\FiltersModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_finder/src/View/Index/HtmlView.php b/administrator/components/com_finder/src/View/Index/HtmlView.php
index 06948c8abd05..857b700cf0bd 100644
--- a/administrator/components/com_finder/src/View/Index/HtmlView.php
+++ b/administrator/components/com_finder/src/View/Index/HtmlView.php
@@ -10,13 +10,13 @@
namespace Joomla\Component\Finder\Administrator\View\Index;
-use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Toolbar\Button\DropdownButton;
use Joomla\CMS\Toolbar\ToolbarHelper;
diff --git a/administrator/components/com_finder/src/View/Maps/HtmlView.php b/administrator/components/com_finder/src/View/Maps/HtmlView.php
index cb373e00bc5d..85e8b78676b0 100644
--- a/administrator/components/com_finder/src/View/Maps/HtmlView.php
+++ b/administrator/components/com_finder/src/View/Maps/HtmlView.php
@@ -10,17 +10,17 @@
namespace Joomla\Component\Finder\Administrator\View\Maps;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\Registry\Registry;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\Button\DropdownButton;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Finder\Administrator\Helper\LanguageHelper;
use Joomla\Component\Finder\Administrator\Model\MapsModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_finder/src/View/Searches/HtmlView.php b/administrator/components/com_finder/src/View/Searches/HtmlView.php
index a6bba1ce00d5..6a2223bad79e 100644
--- a/administrator/components/com_finder/src/View/Searches/HtmlView.php
+++ b/administrator/components/com_finder/src/View/Searches/HtmlView.php
@@ -10,19 +10,19 @@
namespace Joomla\Component\Finder\Administrator\View\Searches;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\Registry\Registry;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Finder\Administrator\Model\SearchesModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_finder/src/View/Statistics/HtmlView.php b/administrator/components/com_finder/src/View/Statistics/HtmlView.php
index 503337dcd10b..c19428d66b3e 100644
--- a/administrator/components/com_finder/src/View/Statistics/HtmlView.php
+++ b/administrator/components/com_finder/src/View/Statistics/HtmlView.php
@@ -10,9 +10,9 @@
namespace Joomla\Component\Finder\Administrator\View\Statistics;
-use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Object\CMSObject;
use Joomla\Component\Finder\Administrator\Model\StatisticsModel;
// phpcs:disable PSR1.Files.SideEffects
diff --git a/administrator/components/com_guidedtours/src/Controller/StepsController.php b/administrator/components/com_guidedtours/src/Controller/StepsController.php
index 42ea6b5c45a1..348660990923 100644
--- a/administrator/components/com_guidedtours/src/Controller/StepsController.php
+++ b/administrator/components/com_guidedtours/src/Controller/StepsController.php
@@ -10,8 +10,8 @@
namespace Joomla\Component\Guidedtours\Administrator\Controller;
-use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\MVC\Controller\AdminController;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_guidedtours/src/Controller/ToursController.php b/administrator/components/com_guidedtours/src/Controller/ToursController.php
index 48ebaf0c5d9a..43da08719eab 100644
--- a/administrator/components/com_guidedtours/src/Controller/ToursController.php
+++ b/administrator/components/com_guidedtours/src/Controller/ToursController.php
@@ -10,9 +10,9 @@
namespace Joomla\Component\Guidedtours\Administrator\Controller;
-use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Router\Route;
// phpcs:disable PSR1.Files.SideEffects
diff --git a/administrator/components/com_guidedtours/src/Model/TourModel.php b/administrator/components/com_guidedtours/src/Model/TourModel.php
index 1cc21aa0e966..7d11630b4d7a 100644
--- a/administrator/components/com_guidedtours/src/Model/TourModel.php
+++ b/administrator/components/com_guidedtours/src/Model/TourModel.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Guidedtours\Administrator\Model;
-use Joomla\CMS\Table\Table;
use Joomla\CMS\Date\Date;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
@@ -18,6 +17,7 @@
use Joomla\CMS\MVC\Model\AdminModel;
use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Plugin\PluginHelper;
+use Joomla\CMS\Table\Table;
use Joomla\Component\Guidedtours\Administrator\Helper\GuidedtoursHelper;
use Joomla\Database\ParameterType;
use Joomla\Registry\Registry;
@@ -543,7 +543,7 @@ public function isAutostart($pk): bool
->from($db->quoteName('#__guidedtours'))
->where($db->quoteName('published') . ' = 1');
- if (is_int($pk)) {
+ if (\is_int($pk)) {
$query->where($db->quoteName('id') . ' = :id')
->bind(':id', $pk, ParameterType::INTEGER);
} else {
diff --git a/administrator/components/com_guidedtours/src/View/Step/HtmlView.php b/administrator/components/com_guidedtours/src/View/Step/HtmlView.php
index f29b00d460d2..fabdc1d99641 100644
--- a/administrator/components/com_guidedtours/src/View/Step/HtmlView.php
+++ b/administrator/components/com_guidedtours/src/View/Step/HtmlView.php
@@ -10,13 +10,13 @@
namespace Joomla\Component\Guidedtours\Administrator\View\Step;
-use Joomla\CMS\Form\Form;
-use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Guidedtours\Administrator\Model\StepModel;
diff --git a/administrator/components/com_guidedtours/src/View/Steps/HtmlView.php b/administrator/components/com_guidedtours/src/View/Steps/HtmlView.php
index bc7c44e4b240..97cdb357ed75 100644
--- a/administrator/components/com_guidedtours/src/View/Steps/HtmlView.php
+++ b/administrator/components/com_guidedtours/src/View/Steps/HtmlView.php
@@ -10,18 +10,18 @@
namespace Joomla\Component\Guidedtours\Administrator\View\Steps;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\Registry\Registry;
-use Joomla\CMS\Form\Form;
-use Joomla\Component\Guidedtours\Administrator\Model\TourModel;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Guidedtours\Administrator\Model\StepsModel;
+use Joomla\Component\Guidedtours\Administrator\Model\TourModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_guidedtours/src/View/Tour/HtmlView.php b/administrator/components/com_guidedtours/src/View/Tour/HtmlView.php
index 327663481d07..2e6431c60dca 100644
--- a/administrator/components/com_guidedtours/src/View/Tour/HtmlView.php
+++ b/administrator/components/com_guidedtours/src/View/Tour/HtmlView.php
@@ -10,15 +10,15 @@
namespace Joomla\Component\Guidedtours\Administrator\View\Tour;
-use Joomla\CMS\Form\Form;
-use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Guidedtours\Administrator\Model\TourModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_guidedtours/src/View/Tours/HtmlView.php b/administrator/components/com_guidedtours/src/View/Tours/HtmlView.php
index 825de5dd2397..1f09214d79a3 100644
--- a/administrator/components/com_guidedtours/src/View/Tours/HtmlView.php
+++ b/administrator/components/com_guidedtours/src/View/Tours/HtmlView.php
@@ -10,16 +10,16 @@
namespace Joomla\Component\Guidedtours\Administrator\View\Tours;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\Registry\Registry;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Guidedtours\Administrator\Model\ToursModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_installer/src/Controller/DatabaseController.php b/administrator/components/com_installer/src/Controller/DatabaseController.php
index 20c3e2578769..3f8552131ede 100644
--- a/administrator/components/com_installer/src/Controller/DatabaseController.php
+++ b/administrator/components/com_installer/src/Controller/DatabaseController.php
@@ -10,12 +10,12 @@
namespace Joomla\Component\Installer\Administrator\Controller;
-use Joomla\Component\Joomlaupdate\Administrator\Model\UpdateModel;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Response\JsonResponse;
use Joomla\CMS\Router\Route;
use Joomla\Component\Installer\Administrator\Model\DatabaseModel;
+use Joomla\Component\Joomlaupdate\Administrator\Model\UpdateModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_installer/src/Controller/DiscoverController.php b/administrator/components/com_installer/src/Controller/DiscoverController.php
index 830c7b8e3d96..472cdfaf2263 100644
--- a/administrator/components/com_installer/src/Controller/DiscoverController.php
+++ b/administrator/components/com_installer/src/Controller/DiscoverController.php
@@ -10,11 +10,11 @@
namespace Joomla\Component\Installer\Administrator\Controller;
-use Joomla\Component\Installer\Administrator\Model\DiscoverModel;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Response\JsonResponse;
use Joomla\CMS\Router\Route;
+use Joomla\Component\Installer\Administrator\Model\DiscoverModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_installer/src/Controller/InstallController.php b/administrator/components/com_installer/src/Controller/InstallController.php
index de23f7f9dd0f..8239b7c81187 100644
--- a/administrator/components/com_installer/src/Controller/InstallController.php
+++ b/administrator/components/com_installer/src/Controller/InstallController.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Installer\Administrator\Controller;
-use Joomla\Component\Installer\Administrator\Model\InstallModel;
use Joomla\CMS\Access\Exception\NotAllowed;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
@@ -18,6 +17,7 @@
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
+use Joomla\Component\Installer\Administrator\Model\InstallModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_installer/src/Controller/UpdatesitesController.php b/administrator/components/com_installer/src/Controller/UpdatesitesController.php
index fcba9d6f8fd8..d00f50beb775 100644
--- a/administrator/components/com_installer/src/Controller/UpdatesitesController.php
+++ b/administrator/components/com_installer/src/Controller/UpdatesitesController.php
@@ -10,13 +10,13 @@
namespace Joomla\Component\Installer\Administrator\Controller;
-use Joomla\CMS\MVC\Model\BaseDatabaseModel;
-use Joomla\Component\Installer\Administrator\Model\UpdatesitesModel;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Router\Route;
+use Joomla\Component\Installer\Administrator\Model\UpdatesitesModel;
use Joomla\Input\Input;
use Joomla\Utilities\ArrayHelper;
diff --git a/administrator/components/com_installer/src/Helper/InstallerHelper.php b/administrator/components/com_installer/src/Helper/InstallerHelper.php
index 2e5414c277db..e74d378bf303 100644
--- a/administrator/components/com_installer/src/Helper/InstallerHelper.php
+++ b/administrator/components/com_installer/src/Helper/InstallerHelper.php
@@ -146,7 +146,7 @@ function (object $entry) use ($language): string {
$extensions
);
$arrayValues = array_map(
- fn(object $entry): int => $entry->extension_id,
+ fn (object $entry): int => $entry->extension_id,
$extensions
);
@@ -345,7 +345,7 @@ public static function getDownloadKeySupportedSites($onlyEnabled = false): array
};
$extensions = array_filter($extensions, $filterClosure);
- $mapClosure = (fn(CMSObject $extension) => $extension->get('update_site_id'));
+ $mapClosure = (fn (CMSObject $extension) => $extension->get('update_site_id'));
return array_map($mapClosure, $extensions);
}
@@ -384,7 +384,7 @@ public static function getDownloadKeyExistsSites(bool $exists = true, $onlyEnabl
$extensions = array_filter($extensions, $filterClosure);
// Return only the update site IDs
- $mapClosure = (fn(CMSObject $extension) => $extension->get('update_site_id'));
+ $mapClosure = (fn (CMSObject $extension) => $extension->get('update_site_id'));
return array_map($mapClosure, $extensions);
}
diff --git a/administrator/components/com_installer/src/Model/InstallModel.php b/administrator/components/com_installer/src/Model/InstallModel.php
index 763560a094ec..6ca57c12addf 100644
--- a/administrator/components/com_installer/src/Model/InstallModel.php
+++ b/administrator/components/com_installer/src/Model/InstallModel.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Installer\Administrator\Model;
-use Joomla\CMS\Table\Table;
use Joomla\CMS\Event\Installer\AfterInstallerEvent;
use Joomla\CMS\Event\Installer\BeforeInstallationEvent;
use Joomla\CMS\Event\Installer\BeforeInstallerEvent;
@@ -21,6 +20,7 @@
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Router\Route;
+use Joomla\CMS\Table\Table;
use Joomla\CMS\Updater\Update;
use Joomla\CMS\Uri\Uri;
use Joomla\Filesystem\Exception\FilesystemException;
diff --git a/administrator/components/com_installer/src/Model/LanguagesModel.php b/administrator/components/com_installer/src/Model/LanguagesModel.php
index eab8c2aab4d7..74378ebe76e1 100644
--- a/administrator/components/com_installer/src/Model/LanguagesModel.php
+++ b/administrator/components/com_installer/src/Model/LanguagesModel.php
@@ -9,12 +9,12 @@
namespace Joomla\Component\Installer\Administrator\Model;
-use Joomla\Database\DatabaseQuery;
use Joomla\CMS\Factory;
use Joomla\CMS\Http\HttpFactory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\MVC\Model\ListModel;
+use Joomla\Database\DatabaseQuery;
use Joomla\String\StringHelper;
// phpcs:disable PSR1.Files.SideEffects
diff --git a/administrator/components/com_installer/src/Model/UpdateModel.php b/administrator/components/com_installer/src/Model/UpdateModel.php
index 8da115c2c3cd..aa6b3aae6e83 100644
--- a/administrator/components/com_installer/src/Model/UpdateModel.php
+++ b/administrator/components/com_installer/src/Model/UpdateModel.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Installer\Administrator\Model;
-use Joomla\CMS\Table\UpdateSite;
use Joomla\CMS\Extension\ExtensionHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Form;
@@ -20,6 +19,7 @@
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\CMS\Plugin\PluginHelper;
+use Joomla\CMS\Table\UpdateSite;
use Joomla\CMS\Updater\Update;
use Joomla\CMS\Updater\Updater;
use Joomla\Database\Exception\ExecutionFailureException;
diff --git a/administrator/components/com_installer/src/View/Discover/HtmlView.php b/administrator/components/com_installer/src/View/Discover/HtmlView.php
index bf0099454e50..7cf9fc7a1657 100644
--- a/administrator/components/com_installer/src/View/Discover/HtmlView.php
+++ b/administrator/components/com_installer/src/View/Discover/HtmlView.php
@@ -10,9 +10,9 @@
namespace Joomla\Component\Installer\Administrator\View\Discover;
-use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Form\Form;
use Joomla\CMS\MVC\View\GenericDataException;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\Component\Installer\Administrator\Model\DiscoverModel;
use Joomla\Component\Installer\Administrator\View\Installer\HtmlView as InstallerViewDefault;
diff --git a/administrator/components/com_installer/src/View/Installer/HtmlView.php b/administrator/components/com_installer/src/View/Installer/HtmlView.php
index 1acdd940bed7..5a9160b8a2c5 100644
--- a/administrator/components/com_installer/src/View/Installer/HtmlView.php
+++ b/administrator/components/com_installer/src/View/Installer/HtmlView.php
@@ -10,13 +10,13 @@
namespace Joomla\Component\Installer\Administrator\View\Installer;
-use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Installer\Administrator\Model\InstallerModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_installer/src/View/Languages/HtmlView.php b/administrator/components/com_installer/src/View/Languages/HtmlView.php
index 91b4976564bf..5496012a031d 100644
--- a/administrator/components/com_installer/src/View/Languages/HtmlView.php
+++ b/administrator/components/com_installer/src/View/Languages/HtmlView.php
@@ -10,8 +10,8 @@
namespace Joomla\Component\Installer\Administrator\View\Languages;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Access\Exception\NotAllowed;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\LanguageHelper;
use Joomla\CMS\Language\Text;
diff --git a/administrator/components/com_installer/src/View/Update/HtmlView.php b/administrator/components/com_installer/src/View/Update/HtmlView.php
index b52bd8b22e37..f7b9490b2336 100644
--- a/administrator/components/com_installer/src/View/Update/HtmlView.php
+++ b/administrator/components/com_installer/src/View/Update/HtmlView.php
@@ -10,12 +10,12 @@
namespace Joomla\Component\Installer\Administrator\View\Update;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Object\CMSObject;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\Component\Installer\Administrator\Helper\InstallerHelper as CmsInstallerHelper;
use Joomla\Component\Installer\Administrator\Model\UpdateModel;
use Joomla\Component\Installer\Administrator\View\Installer\HtmlView as InstallerViewDefault;
diff --git a/administrator/components/com_joomlaupdate/extract.php b/administrator/components/com_joomlaupdate/extract.php
index 29bb55eec8ff..9bafa2da5363 100644
--- a/administrator/components/com_joomlaupdate/extract.php
+++ b/administrator/components/com_joomlaupdate/extract.php
@@ -639,7 +639,7 @@ public function initialize(): void
$this->readArchiveHeader();
- if (!in_array($this->getError(), [null, '', '0'], true)) {
+ if (!\in_array($this->getError(), [null, '', '0'], true)) {
$this->debugMsg(\sprintf('Error: %s', $this->getError()), self::LOG_ERROR);
return;
@@ -1697,7 +1697,7 @@ function clearFileInOPCache(string $file): bool
if (\is_null($hasOpCache)) {
$hasOpCache = \ini_get('opcache.enable')
&& \function_exists('opcache_invalidate')
- && (in_array(\ini_get('opcache.restrict_api'), ['', '0'], true) || \ini_get('opcache.restrict_api') === false || stripos(realpath($_SERVER['SCRIPT_FILENAME']), \ini_get('opcache.restrict_api')) === 0);
+ && (\in_array(\ini_get('opcache.restrict_api'), ['', '0'], true) || \ini_get('opcache.restrict_api') === false || stripos(realpath($_SERVER['SCRIPT_FILENAME']), \ini_get('opcache.restrict_api')) === 0);
}
if ($hasOpCache && (strtolower(substr($file, -4)) === '.php')) {
diff --git a/administrator/components/com_joomlaupdate/src/Controller/DisplayController.php b/administrator/components/com_joomlaupdate/src/Controller/DisplayController.php
index f8ae45c2da9e..6a063e875313 100644
--- a/administrator/components/com_joomlaupdate/src/Controller/DisplayController.php
+++ b/administrator/components/com_joomlaupdate/src/Controller/DisplayController.php
@@ -10,12 +10,12 @@
namespace Joomla\Component\Joomlaupdate\Administrator\Controller;
-use Joomla\Component\Joomlaupdate\Administrator\Model\UpdateModel;
-use Joomla\Component\Installer\Administrator\Model\WarningsModel;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Response\JsonResponse;
use Joomla\CMS\Router\Route;
+use Joomla\Component\Installer\Administrator\Model\WarningsModel;
+use Joomla\Component\Joomlaupdate\Administrator\Model\UpdateModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_joomlaupdate/src/Model/UpdateModel.php b/administrator/components/com_joomlaupdate/src/Model/UpdateModel.php
index 45599747e1e7..7f65eb150d01 100644
--- a/administrator/components/com_joomlaupdate/src/Model/UpdateModel.php
+++ b/administrator/components/com_joomlaupdate/src/Model/UpdateModel.php
@@ -10,8 +10,6 @@
namespace Joomla\Component\Joomlaupdate\Administrator\Model;
-use Joomla\CMS\Table\Extension;
-use Joomla\Component\Installer\Administrator\Model\DatabaseModel;
use Joomla\CMS\Authentication\Authentication;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Event\Extension\AfterJoomlaUpdateEvent;
@@ -27,11 +25,13 @@
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Plugin\PluginHelper;
+use Joomla\CMS\Table\Extension;
use Joomla\CMS\Table\Tuf as TufMetadata;
use Joomla\CMS\Updater\Update;
use Joomla\CMS\Updater\Updater;
use Joomla\CMS\User\UserHelper;
use Joomla\CMS\Version;
+use Joomla\Component\Installer\Administrator\Model\DatabaseModel;
use Joomla\Database\ParameterType;
use Joomla\Filesystem\Exception\FilesystemException;
use Joomla\Filesystem\File;
@@ -1736,7 +1736,7 @@ public function isTemplateActive($template)
$home = array_filter(
$templates,
- fn($value) => $value->home > 0
+ fn ($value) => $value->home > 0
);
$ids = ArrayHelper::getColumn($templates, 'id');
diff --git a/administrator/components/com_joomlaupdate/src/View/Joomlaupdate/HtmlView.php b/administrator/components/com_joomlaupdate/src/View/Joomlaupdate/HtmlView.php
index 6e09da6f0577..6ed05edd270b 100644
--- a/administrator/components/com_joomlaupdate/src/View/Joomlaupdate/HtmlView.php
+++ b/administrator/components/com_joomlaupdate/src/View/Joomlaupdate/HtmlView.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Joomlaupdate\Administrator\View\Joomlaupdate;
-use Joomla\Registry\Registry;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
@@ -18,6 +17,7 @@
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\Version;
use Joomla\Component\Joomlaupdate\Administrator\Model\UpdateModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_languages/src/Controller/OverrideController.php b/administrator/components/com_languages/src/Controller/OverrideController.php
index 34f0272f6a56..14013145fe04 100644
--- a/administrator/components/com_languages/src/Controller/OverrideController.php
+++ b/administrator/components/com_languages/src/Controller/OverrideController.php
@@ -42,7 +42,7 @@ public function edit($key = null, $urlVar = null)
$this->app->allowCache(false);
$cid = (array) $this->input->post->get('cid', [], 'string');
- $context = sprintf('%s.edit.%s', $this->option, $this->context);
+ $context = \sprintf('%s.edit.%s', $this->option, $this->context);
// Get the constant name.
$recordId = ($cid !== [] ? $cid[0] : $this->input->get('id'));
@@ -77,7 +77,7 @@ public function save($key = null, $urlVar = null)
$app = $this->app;
$model = $this->getModel();
$data = $this->input->post->get('jform', [], 'array');
- $context = sprintf('%s.edit.%s', $this->option, $this->context);
+ $context = \sprintf('%s.edit.%s', $this->option, $this->context);
$task = $this->getTask();
$recordId = $this->input->get('id');
@@ -190,7 +190,7 @@ public function cancel($key = null)
{
$this->checkToken();
- $context = sprintf('%s.edit.%s', $this->option, $this->context);
+ $context = \sprintf('%s.edit.%s', $this->option, $this->context);
$this->app->setUserState($context . '.data', null);
$this->setRedirect(Route::_('index.php?option=' . $this->option . '&view=' . $this->view_list . $this->getRedirectToListAppend(), false));
diff --git a/administrator/components/com_languages/src/Controller/OverridesController.php b/administrator/components/com_languages/src/Controller/OverridesController.php
index 2ce8f0de1e20..a85b96ee44b5 100644
--- a/administrator/components/com_languages/src/Controller/OverridesController.php
+++ b/administrator/components/com_languages/src/Controller/OverridesController.php
@@ -10,10 +10,10 @@
namespace Joomla\Component\Languages\Administrator\Controller;
-use Joomla\Component\Languages\Administrator\Model\OverridesModel;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\CMS\Router\Route;
+use Joomla\Component\Languages\Administrator\Model\OverridesModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_languages/src/Model/LanguageModel.php b/administrator/components/com_languages/src/Model/LanguageModel.php
index e654f5545b30..ccafe985abd7 100644
--- a/administrator/components/com_languages/src/Model/LanguageModel.php
+++ b/administrator/components/com_languages/src/Model/LanguageModel.php
@@ -10,10 +10,10 @@
namespace Joomla\Component\Languages\Administrator\Model;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Application\ApplicationHelper;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\MVC\Model\AdminModel;
@@ -206,7 +206,7 @@ public function save($data)
$data['lang_code'] = str_replace($spaces, '', $data['lang_code']);
// Prevent saving an incorrect language tag
- if (in_array(preg_match('#\b([a-z]{2,3})[-]([A-Z]{2})\b#', $data['lang_code']), [0, false], true)) {
+ if (\in_array(preg_match('#\b([a-z]{2,3})[-]([A-Z]{2})\b#', $data['lang_code']), [0, false], true)) {
$this->setError(Text::_('COM_LANGUAGES_ERROR_LANG_TAG'));
return false;
diff --git a/administrator/components/com_languages/src/Model/OverrideModel.php b/administrator/components/com_languages/src/Model/OverrideModel.php
index 3a0650265ef3..ab04017436bf 100644
--- a/administrator/components/com_languages/src/Model/OverrideModel.php
+++ b/administrator/components/com_languages/src/Model/OverrideModel.php
@@ -10,8 +10,8 @@
namespace Joomla\Component\Languages\Administrator\Model;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Language;
use Joomla\CMS\Language\LanguageHelper;
use Joomla\CMS\Language\Text;
diff --git a/administrator/components/com_languages/src/View/Installed/HtmlView.php b/administrator/components/com_languages/src/View/Installed/HtmlView.php
index b53a3f1dadef..f6e83fabdb72 100644
--- a/administrator/components/com_languages/src/View/Installed/HtmlView.php
+++ b/administrator/components/com_languages/src/View/Installed/HtmlView.php
@@ -10,15 +10,15 @@
namespace Joomla\Component\Languages\Administrator\View\Installed;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\Registry\Registry;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Languages\Administrator\Model\InstalledModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_languages/src/View/Language/HtmlView.php b/administrator/components/com_languages/src/View/Language/HtmlView.php
index 7a0562ec3252..031f9fddf301 100644
--- a/administrator/components/com_languages/src/View/Language/HtmlView.php
+++ b/administrator/components/com_languages/src/View/Language/HtmlView.php
@@ -10,9 +10,8 @@
namespace Joomla\Component\Languages\Administrator\View\Language;
-use Joomla\CMS\Form\Form;
-use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
@@ -20,6 +19,7 @@
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Languages\Administrator\Model\LanguageModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_languages/src/View/Languages/HtmlView.php b/administrator/components/com_languages/src/View/Languages/HtmlView.php
index 110ae925086a..2de66590e938 100644
--- a/administrator/components/com_languages/src/View/Languages/HtmlView.php
+++ b/administrator/components/com_languages/src/View/Languages/HtmlView.php
@@ -10,16 +10,16 @@
namespace Joomla\Component\Languages\Administrator\View\Languages;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\Registry\Registry;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\Button\DropdownButton;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Languages\Administrator\Model\LanguagesModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_mails/src/Controller/TemplateController.php b/administrator/components/com_mails/src/Controller/TemplateController.php
index 73c5136a8381..8e3d1fe158fa 100644
--- a/administrator/components/com_mails/src/Controller/TemplateController.php
+++ b/administrator/components/com_mails/src/Controller/TemplateController.php
@@ -10,13 +10,13 @@
namespace Joomla\Component\Mails\Administrator\Controller;
-use Joomla\CMS\Event\Model\NormaliseRequestDataEvent;
-use Joomla\CMS\MVC\Model\AdminModel;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Application\CMSWebApplicationInterface;
+use Joomla\CMS\Event\Model\NormaliseRequestDataEvent;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
+use Joomla\CMS\MVC\Model\AdminModel;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Input\Input;
@@ -83,7 +83,7 @@ public function edit($key = null, $urlVar = null)
// Do not cache the response to this, its a redirect, and mod_expires and google chrome browser bugs cache it forever!
$this->app->allowCache(false);
- $context = sprintf('%s.edit.%s', $this->option, $this->context);
+ $context = \sprintf('%s.edit.%s', $this->option, $this->context);
// Get the previous record id (if any) and the current record id.
$template_id = $this->input->getCmd('template_id');
@@ -156,7 +156,7 @@ public function save($key = null, $urlVar = null)
/** @var AdminModel $model */
$model = $this->getModel();
$data = $this->input->post->get('jform', [], 'array');
- $context = sprintf('%s.edit.%s', $this->option, $this->context);
+ $context = \sprintf('%s.edit.%s', $this->option, $this->context);
$task = $this->getTask();
$recordId = $this->input->getCmd('template_id');
diff --git a/administrator/components/com_mails/src/Model/TemplateModel.php b/administrator/components/com_mails/src/Model/TemplateModel.php
index 5f45e5c57c59..ec1105c2f352 100644
--- a/administrator/components/com_mails/src/Model/TemplateModel.php
+++ b/administrator/components/com_mails/src/Model/TemplateModel.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Mails\Administrator\Model;
-use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Form;
@@ -18,6 +17,7 @@
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Model\AdminModel;
use Joomla\CMS\Object\CMSObject;
+use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Table\Table;
use Joomla\Filesystem\Path;
use Joomla\Registry\Registry;
diff --git a/administrator/components/com_mails/src/View/Template/HtmlView.php b/administrator/components/com_mails/src/View/Template/HtmlView.php
index 19a159ce47c5..6ed8b94ebae1 100644
--- a/administrator/components/com_mails/src/View/Template/HtmlView.php
+++ b/administrator/components/com_mails/src/View/Template/HtmlView.php
@@ -10,8 +10,8 @@
namespace Joomla\Component\Mails\Administrator\View\Template;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
@@ -90,7 +90,7 @@ public function display($tpl = null)
throw new GenericDataException(implode("\n", $errors), 500);
}
- [$extension, $template_id] = explode('.', $this->item->template_id, 2);
+ [$extension, $template_id] = explode('.', $this->item->template_id, 2);
$fields = ['subject', 'body', 'htmlbody'];
$this->templateData = [];
diff --git a/administrator/components/com_mails/src/View/Templates/HtmlView.php b/administrator/components/com_mails/src/View/Templates/HtmlView.php
index 1d29ef32eca2..d041a05352a0 100644
--- a/administrator/components/com_mails/src/View/Templates/HtmlView.php
+++ b/administrator/components/com_mails/src/View/Templates/HtmlView.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Mails\Administrator\View\Templates;
-use Joomla\Registry\Registry;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
@@ -20,6 +19,7 @@
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Mails\Administrator\Helper\MailsHelper;
use Joomla\Component\Mails\Administrator\Model\TemplatesModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_media/src/Controller/DisplayController.php b/administrator/components/com_media/src/Controller/DisplayController.php
index 9a4ea0b142f0..79ad5c717dff 100644
--- a/administrator/components/com_media/src/Controller/DisplayController.php
+++ b/administrator/components/com_media/src/Controller/DisplayController.php
@@ -10,9 +10,9 @@
namespace Joomla\Component\Media\Administrator\Controller;
-use Joomla\CMS\MVC\View\ViewInterface;
-use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\MVC\Controller\BaseController;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
+use Joomla\CMS\MVC\View\ViewInterface;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_media/src/Event/AbstractMediaItemValidationEvent.php b/administrator/components/com_media/src/Event/AbstractMediaItemValidationEvent.php
index 2083114e9a6d..55c4567aa7a2 100644
--- a/administrator/components/com_media/src/Event/AbstractMediaItemValidationEvent.php
+++ b/administrator/components/com_media/src/Event/AbstractMediaItemValidationEvent.php
@@ -54,22 +54,22 @@ protected function validate(\stdClass $item): void
{
// Only "dir" or "file" is allowed
if (!isset($item->type) || ($item->type !== 'dir' && $item->type !== 'file')) {
- throw new \BadMethodCallException(sprintf("Property 'type' of argument 'item' of event %s has a wrong item. Valid: 'dir' or 'file'", $this->name));
+ throw new \BadMethodCallException(\sprintf("Property 'type' of argument 'item' of event %s has a wrong item. Valid: 'dir' or 'file'", $this->name));
}
// Non empty string
if (!isset($item->name) || !\is_string($item->name) || trim($item->name) === '') {
- throw new \BadMethodCallException(sprintf("Property 'name' of argument 'item' of event %s has a wrong item. Valid: non empty string", $this->name));
+ throw new \BadMethodCallException(\sprintf("Property 'name' of argument 'item' of event %s has a wrong item. Valid: non empty string", $this->name));
}
// Non empty string
if (!isset($item->path) || !\is_string($item->path) || trim($item->path) === '') {
- throw new \BadMethodCallException(sprintf("Property 'path' of argument 'item' of event %s has a wrong item. Valid: non empty string", $this->name));
+ throw new \BadMethodCallException(\sprintf("Property 'path' of argument 'item' of event %s has a wrong item. Valid: non empty string", $this->name));
}
// A string
if ($item->type === 'file' && (!isset($item->extension) || !\is_string($item->extension))) {
- throw new \BadMethodCallException(sprintf("Property 'extension' of argument 'item' of event %s has a wrong item. Valid: string", $this->name));
+ throw new \BadMethodCallException(\sprintf("Property 'extension' of argument 'item' of event %s has a wrong item. Valid: string", $this->name));
}
// An empty string or an integer
@@ -78,42 +78,42 @@ protected function validate(\stdClass $item): void
(!\is_int($item->size) && !\is_string($item->size)) ||
(\is_string($item->size) && $item->size !== '')
) {
- throw new \BadMethodCallException(sprintf("Property 'size' of argument 'item' of event %s has a wrong item. Valid: empty string or integer", $this->name));
+ throw new \BadMethodCallException(\sprintf("Property 'size' of argument 'item' of event %s has a wrong item. Valid: empty string or integer", $this->name));
}
// A string
if (!isset($item->mime_type) || !\is_string($item->mime_type)) {
- throw new \BadMethodCallException(sprintf("Property 'mime_type' of argument 'item' of event %s has a wrong item. Valid: string", $this->name));
+ throw new \BadMethodCallException(\sprintf("Property 'mime_type' of argument 'item' of event %s has a wrong item. Valid: string", $this->name));
}
// An integer
if (!isset($item->width) || !\is_int($item->width)) {
- throw new \BadMethodCallException(sprintf("Property 'width' of argument 'item' of event %s has a wrong item. Valid: integer", $this->name));
+ throw new \BadMethodCallException(\sprintf("Property 'width' of argument 'item' of event %s has a wrong item. Valid: integer", $this->name));
}
// An integer
if (!isset($item->height) || !\is_int($item->height)) {
- throw new \BadMethodCallException(sprintf("Property 'height' of argument 'item' of event %s has a wrong item. Valid: integer", $this->name));
+ throw new \BadMethodCallException(\sprintf("Property 'height' of argument 'item' of event %s has a wrong item. Valid: integer", $this->name));
}
// A string
if (!isset($item->create_date) || !\is_string($item->create_date)) {
- throw new \BadMethodCallException(sprintf("Property 'create_date' of argument 'item' of event %s has a wrong item. Valid: string", $this->name));
+ throw new \BadMethodCallException(\sprintf("Property 'create_date' of argument 'item' of event %s has a wrong item. Valid: string", $this->name));
}
// A string
if (!isset($item->create_date_formatted) || !\is_string($item->create_date_formatted)) {
- throw new \BadMethodCallException(sprintf("Property 'create_date_formatted' of argument 'item' of event %s has a wrong item. Valid: string", $this->name));
+ throw new \BadMethodCallException(\sprintf("Property 'create_date_formatted' of argument 'item' of event %s has a wrong item. Valid: string", $this->name));
}
// A string
if (!isset($item->modified_date) || !\is_string($item->modified_date)) {
- throw new \BadMethodCallException(sprintf("Property 'modified_date' of argument 'item' of event %s has a wrong item. Valid: string", $this->name));
+ throw new \BadMethodCallException(\sprintf("Property 'modified_date' of argument 'item' of event %s has a wrong item. Valid: string", $this->name));
}
// A string
if (!isset($item->modified_date_formatted) || !\is_string($item->modified_date_formatted)) {
- throw new \BadMethodCallException(sprintf("Property 'modified_date_formatted' of argument 'item' of event %s has a wrong item. Valid: string", $this->name));
+ throw new \BadMethodCallException(\sprintf("Property 'modified_date_formatted' of argument 'item' of event %s has a wrong item. Valid: string", $this->name));
}
}
}
diff --git a/administrator/components/com_media/src/Event/FetchMediaItemEvent.php b/administrator/components/com_media/src/Event/FetchMediaItemEvent.php
index 52435d505af6..61f2d6197a15 100644
--- a/administrator/components/com_media/src/Event/FetchMediaItemEvent.php
+++ b/administrator/components/com_media/src/Event/FetchMediaItemEvent.php
@@ -37,7 +37,7 @@ public function __construct($name, array $arguments = [])
// Check for required arguments
if (!\array_key_exists('item', $arguments) || !\is_object($arguments['item'])) {
- throw new \BadMethodCallException(sprintf("Argument 'item' of event %s is not of the expected type", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'item' of event %s is not of the expected type", $name));
}
}
diff --git a/administrator/components/com_media/src/Event/FetchMediaItemUrlEvent.php b/administrator/components/com_media/src/Event/FetchMediaItemUrlEvent.php
index b8a425613d81..2d08f712bd9c 100644
--- a/administrator/components/com_media/src/Event/FetchMediaItemUrlEvent.php
+++ b/administrator/components/com_media/src/Event/FetchMediaItemUrlEvent.php
@@ -37,7 +37,7 @@ public function __construct($name, array $arguments = [])
{
// Check for required arguments
if (!\array_key_exists('adapter', $arguments) || !\is_string($arguments['adapter'])) {
- throw new \BadMethodCallException(sprintf("Argument 'adapter' of event %s is not of the expected type", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'adapter' of event %s is not of the expected type", $name));
}
$this->arguments[$arguments['adapter']] = $arguments['adapter'];
@@ -45,7 +45,7 @@ public function __construct($name, array $arguments = [])
// Check for required arguments
if (!\array_key_exists('path', $arguments) || !\is_string($arguments['path'])) {
- throw new \BadMethodCallException(sprintf("Argument 'path' of event %s is not of the expected type", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'path' of event %s is not of the expected type", $name));
}
$this->arguments[$arguments['path']] = $arguments['path'];
@@ -53,7 +53,7 @@ public function __construct($name, array $arguments = [])
// Check for required arguments
if (!\array_key_exists('url', $arguments) || !\is_string($arguments['url'])) {
- throw new \BadMethodCallException(sprintf("Argument 'url' of event %s is not of the expected type", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'url' of event %s is not of the expected type", $name));
}
parent::__construct($name, $arguments);
diff --git a/administrator/components/com_media/src/Event/FetchMediaItemsEvent.php b/administrator/components/com_media/src/Event/FetchMediaItemsEvent.php
index 804bc5494280..ecf80b1220a6 100644
--- a/administrator/components/com_media/src/Event/FetchMediaItemsEvent.php
+++ b/administrator/components/com_media/src/Event/FetchMediaItemsEvent.php
@@ -37,7 +37,7 @@ public function __construct($name, array $arguments = [])
// Check for required arguments
if (!\array_key_exists('items', $arguments) || !\is_array($arguments['items'])) {
- throw new \BadMethodCallException(sprintf("Argument 'items' of event %s is not of the expected type", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'items' of event %s is not of the expected type", $name));
}
}
diff --git a/administrator/components/com_media/src/Model/ApiModel.php b/administrator/components/com_media/src/Model/ApiModel.php
index a1160d2d3eb7..10c36f88160d 100644
--- a/administrator/components/com_media/src/Model/ApiModel.php
+++ b/administrator/components/com_media/src/Model/ApiModel.php
@@ -445,7 +445,7 @@ public function search($adapter, $needle, $path = '/', $recursive = true)
private function isMediaFile($path)
{
// Check if there is an extension available
- if (in_array(strrpos($path, '.'), [0, false], true)) {
+ if (\in_array(strrpos($path, '.'), [0, false], true)) {
return false;
}
diff --git a/administrator/components/com_media/src/View/File/HtmlView.php b/administrator/components/com_media/src/View/File/HtmlView.php
index 11914f1922fc..002120b3a154 100644
--- a/administrator/components/com_media/src/View/File/HtmlView.php
+++ b/administrator/components/com_media/src/View/File/HtmlView.php
@@ -10,14 +10,14 @@
namespace Joomla\Component\Media\Administrator\View\File;
-use Joomla\CMS\Form\Form;
-use Joomla\Registry\Registry;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Media\Administrator\Model\FileModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_menus/src/Controller/ItemController.php b/administrator/components/com_menus/src/Controller/ItemController.php
index 7afdf429b2af..bae8769899a9 100644
--- a/administrator/components/com_menus/src/Controller/ItemController.php
+++ b/administrator/components/com_menus/src/Controller/ItemController.php
@@ -10,8 +10,6 @@
namespace Joomla\Component\Menus\Administrator\Controller;
-use Joomla\Component\Menus\Administrator\Model\ItemModel;
-use Joomla\Component\Menus\Administrator\Model\ItemsModel;
use Joomla\CMS\Application\CMSWebApplicationInterface;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Filter\InputFilter;
@@ -19,6 +17,8 @@
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
+use Joomla\Component\Menus\Administrator\Model\ItemModel;
+use Joomla\Component\Menus\Administrator\Model\ItemsModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_menus/src/Controller/ItemsController.php b/administrator/components/com_menus/src/Controller/ItemsController.php
index 21d968e693c2..73155eef9f1f 100644
--- a/administrator/components/com_menus/src/Controller/ItemsController.php
+++ b/administrator/components/com_menus/src/Controller/ItemsController.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Menus\Administrator\Controller;
-use Joomla\Component\Menus\Administrator\Model\ItemModel;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Log\Log;
@@ -18,6 +17,7 @@
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\Response\JsonResponse;
use Joomla\CMS\Router\Route;
+use Joomla\Component\Menus\Administrator\Model\ItemModel;
use Joomla\Input\Input;
use Joomla\Utilities\ArrayHelper;
diff --git a/administrator/components/com_menus/src/Controller/MenuController.php b/administrator/components/com_menus/src/Controller/MenuController.php
index e34c471d2562..7fee0aba6d27 100644
--- a/administrator/components/com_menus/src/Controller/MenuController.php
+++ b/administrator/components/com_menus/src/Controller/MenuController.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Menus\Administrator\Controller;
-use Joomla\Component\Menus\Administrator\Model\MenuModel;
use Joomla\CMS\Application\ApplicationHelper;
use Joomla\CMS\Application\CMSWebApplicationInterface;
use Joomla\CMS\Filter\InputFilter;
@@ -18,6 +17,7 @@
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\Router\Route;
use Joomla\Component\Menus\Administrator\Helper\MenusHelper;
+use Joomla\Component\Menus\Administrator\Model\MenuModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
@@ -117,7 +117,7 @@ public function save($key = null, $urlVar = null)
}
if (isset($validData['preset'])) {
- $preset = in_array(trim((string) $validData['preset']), ['', '0'], true) ? null : trim((string) $validData['preset']);
+ $preset = \in_array(trim((string) $validData['preset']), ['', '0'], true) ? null : trim((string) $validData['preset']);
unset($validData['preset']);
}
diff --git a/administrator/components/com_menus/src/Controller/MenusController.php b/administrator/components/com_menus/src/Controller/MenusController.php
index 1d6108b94301..23539f6f13e7 100644
--- a/administrator/components/com_menus/src/Controller/MenusController.php
+++ b/administrator/components/com_menus/src/Controller/MenusController.php
@@ -10,9 +10,9 @@
namespace Joomla\Component\Menus\Administrator\Controller;
-use Joomla\Component\Menus\Administrator\Model\MenuModel;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
+use Joomla\Component\Menus\Administrator\Model\MenuModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_menus/src/Field/MenutypeField.php b/administrator/components/com_menus/src/Field/MenutypeField.php
index 6f480178b005..1e7257dc78bc 100644
--- a/administrator/components/com_menus/src/Field/MenutypeField.php
+++ b/administrator/components/com_menus/src/Field/MenutypeField.php
@@ -10,11 +10,11 @@
namespace Joomla\Component\Menus\Administrator\Field;
-use Joomla\Component\Menus\Administrator\Model\MenutypesModel;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Field\ModalSelectField;
use Joomla\CMS\Language\Text;
use Joomla\Component\Menus\Administrator\Helper\MenusHelper;
+use Joomla\Component\Menus\Administrator\Model\MenutypesModel;
use Joomla\Utilities\ArrayHelper;
// phpcs:disable PSR1.Files.SideEffects
diff --git a/administrator/components/com_menus/src/Helper/AssociationsHelper.php b/administrator/components/com_menus/src/Helper/AssociationsHelper.php
index bdc495848590..f82e24488fc4 100644
--- a/administrator/components/com_menus/src/Helper/AssociationsHelper.php
+++ b/administrator/components/com_menus/src/Helper/AssociationsHelper.php
@@ -152,11 +152,11 @@ public function getType($typeName = '')
$fields['state'] = 'a.published';
$fields['created_user_id'] = '';
$fields['menutype'] = 'a.menutype';
- $support['state'] = true;
- $support['acl'] = true;
- $support['checkout'] = true;
- $support['level'] = true;
- $tables = [
+ $support['state'] = true;
+ $support['acl'] = true;
+ $support['checkout'] = true;
+ $support['level'] = true;
+ $tables = [
'a' => '#__menu',
];
$title = 'menu';
diff --git a/administrator/components/com_menus/src/Helper/MenusHelper.php b/administrator/components/com_menus/src/Helper/MenusHelper.php
index 67a7c6e19607..149461755505 100644
--- a/administrator/components/com_menus/src/Helper/MenusHelper.php
+++ b/administrator/components/com_menus/src/Helper/MenusHelper.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Menus\Administrator\Helper;
-use Joomla\CMS\Table\Menu;
use Joomla\CMS\Application\ApplicationHelper;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Event\Menu\PreprocessMenuItemsEvent;
@@ -20,6 +19,7 @@
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Menu\AdministratorMenuItem;
+use Joomla\CMS\Table\Menu;
use Joomla\CMS\Table\Table;
use Joomla\Database\DatabaseInterface;
use Joomla\Database\ParameterType;
@@ -905,12 +905,12 @@ protected static function parseXmlNode($node, $replace = [])
// Translate attributes for iterator values
foreach ($replace as $var => $val) {
- $item->title = str_replace(sprintf('{sql:%s}', $var), $val, $item->title);
- $item->element = str_replace(sprintf('{sql:%s}', $var), $val, $item->element);
- $item->link = str_replace(sprintf('{sql:%s}', $var), $val, $item->link);
- $item->class = str_replace(sprintf('{sql:%s}', $var), $val, $item->class);
- $item->icon = str_replace(sprintf('{sql:%s}', $var), $val, $item->icon);
- $params->set('menu-quicktask', str_replace(sprintf('{sql:%s}', $var), $val, $params->get('menu-quicktask', '')));
+ $item->title = str_replace(\sprintf('{sql:%s}', $var), $val, $item->title);
+ $item->element = str_replace(\sprintf('{sql:%s}', $var), $val, $item->element);
+ $item->link = str_replace(\sprintf('{sql:%s}', $var), $val, $item->link);
+ $item->class = str_replace(\sprintf('{sql:%s}', $var), $val, $item->class);
+ $item->icon = str_replace(\sprintf('{sql:%s}', $var), $val, $item->icon);
+ $params->set('menu-quicktask', str_replace(\sprintf('{sql:%s}', $var), $val, $params->get('menu-quicktask', '')));
}
$item->setParams($params);
diff --git a/administrator/components/com_menus/src/Model/ItemModel.php b/administrator/components/com_menus/src/Model/ItemModel.php
index 501e5d59e3b1..4cd8f1fb0bdc 100644
--- a/administrator/components/com_menus/src/Model/ItemModel.php
+++ b/administrator/components/com_menus/src/Model/ItemModel.php
@@ -10,9 +10,6 @@
namespace Joomla\Component\Menus\Administrator\Model;
-use Joomla\Cms\Table\Table;
-use Joomla\Cms\Table\Nested;
-use Joomla\CMS\Table\Menu;
use Joomla\CMS\Application\ApplicationHelper;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
@@ -22,6 +19,9 @@
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Model\AdminModel;
use Joomla\CMS\Plugin\PluginHelper;
+use Joomla\CMS\Table\Menu;
+use Joomla\Cms\Table\Nested;
+use Joomla\Cms\Table\Table;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Menus\Administrator\Helper\MenusHelper;
use Joomla\Database\ParameterType;
@@ -275,7 +275,7 @@ protected function batchCopy($value, $pks, $contexts)
$table->home = 0;
// Alter the title & alias
- [$title, $alias] = $this->generateNewTitle($table->parent_id, $table->alias, $table->title);
+ [$title, $alias] = $this->generateNewTitle($table->parent_id, $table->alias, $table->title);
$table->title = $title;
$table->alias = $alias;
@@ -1373,7 +1373,7 @@ public function save($data)
$origTable->load($this->getState('item.id'));
if ($table->title === $origTable->title) {
- [$title, $alias] = $this->generateNewTitle($table->parent_id, $table->alias, $table->title);
+ [$title, $alias] = $this->generateNewTitle($table->parent_id, $table->alias, $table->title);
$table->title = $title;
$table->alias = $alias;
}
diff --git a/administrator/components/com_menus/src/Model/MenutypesModel.php b/administrator/components/com_menus/src/Model/MenutypesModel.php
index 5efa0f66b586..0f8186da2fbf 100644
--- a/administrator/components/com_menus/src/Model/MenutypesModel.php
+++ b/administrator/components/com_menus/src/Model/MenutypesModel.php
@@ -498,7 +498,7 @@ protected function getTypeOptionsFromLayouts($component, $view)
$templateLayoutName = basename((string) $layout, '.xml');
// Add to the list only if it is not a standard layout
- if (!in_array($templateLayoutName, $layoutNames)) {
+ if (!\in_array($templateLayoutName, $layoutNames)) {
$layouts[] = $layout;
// Set template name array so we can get the right template for the layout
diff --git a/administrator/components/com_menus/src/View/Item/HtmlView.php b/administrator/components/com_menus/src/View/Item/HtmlView.php
index 51ab52ec57b8..a9c71350d846 100644
--- a/administrator/components/com_menus/src/View/Item/HtmlView.php
+++ b/administrator/components/com_menus/src/View/Item/HtmlView.php
@@ -10,10 +10,9 @@
namespace Joomla\Component\Menus\Administrator\View\Item;
-use Joomla\CMS\Form\Form;
-use Joomla\Registry\Registry;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
@@ -22,6 +21,7 @@
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Menus\Administrator\Model\ItemModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_menus/src/View/Items/HtmlView.php b/administrator/components/com_menus/src/View/Items/HtmlView.php
index d9c06d9ceb6b..9f30fa8a0ec6 100644
--- a/administrator/components/com_menus/src/View/Items/HtmlView.php
+++ b/administrator/components/com_menus/src/View/Items/HtmlView.php
@@ -10,19 +10,19 @@
namespace Joomla\Component\Menus\Administrator\View\Items;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\Registry\Registry;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Event\Menu\BeforeRenderMenuItemsViewEvent;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Menus\Administrator\Model\ItemsModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_menus/src/View/Menu/HtmlView.php b/administrator/components/com_menus/src/View/Menu/HtmlView.php
index 659223d908e5..d0bee5567c6d 100644
--- a/administrator/components/com_menus/src/View/Menu/HtmlView.php
+++ b/administrator/components/com_menus/src/View/Menu/HtmlView.php
@@ -10,9 +10,8 @@
namespace Joomla\Component\Menus\Administrator\View\Menu;
-use Joomla\CMS\Form\Form;
-use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
@@ -20,6 +19,7 @@
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Menus\Administrator\Model\MenuModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_menus/src/View/Menu/XmlView.php b/administrator/components/com_menus/src/View/Menu/XmlView.php
index bded2c7d677b..398fd69a538c 100644
--- a/administrator/components/com_menus/src/View/Menu/XmlView.php
+++ b/administrator/components/com_menus/src/View/Menu/XmlView.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Menus\Administrator\View\Menu;
-use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Log\Log;
@@ -18,6 +17,7 @@
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Router\Route;
use Joomla\Component\Menus\Administrator\Helper\MenusHelper;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
@@ -82,7 +82,7 @@ public function display($tpl = null)
}
if (headers_sent($file, $line)) {
- Log::add(sprintf('Headers already sent at %s:%d.', $file, $line), Log::ERROR, 'jerror');
+ Log::add(\sprintf('Headers already sent at %s:%d.', $file, $line), Log::ERROR, 'jerror');
return;
}
diff --git a/administrator/components/com_menus/src/View/Menus/HtmlView.php b/administrator/components/com_menus/src/View/Menus/HtmlView.php
index 978488000564..91a910895985 100644
--- a/administrator/components/com_menus/src/View/Menus/HtmlView.php
+++ b/administrator/components/com_menus/src/View/Menus/HtmlView.php
@@ -10,15 +10,15 @@
namespace Joomla\Component\Menus\Administrator\View\Menus;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\Registry\Registry;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Menus\Administrator\Model\MenusModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_messages/src/Model/ConfigModel.php b/administrator/components/com_messages/src/Model/ConfigModel.php
index fa11f8b1d5cd..1997d901c9ed 100644
--- a/administrator/components/com_messages/src/Model/ConfigModel.php
+++ b/administrator/components/com_messages/src/Model/ConfigModel.php
@@ -10,8 +10,8 @@
namespace Joomla\Component\Messages\Administrator\Model;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Component\ComponentHelper;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\MVC\Model\FormModel;
use Joomla\CMS\Object\CMSObject;
use Joomla\Database\ParameterType;
diff --git a/administrator/components/com_messages/src/Model/MessageModel.php b/administrator/components/com_messages/src/Model/MessageModel.php
index 31aab7e4749b..e446c4759e2d 100644
--- a/administrator/components/com_messages/src/Model/MessageModel.php
+++ b/administrator/components/com_messages/src/Model/MessageModel.php
@@ -10,11 +10,11 @@
namespace Joomla\Component\Messages\Administrator\Model;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Access\Access;
use Joomla\CMS\Access\Rule;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Language;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Log\Log;
diff --git a/administrator/components/com_messages/src/View/Config/HtmlView.php b/administrator/components/com_messages/src/View/Config/HtmlView.php
index 0dd6237f3eaf..08f6471a15fd 100644
--- a/administrator/components/com_messages/src/View/Config/HtmlView.php
+++ b/administrator/components/com_messages/src/View/Config/HtmlView.php
@@ -10,14 +10,14 @@
namespace Joomla\Component\Messages\Administrator\View\Config;
-use Joomla\CMS\Form\Form;
-use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Messages\Administrator\Model\ConfigModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_messages/src/View/Message/HtmlView.php b/administrator/components/com_messages/src/View/Message/HtmlView.php
index 8d285daa5a95..336ba0f4af56 100644
--- a/administrator/components/com_messages/src/View/Message/HtmlView.php
+++ b/administrator/components/com_messages/src/View/Message/HtmlView.php
@@ -10,9 +10,8 @@
namespace Joomla\Component\Messages\Administrator\View\Message;
-use Joomla\CMS\Form\Form;
-use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
@@ -20,6 +19,7 @@
use Joomla\CMS\User\UserFactoryAwareInterface;
use Joomla\CMS\User\UserFactoryAwareTrait;
use Joomla\Component\Messages\Administrator\Model\MessageModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_messages/src/View/Messages/HtmlView.php b/administrator/components/com_messages/src/View/Messages/HtmlView.php
index 85cff4ea20a3..4e90bed79b8c 100644
--- a/administrator/components/com_messages/src/View/Messages/HtmlView.php
+++ b/administrator/components/com_messages/src/View/Messages/HtmlView.php
@@ -10,15 +10,15 @@
namespace Joomla\Component\Messages\Administrator\View\Messages;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\Registry\Registry;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Messages\Administrator\Model\MessagesModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_modules/src/Field/ModulesModuleField.php b/administrator/components/com_modules/src/Field/ModulesModuleField.php
index 24fe3bcde3bd..7de4a004e1d8 100644
--- a/administrator/components/com_modules/src/Field/ModulesModuleField.php
+++ b/administrator/components/com_modules/src/Field/ModulesModuleField.php
@@ -53,7 +53,7 @@ public function __get($name)
{
return match ($name) {
'client' => $this->$name,
- default => parent::__get($name),
+ default => parent::__get($name),
};
}
diff --git a/administrator/components/com_modules/src/Field/ModulesPositionField.php b/administrator/components/com_modules/src/Field/ModulesPositionField.php
index 06d252f85dd9..4f6118ac4061 100644
--- a/administrator/components/com_modules/src/Field/ModulesPositionField.php
+++ b/administrator/components/com_modules/src/Field/ModulesPositionField.php
@@ -53,7 +53,7 @@ public function __get($name)
{
return match ($name) {
'client' => $this->$name,
- default => parent::__get($name),
+ default => parent::__get($name),
};
}
diff --git a/administrator/components/com_modules/src/Field/ModulesPositioneditField.php b/administrator/components/com_modules/src/Field/ModulesPositioneditField.php
index 1efb82adf3c6..0ef8ffa25534 100644
--- a/administrator/components/com_modules/src/Field/ModulesPositioneditField.php
+++ b/administrator/components/com_modules/src/Field/ModulesPositioneditField.php
@@ -61,7 +61,7 @@ public function __get($name)
{
return match ($name) {
'client' => $this->$name,
- default => parent::__get($name),
+ default => parent::__get($name),
};
}
diff --git a/administrator/components/com_modules/src/View/Module/HtmlView.php b/administrator/components/com_modules/src/View/Module/HtmlView.php
index 7d311e492332..3a5db4c56bf2 100644
--- a/administrator/components/com_modules/src/View/Module/HtmlView.php
+++ b/administrator/components/com_modules/src/View/Module/HtmlView.php
@@ -10,9 +10,8 @@
namespace Joomla\Component\Modules\Administrator\View\Module;
-use Joomla\CMS\Form\Form;
-use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
@@ -20,6 +19,7 @@
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Modules\Administrator\Model\ModuleModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_modules/src/View/Modules/HtmlView.php b/administrator/components/com_modules/src/View/Modules/HtmlView.php
index 94a2c1df349a..33babe663ff7 100644
--- a/administrator/components/com_modules/src/View/Modules/HtmlView.php
+++ b/administrator/components/com_modules/src/View/Modules/HtmlView.php
@@ -10,19 +10,19 @@
namespace Joomla\Component\Modules\Administrator\View\Modules;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\Registry\Registry;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Helper\ModuleHelper;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\Button\DropdownButton;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Modules\Administrator\Model\ModulesModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_modules/src/View/Select/HtmlView.php b/administrator/components/com_modules/src/View/Select/HtmlView.php
index 2e216d83f7b5..d8bb7a0886b1 100644
--- a/administrator/components/com_modules/src/View/Select/HtmlView.php
+++ b/administrator/components/com_modules/src/View/Select/HtmlView.php
@@ -10,13 +10,13 @@
namespace Joomla\Component\Modules\Administrator\View\Select;
-use Joomla\Registry\Registry;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Modules\Administrator\Model\SelectModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_newsfeeds/src/Model/NewsfeedModel.php b/administrator/components/com_newsfeeds/src/Model/NewsfeedModel.php
index 8322ca2124ff..cf824d543251 100644
--- a/administrator/components/com_newsfeeds/src/Model/NewsfeedModel.php
+++ b/administrator/components/com_newsfeeds/src/Model/NewsfeedModel.php
@@ -10,8 +10,6 @@
namespace Joomla\Component\Newsfeeds\Administrator\Model;
-use Joomla\Component\Categories\Administrator\Model\CategoryModel;
-use Joomla\CMS\Table\Table;
use Joomla\CMS\Application\ApplicationHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Form;
@@ -19,8 +17,10 @@
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\LanguageHelper;
use Joomla\CMS\MVC\Model\AdminModel;
+use Joomla\CMS\Table\Table;
use Joomla\CMS\Versioning\VersionableModelTrait;
use Joomla\Component\Categories\Administrator\Helper\CategoriesHelper;
+use Joomla\Component\Categories\Administrator\Model\CategoryModel;
use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
@@ -221,7 +221,7 @@ public function save($data)
$origTable->load($input->getInt('id'));
if ($data['name'] == $origTable->name) {
- [$name, $alias] = $this->generateNewTitle($data['catid'], $data['alias'], $data['name']);
+ [$name, $alias] = $this->generateNewTitle($data['catid'], $data['alias'], $data['name']);
$data['name'] = $name;
$data['alias'] = $alias;
} elseif ($data['alias'] == $origTable->alias) {
diff --git a/administrator/components/com_newsfeeds/src/View/Newsfeed/HtmlView.php b/administrator/components/com_newsfeeds/src/View/Newsfeed/HtmlView.php
index e909bc8a4303..7bc8ab22e1b3 100644
--- a/administrator/components/com_newsfeeds/src/View/Newsfeed/HtmlView.php
+++ b/administrator/components/com_newsfeeds/src/View/Newsfeed/HtmlView.php
@@ -10,10 +10,9 @@
namespace Joomla\Component\Newsfeeds\Administrator\View\Newsfeed;
-use Joomla\Registry\Registry;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Text;
@@ -22,6 +21,7 @@
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Newsfeeds\Administrator\Model\NewsfeedModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_newsfeeds/src/View/Newsfeeds/HtmlView.php b/administrator/components/com_newsfeeds/src/View/Newsfeeds/HtmlView.php
index 65e04502e6ec..ab79217a7912 100644
--- a/administrator/components/com_newsfeeds/src/View/Newsfeeds/HtmlView.php
+++ b/administrator/components/com_newsfeeds/src/View/Newsfeeds/HtmlView.php
@@ -10,18 +10,18 @@
namespace Joomla\Component\Newsfeeds\Administrator\View\Newsfeeds;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\Registry\Registry;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\Button\DropdownButton;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Newsfeeds\Administrator\Model\NewsfeedsModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_plugins/src/Field/PluginorderingField.php b/administrator/components/com_plugins/src/Field/PluginorderingField.php
index f1bcd8f1cc2a..1dba6b461137 100644
--- a/administrator/components/com_plugins/src/Field/PluginorderingField.php
+++ b/administrator/components/com_plugins/src/Field/PluginorderingField.php
@@ -10,8 +10,8 @@
namespace Joomla\Component\Plugins\Administrator\Field;
-use Joomla\Database\DatabaseQuery;
use Joomla\CMS\Form\Field\OrderingField;
+use Joomla\Database\DatabaseQuery;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_plugins/src/Model/PluginsModel.php b/administrator/components/com_plugins/src/Model/PluginsModel.php
index 644567321dca..0f6fa3ec457a 100644
--- a/administrator/components/com_plugins/src/Model/PluginsModel.php
+++ b/administrator/components/com_plugins/src/Model/PluginsModel.php
@@ -135,7 +135,7 @@ protected function _getList($query, $limitstart = 0, $limit = 0)
$escapedSearchString = $this->refineSearchStringToRegex($search, '/');
foreach ($result as $i => $item) {
- if (in_array(preg_match(sprintf('/%s/i', $escapedSearchString), $item->name), [0, false], true)) {
+ if (\in_array(preg_match(\sprintf('/%s/i', $escapedSearchString), $item->name), [0, false], true)) {
unset($result[$i]);
}
}
diff --git a/administrator/components/com_plugins/src/View/Plugin/HtmlView.php b/administrator/components/com_plugins/src/View/Plugin/HtmlView.php
index e08ab9d8b59c..ca406d9591fd 100644
--- a/administrator/components/com_plugins/src/View/Plugin/HtmlView.php
+++ b/administrator/components/com_plugins/src/View/Plugin/HtmlView.php
@@ -10,15 +10,15 @@
namespace Joomla\Component\Plugins\Administrator\View\Plugin;
-use Joomla\CMS\Form\Form;
-use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Plugins\Administrator\Model\PluginModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_plugins/src/View/Plugins/HtmlView.php b/administrator/components/com_plugins/src/View/Plugins/HtmlView.php
index 6943f071af22..577bcfffa5ac 100644
--- a/administrator/components/com_plugins/src/View/Plugins/HtmlView.php
+++ b/administrator/components/com_plugins/src/View/Plugins/HtmlView.php
@@ -10,15 +10,15 @@
namespace Joomla\Component\Plugins\Administrator\View\Plugins;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\Registry\Registry;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Plugins\Administrator\Model\PluginsModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_privacy/src/Plugin/PrivacyPlugin.php b/administrator/components/com_privacy/src/Plugin/PrivacyPlugin.php
index 6ee052dc655e..ef13a3f4e211 100644
--- a/administrator/components/com_privacy/src/Plugin/PrivacyPlugin.php
+++ b/administrator/components/com_privacy/src/Plugin/PrivacyPlugin.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Privacy\Administrator\Plugin;
-use Joomla\Database\DatabaseDriver;
use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\CMS\Table\Table;
use Joomla\Component\Fields\Administrator\Helper\FieldsHelper;
@@ -18,6 +17,7 @@
use Joomla\Component\Privacy\Administrator\Export\Field;
use Joomla\Component\Privacy\Administrator\Export\Item;
use Joomla\Database\DatabaseAwareTrait;
+use Joomla\Database\DatabaseDriver;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_privacy/src/Service/HTML/Privacy.php b/administrator/components/com_privacy/src/Service/HTML/Privacy.php
index c199cab73698..bf459a089c71 100644
--- a/administrator/components/com_privacy/src/Service/HTML/Privacy.php
+++ b/administrator/components/com_privacy/src/Service/HTML/Privacy.php
@@ -35,10 +35,10 @@ class Privacy
public function statusLabel($status)
{
return match ($status) {
- 2 => '' . Text::_('COM_PRIVACY_STATUS_COMPLETED') . '',
- 1 => '' . Text::_('COM_PRIVACY_STATUS_CONFIRMED') . '',
- -1 => '' . Text::_('COM_PRIVACY_STATUS_INVALID') . '',
- 0 => '' . Text::_('COM_PRIVACY_STATUS_PENDING') . '',
+ 2 => '' . Text::_('COM_PRIVACY_STATUS_COMPLETED') . '',
+ 1 => '' . Text::_('COM_PRIVACY_STATUS_CONFIRMED') . '',
+ -1 => '' . Text::_('COM_PRIVACY_STATUS_INVALID') . '',
+ 0 => '' . Text::_('COM_PRIVACY_STATUS_PENDING') . '',
default => null,
};
}
diff --git a/administrator/components/com_privacy/src/View/Capabilities/HtmlView.php b/administrator/components/com_privacy/src/View/Capabilities/HtmlView.php
index 2285a627f22b..925d07759511 100644
--- a/administrator/components/com_privacy/src/View/Capabilities/HtmlView.php
+++ b/administrator/components/com_privacy/src/View/Capabilities/HtmlView.php
@@ -10,12 +10,12 @@
namespace Joomla\Component\Privacy\Administrator\View\Capabilities;
-use Joomla\Registry\Registry;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Privacy\Administrator\Model\CapabilitiesModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_privacy/src/View/Consents/HtmlView.php b/administrator/components/com_privacy/src/View/Consents/HtmlView.php
index c88919cb79a3..da07cb269c16 100644
--- a/administrator/components/com_privacy/src/View/Consents/HtmlView.php
+++ b/administrator/components/com_privacy/src/View/Consents/HtmlView.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Privacy\Administrator\View\Consents;
-use Joomla\Registry\Registry;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
@@ -18,6 +17,7 @@
use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Privacy\Administrator\Model\ConsentsModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_privacy/src/View/Request/HtmlView.php b/administrator/components/com_privacy/src/View/Request/HtmlView.php
index 65b70b61254d..cbebcf39a562 100644
--- a/administrator/components/com_privacy/src/View/Request/HtmlView.php
+++ b/administrator/components/com_privacy/src/View/Request/HtmlView.php
@@ -10,8 +10,6 @@
namespace Joomla\Component\Privacy\Administrator\View\Request;
-use Joomla\Registry\Registry;
-use Joomla\Component\Actionlogs\Administrator\Model\ActionlogsModel;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
@@ -20,7 +18,9 @@
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Toolbar\ToolbarHelper;
+use Joomla\Component\Actionlogs\Administrator\Model\ActionlogsModel;
use Joomla\Component\Privacy\Administrator\Model\RequestModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_privacy/src/View/Requests/HtmlView.php b/administrator/components/com_privacy/src/View/Requests/HtmlView.php
index a5213182c035..78c1ef7aa91a 100644
--- a/administrator/components/com_privacy/src/View/Requests/HtmlView.php
+++ b/administrator/components/com_privacy/src/View/Requests/HtmlView.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Privacy\Administrator\View\Requests;
-use Joomla\Registry\Registry;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Form;
@@ -20,6 +19,7 @@
use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Privacy\Administrator\Model\RequestsModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_redirect/src/Controller/LinksController.php b/administrator/components/com_redirect/src/Controller/LinksController.php
index ea5505566a86..04b14b1a32a7 100644
--- a/administrator/components/com_redirect/src/Controller/LinksController.php
+++ b/administrator/components/com_redirect/src/Controller/LinksController.php
@@ -10,11 +10,11 @@
namespace Joomla\Component\Redirect\Administrator\Controller;
-use Joomla\String\StringHelper;
-use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
+use Joomla\String\StringHelper;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_redirect/src/Model/LinkModel.php b/administrator/components/com_redirect/src/Model/LinkModel.php
index 1260d8355730..bd99273ea4eb 100644
--- a/administrator/components/com_redirect/src/Model/LinkModel.php
+++ b/administrator/components/com_redirect/src/Model/LinkModel.php
@@ -10,9 +10,9 @@
namespace Joomla\Component\Redirect\Administrator\Model;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Model\AdminModel;
diff --git a/administrator/components/com_redirect/src/View/Link/HtmlView.php b/administrator/components/com_redirect/src/View/Link/HtmlView.php
index bcea8ea80988..5d84396ed847 100644
--- a/administrator/components/com_redirect/src/View/Link/HtmlView.php
+++ b/administrator/components/com_redirect/src/View/Link/HtmlView.php
@@ -10,9 +10,8 @@
namespace Joomla\Component\Redirect\Administrator\View\Link;
-use Joomla\CMS\Form\Form;
-use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
@@ -20,6 +19,7 @@
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Redirect\Administrator\Model\LinkModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_redirect/src/View/Links/HtmlView.php b/administrator/components/com_redirect/src/View/Links/HtmlView.php
index cbca9de80e01..9d45b3e412b9 100644
--- a/administrator/components/com_redirect/src/View/Links/HtmlView.php
+++ b/administrator/components/com_redirect/src/View/Links/HtmlView.php
@@ -10,19 +10,19 @@
namespace Joomla\Component\Redirect\Administrator\View\Links;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\Registry\Registry;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Component\ComponentHelper;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Toolbar\Button\DropdownButton;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Redirect\Administrator\Helper\RedirectHelper;
use Joomla\Component\Redirect\Administrator\Model\LinksModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_scheduler/src/Controller/LogsController.php b/administrator/components/com_scheduler/src/Controller/LogsController.php
index 4b51d261bdf1..e36a5a92f5a2 100644
--- a/administrator/components/com_scheduler/src/Controller/LogsController.php
+++ b/administrator/components/com_scheduler/src/Controller/LogsController.php
@@ -10,10 +10,10 @@
namespace Joomla\Component\Scheduler\Administrator\Controller;
-use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Access\Exception\NotAllowed;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Utilities\ArrayHelper;
// phpcs:disable PSR1.Files.SideEffects
diff --git a/administrator/components/com_scheduler/src/Controller/TaskController.php b/administrator/components/com_scheduler/src/Controller/TaskController.php
index 7bf471f47f04..1fd65c52c791 100644
--- a/administrator/components/com_scheduler/src/Controller/TaskController.php
+++ b/administrator/components/com_scheduler/src/Controller/TaskController.php
@@ -10,12 +10,12 @@
namespace Joomla\Component\Scheduler\Administrator\Controller;
-use Joomla\Component\Scheduler\Administrator\Task\TaskOption;
use Joomla\CMS\Application\AdministratorApplication;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\FormController;
use Joomla\CMS\Router\Route;
use Joomla\Component\Scheduler\Administrator\Helper\SchedulerHelper;
+use Joomla\Component\Scheduler\Administrator\Task\TaskOption;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_scheduler/src/Event/ExecuteTaskEvent.php b/administrator/components/com_scheduler/src/Event/ExecuteTaskEvent.php
index e99a8c42cce9..a4e66c68cb4b 100644
--- a/administrator/components/com_scheduler/src/Event/ExecuteTaskEvent.php
+++ b/administrator/components/com_scheduler/src/Event/ExecuteTaskEvent.php
@@ -40,7 +40,7 @@ public function __construct($name, array $arguments = [])
$arguments['resultSnapshot'] = null;
if (!($arguments['subject'] ?? null) instanceof Task) {
- throw new \BadMethodCallException(sprintf('The subject given for %s event must be an instance of ', $name) . Task::class);
+ throw new \BadMethodCallException(\sprintf('The subject given for %s event must be an instance of ', $name) . Task::class);
}
}
diff --git a/administrator/components/com_scheduler/src/Field/CronField.php b/administrator/components/com_scheduler/src/Field/CronField.php
index 63b2fc1f70ca..80f2692010da 100644
--- a/administrator/components/com_scheduler/src/Field/CronField.php
+++ b/administrator/components/com_scheduler/src/Field/CronField.php
@@ -168,7 +168,7 @@ protected function getOptions(): array
// If we need text labels, we translate them first
if (\array_key_exists($subtype, self::PREPARED_RESPONSE_LABELS) && !$this->onlyNumericLabels) {
$labels = array_map(
- static fn(string $string): string => Text::_($string),
+ static fn (string $string): string => Text::_($string),
self::PREPARED_RESPONSE_LABELS[$subtype]
);
} else {
diff --git a/administrator/components/com_scheduler/src/Field/WebcronLinkField.php b/administrator/components/com_scheduler/src/Field/WebcronLinkField.php
index 4a8379aff4f9..e894be672759 100644
--- a/administrator/components/com_scheduler/src/Field/WebcronLinkField.php
+++ b/administrator/components/com_scheduler/src/Field/WebcronLinkField.php
@@ -47,7 +47,7 @@ protected function getLayoutPaths(): array
$s = DIRECTORY_SEPARATOR;
return array_merge(
- [JPATH_ADMINISTRATOR . sprintf('%s/components%scom_scheduler%slayouts%s', $s, $s, $s, $s)],
+ [JPATH_ADMINISTRATOR . \sprintf('%s/components%scom_scheduler%slayouts%s', $s, $s, $s, $s)],
parent::getLayoutPaths()
);
}
diff --git a/administrator/components/com_scheduler/src/Helper/ExecRuleHelper.php b/administrator/components/com_scheduler/src/Helper/ExecRuleHelper.php
index f82a8332c3a0..7ee3232c61ad 100644
--- a/administrator/components/com_scheduler/src/Helper/ExecRuleHelper.php
+++ b/administrator/components/com_scheduler/src/Helper/ExecRuleHelper.php
@@ -105,7 +105,7 @@ public function nextExec(bool $string = true, bool $basisNow = false)
$interval = new \DateInterval('P' . $intervalDays . 'D');
$nextExec = $now->add($interval);
$execTime = $executionRules['exec-time'];
- [$hour, $minute] = explode(':', (string) $execTime);
+ [$hour, $minute] = explode(':', (string) $execTime);
$nextExec->setTime($hour, $minute);
$nextExec = $string ? $nextExec->toSql() : $nextExec;
break;
@@ -120,7 +120,7 @@ public function nextExec(bool $string = true, bool $basisNow = false)
$nextExec->setDate($nextExecYear, $nextExecMonth, $execDay);
$execTime = $executionRules['exec-time'];
- [$hour, $minute] = explode(':', (string) $execTime);
+ [$hour, $minute] = explode(':', (string) $execTime);
$nextExec->setTime($hour, $minute);
$nextExec = $string ? $nextExec->toSql() : $nextExec;
break;
diff --git a/administrator/components/com_scheduler/src/Model/TaskModel.php b/administrator/components/com_scheduler/src/Model/TaskModel.php
index 351df9f83dae..28b8b581f991 100644
--- a/administrator/components/com_scheduler/src/Model/TaskModel.php
+++ b/administrator/components/com_scheduler/src/Model/TaskModel.php
@@ -451,7 +451,7 @@ private function buildLockQuery($db, $now, $options)
->bind(':now1', $now);
$activeRoutines = array_map(
- static fn(TaskOption $taskOption): string => $taskOption->id,
+ static fn (TaskOption $taskOption): string => $taskOption->id,
SchedulerHelper::getTaskOptions()->options
);
@@ -493,7 +493,7 @@ private function getNextTaskId($db, $now, $options)
->select($db->quoteName('id'));
$activeRoutines = array_map(
- static fn(TaskOption $taskOption): string => $taskOption->id,
+ static fn (TaskOption $taskOption): string => $taskOption->id,
SchedulerHelper::getTaskOptions()->options
);
@@ -605,7 +605,7 @@ public function save($data): bool
[$basisHour, $basisMinute] = explode(':', (string) $data['execution_rules']['exec-time']);
$data['last_execution'] = Factory::getDate('now', 'GMT')->format('Y-m')
- . sprintf('-%s %s:%s:00', $basisDayOfMonth, $basisHour, $basisMinute);
+ . \sprintf('-%s %s:%s:00', $basisDayOfMonth, $basisHour, $basisMinute);
} else {
$data['last_execution'] = $this->getItem($id)->last_execution;
}
@@ -824,7 +824,7 @@ private function wildcardIfMatch(array $target, array $reference, bool $targetTo
{
if ($targetToInt) {
$target = array_map(
- static fn(string $x): int => (int) $x,
+ static fn (string $x): int => (int) $x,
$target
);
}
diff --git a/administrator/components/com_scheduler/src/Model/TasksModel.php b/administrator/components/com_scheduler/src/Model/TasksModel.php
index 96ea1e359efe..0324965fc759 100644
--- a/administrator/components/com_scheduler/src/Model/TasksModel.php
+++ b/administrator/components/com_scheduler/src/Model/TasksModel.php
@@ -185,7 +185,7 @@ protected function getListQuery(): QueryInterface
->bind(':id', $id, ParameterType::INTEGER);
} elseif ($title = $this->getState('filter.title')) {
$filterCount++;
- $match = sprintf('%%%s%%', $title);
+ $match = \sprintf('%%%s%%', $title);
$query->where($db->quoteName('a.title') . ' LIKE :match')
->bind(':match', $match);
}
@@ -199,7 +199,7 @@ protected function getListQuery(): QueryInterface
// Array of all active routine ids
$activeRoutines = array_map(
- static fn(TaskOption $taskOption): string => $taskOption->id,
+ static fn (TaskOption $taskOption): string => $taskOption->id,
$taskOptions->options
);
@@ -308,7 +308,7 @@ protected function getListQuery(): QueryInterface
->bind(':id', $id, ParameterType::INTEGER);
} elseif (stripos((string) $searchStr, 'type:') !== 0) {
// Search by type is handled exceptionally in _getList() [@todo: remove refs]
- $searchStr = sprintf('%%%s%%', $searchStr);
+ $searchStr = \sprintf('%%%s%%', $searchStr);
// Bind keys to query
$query->bind(':title', $searchStr)
diff --git a/administrator/components/com_scheduler/src/Traits/TaskPluginTrait.php b/administrator/components/com_scheduler/src/Traits/TaskPluginTrait.php
index 9729a5b4e239..c0facc28e8a8 100644
--- a/administrator/components/com_scheduler/src/Traits/TaskPluginTrait.php
+++ b/administrator/components/com_scheduler/src/Traits/TaskPluginTrait.php
@@ -10,8 +10,8 @@
namespace Joomla\Component\Scheduler\Administrator\Traits;
-use Joomla\CMS\Event\Model\PrepareFormEvent;
use Joomla\CMS\Event\Model;
+use Joomla\CMS\Event\Model\PrepareFormEvent;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
@@ -321,7 +321,7 @@ public function standardRoutineHandler(ExecuteTaskEvent $event): void
*
* @since 4.1.0
*/
- $validateStatus = (static fn(int $statusCode): bool => \in_array(
+ $validateStatus = (static fn (int $statusCode): bool => \in_array(
$statusCode,
(new \ReflectionClass(Status::class))->getConstants()
));
diff --git a/administrator/components/com_scheduler/src/View/Select/HtmlView.php b/administrator/components/com_scheduler/src/View/Select/HtmlView.php
index baba39f881ab..9b4ad08ee049 100644
--- a/administrator/components/com_scheduler/src/View/Select/HtmlView.php
+++ b/administrator/components/com_scheduler/src/View/Select/HtmlView.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Scheduler\Administrator\View\Select;
-use Joomla\Registry\Registry;
use Joomla\CMS\Application\AdministratorApplication;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
@@ -19,6 +18,7 @@
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Scheduler\Administrator\Model\SelectModel;
use Joomla\Component\Scheduler\Administrator\Task\TaskOption;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_scheduler/src/View/Task/HtmlView.php b/administrator/components/com_scheduler/src/View/Task/HtmlView.php
index 903fc42fa1b2..639db9414be1 100644
--- a/administrator/components/com_scheduler/src/View/Task/HtmlView.php
+++ b/administrator/components/com_scheduler/src/View/Task/HtmlView.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Scheduler\Administrator\View\Task;
-use Joomla\Registry\Registry;
use Joomla\CMS\Application\AdministratorApplication;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Form;
@@ -19,6 +18,7 @@
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Scheduler\Administrator\Model\TaskModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_scheduler/src/View/Tasks/HtmlView.php b/administrator/components/com_scheduler/src/View/Tasks/HtmlView.php
index 8d3437fce85c..e73d868cb060 100644
--- a/administrator/components/com_scheduler/src/View/Tasks/HtmlView.php
+++ b/administrator/components/com_scheduler/src/View/Tasks/HtmlView.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Scheduler\Administrator\View\Tasks;
-use Joomla\Registry\Registry;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
@@ -20,6 +19,7 @@
use Joomla\CMS\Toolbar\Button\DropdownButton;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Scheduler\Administrator\Model\TasksModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_tags/src/Controller/TagsController.php b/administrator/components/com_tags/src/Controller/TagsController.php
index 95e02d25adb9..e02af3374068 100644
--- a/administrator/components/com_tags/src/Controller/TagsController.php
+++ b/administrator/components/com_tags/src/Controller/TagsController.php
@@ -10,12 +10,12 @@
namespace Joomla\Component\Tags\Administrator\Controller;
-use Joomla\CMS\MVC\Model\BaseDatabaseModel;
-use Joomla\Component\Tags\Administrator\Model\TagModel;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Response\JsonResponse;
use Joomla\CMS\Router\Route;
+use Joomla\Component\Tags\Administrator\Model\TagModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_tags/src/Model/TagModel.php b/administrator/components/com_tags/src/Model/TagModel.php
index 4dfc5dcc205c..465b9dfd7512 100644
--- a/administrator/components/com_tags/src/Model/TagModel.php
+++ b/administrator/components/com_tags/src/Model/TagModel.php
@@ -10,15 +10,15 @@
namespace Joomla\Component\Tags\Administrator\Model;
-use Joomla\CMS\Form\Form;
-use Joomla\Component\Tags\Administrator\Table\TagTable;
-use Joomla\CMS\Table\Table;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Date\Date;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\MVC\Model\AdminModel;
use Joomla\CMS\Plugin\PluginHelper;
+use Joomla\CMS\Table\Table;
use Joomla\CMS\Versioning\VersionableModelTrait;
+use Joomla\Component\Tags\Administrator\Table\TagTable;
use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
@@ -242,7 +242,7 @@ public function save($data)
$origTable->load($input->getInt('id'));
if ($data['title'] == $origTable->title) {
- [$title, $alias] = $this->generateNewTitle($data['parent_id'], $data['alias'], $data['title']);
+ [$title, $alias] = $this->generateNewTitle($data['parent_id'], $data['alias'], $data['title']);
$data['title'] = $title;
$data['alias'] = $alias;
} elseif ($data['alias'] == $origTable->alias) {
diff --git a/administrator/components/com_tags/src/View/Tag/HtmlView.php b/administrator/components/com_tags/src/View/Tag/HtmlView.php
index e8c4471fc9b6..08f38bc4a6e9 100644
--- a/administrator/components/com_tags/src/View/Tag/HtmlView.php
+++ b/administrator/components/com_tags/src/View/Tag/HtmlView.php
@@ -10,10 +10,9 @@
namespace Joomla\Component\Tags\Administrator\View\Tag;
-use Joomla\CMS\Form\Form;
-use Joomla\Registry\Registry;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
@@ -21,6 +20,7 @@
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Tags\Administrator\Model\TagModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_tags/src/View/Tags/HtmlView.php b/administrator/components/com_tags/src/View/Tags/HtmlView.php
index b162fe234b5c..796b5aa1b26e 100644
--- a/administrator/components/com_tags/src/View/Tags/HtmlView.php
+++ b/administrator/components/com_tags/src/View/Tags/HtmlView.php
@@ -10,17 +10,17 @@
namespace Joomla\Component\Tags\Administrator\View\Tags;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\Registry\Registry;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\Button\DropdownButton;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Tags\Administrator\Model\TagsModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_templates/src/Controller/StylesController.php b/administrator/components/com_templates/src/Controller/StylesController.php
index ccda70711145..8a87d1508191 100644
--- a/administrator/components/com_templates/src/Controller/StylesController.php
+++ b/administrator/components/com_templates/src/Controller/StylesController.php
@@ -10,10 +10,10 @@
namespace Joomla\Component\Templates\Administrator\Controller;
-use Joomla\Component\Templates\Administrator\Model\StyleModel;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
+use Joomla\Component\Templates\Administrator\Model\StyleModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_templates/src/Controller/TemplateController.php b/administrator/components/com_templates/src/Controller/TemplateController.php
index 42d0377e2a84..fbc0de1e5125 100644
--- a/administrator/components/com_templates/src/Controller/TemplateController.php
+++ b/administrator/components/com_templates/src/Controller/TemplateController.php
@@ -10,18 +10,18 @@
namespace Joomla\Component\Templates\Administrator\Controller;
-use Joomla\Component\Installer\Administrator\Model\InstallModel;
-use Joomla\CMS\MVC\Model\BaseDatabaseModel;
-use Joomla\Component\Templates\Administrator\Model\TemplateModel;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Application\CMSWebApplicationInterface;
use Joomla\CMS\Filter\InputFilter;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
+use Joomla\Component\Installer\Administrator\Model\InstallModel;
+use Joomla\Component\Templates\Administrator\Model\TemplateModel;
use Joomla\Filesystem\Path;
use Joomla\Input\Input;
use Joomla\Utilities\ArrayHelper;
@@ -487,7 +487,7 @@ public function createFile()
$this->setMessage(Text::_('COM_TEMPLATES_INVALID_FILE_TYPE'), 'error');
$url = 'index.php?option=com_templates&view=template&id=' . $id . '&file=' . $file . '&isMedia=' . $this->input->getInt('isMedia', 0);
$this->setRedirect(Route::_($url, false));
- } elseif (in_array(preg_match('/^(?!\.)(?!.*\.$)(?!.*\.\.)[a-zA-Z0-9_.-]+$/', $name), [0, false], true)) {
+ } elseif (\in_array(preg_match('/^(?!\.)(?!.*\.$)(?!.*\.\.)[a-zA-Z0-9_.-]+$/', $name), [0, false], true)) {
$this->setMessage(Text::_('COM_TEMPLATES_INVALID_FILE_NAME'), 'error');
$url = 'index.php?option=com_templates&view=template&id=' . $id . '&file=' . $file . '&isMedia=' . $this->input->getInt('isMedia', 0);
$this->setRedirect(Route::_($url, false));
@@ -579,7 +579,7 @@ public function createFolder()
return;
}
- if (in_array(preg_match('/^[a-zA-Z0-9-_.]+$/', (string) $name), [0, false], true)) {
+ if (\in_array(preg_match('/^[a-zA-Z0-9-_.]+$/', (string) $name), [0, false], true)) {
$this->setMessage(Text::_('COM_TEMPLATES_INVALID_FOLDER_NAME'), 'error');
$url = 'index.php?option=com_templates&view=template&id=' . $id . '&file=' . $file . '&isMedia=' . $this->input->getInt('isMedia', 0);
$this->setRedirect(Route::_($url, false));
@@ -680,7 +680,7 @@ public function renameFile()
$this->setMessage(Text::_('COM_TEMPLATES_ERROR_RENAME_ASSET_FILE'), 'warning');
$url = 'index.php?option=com_templates&view=template&id=' . $id . '&file=' . $file . '&isMedia=' . $isMedia;
$this->setRedirect(Route::_($url, false));
- } elseif (in_array(preg_match('/^(?!\.)(?!.*\.$)(?!.*\.\.)[a-zA-Z0-9_.-]+$/', (string) $newName), [0, false], true)) {
+ } elseif (\in_array(preg_match('/^(?!\.)(?!.*\.$)(?!.*\.\.)[a-zA-Z0-9_.-]+$/', (string) $newName), [0, false], true)) {
$this->setMessage(Text::_('COM_TEMPLATES_INVALID_FILE_NAME'), 'error');
$url = 'index.php?option=com_templates&view=template&id=' . $id . '&file=' . $file . '&isMedia=' . $isMedia;
$this->setRedirect(Route::_($url, false));
@@ -810,7 +810,7 @@ public function copyFile()
return;
}
- if (in_array(preg_match('/^[a-zA-Z0-9-_]+$/', (string) $newName), [0, false], true)) {
+ if (\in_array(preg_match('/^[a-zA-Z0-9-_]+$/', (string) $newName), [0, false], true)) {
$this->setMessage(Text::_('COM_TEMPLATES_INVALID_FILE_NAME'), 'error');
$url = 'index.php?option=com_templates&view=template&id=' . $id . '&file=' . $file . '&isMedia=' . $this->input->getInt('isMedia', 0);
$this->setRedirect(Route::_($url, false));
diff --git a/administrator/components/com_templates/src/Model/TemplateModel.php b/administrator/components/com_templates/src/Model/TemplateModel.php
index 6b08f0734124..46f00e45c27e 100644
--- a/administrator/components/com_templates/src/Model/TemplateModel.php
+++ b/administrator/components/com_templates/src/Model/TemplateModel.php
@@ -106,7 +106,7 @@ protected function storeFileInfo($path, $name, $template)
$temp->client = $template->client_id;
$temp->template = $template->element;
$temp->extension_id = $template->extension_id;
- $temp->coreFile = $this->getCoreFile($path . $name, $template->client_id) ? md5_file($coreFile) : null;
+ $temp->coreFile = $this->getCoreFile($path . $name, $template->client_id) ? md5_file($coreFile) : null;
if ($this->getCoreFile($path . $name, $template->client_id)) {
md5_file($coreFile);
}
@@ -251,7 +251,7 @@ public function getCoreList()
// Sort list of stdClass array.
usort(
$this->coreFileList,
- fn($a, $b) => strcmp($a->id, $b->id)
+ fn ($a, $b) => strcmp($a->id, $b->id)
);
return $this->coreFileList;
@@ -1563,9 +1563,9 @@ public function cropImage($file, $w, $h, $x, $y)
$imageType = match ($properties->mime) {
'image/webp' => \IMAGETYPE_WEBP,
- 'image/png' => \IMAGETYPE_PNG,
- 'image/gif' => \IMAGETYPE_GIF,
- default => \IMAGETYPE_JPEG,
+ 'image/png' => \IMAGETYPE_PNG,
+ 'image/gif' => \IMAGETYPE_GIF,
+ default => \IMAGETYPE_JPEG,
};
$image->crop($w, $h, $x, $y, false);
@@ -1603,9 +1603,9 @@ public function resizeImage($file, $width, $height)
$imageType = match ($properties->mime) {
'image/webp' => \IMAGETYPE_WEBP,
- 'image/png' => \IMAGETYPE_PNG,
- 'image/gif' => \IMAGETYPE_GIF,
- default => \IMAGETYPE_JPEG,
+ 'image/png' => \IMAGETYPE_PNG,
+ 'image/gif' => \IMAGETYPE_GIF,
+ default => \IMAGETYPE_JPEG,
};
$image->resize($width, $height, false, Image::SCALE_FILL);
diff --git a/administrator/components/com_templates/src/View/Style/HtmlView.php b/administrator/components/com_templates/src/View/Style/HtmlView.php
index 42a088e2a9b1..39cf8ae38d6f 100644
--- a/administrator/components/com_templates/src/View/Style/HtmlView.php
+++ b/administrator/components/com_templates/src/View/Style/HtmlView.php
@@ -10,9 +10,8 @@
namespace Joomla\Component\Templates\Administrator\View\Style;
-use Joomla\CMS\Form\Form;
-use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
@@ -20,6 +19,7 @@
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Templates\Administrator\Model\StyleModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_templates/src/View/Style/JsonView.php b/administrator/components/com_templates/src/View/Style/JsonView.php
index d0e41bea2377..848d4dd762c4 100644
--- a/administrator/components/com_templates/src/View/Style/JsonView.php
+++ b/administrator/components/com_templates/src/View/Style/JsonView.php
@@ -10,11 +10,11 @@
namespace Joomla\Component\Templates\Administrator\View\Style;
-use Joomla\CMS\Form\Form;
-use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\Component\Templates\Administrator\Model\StyleModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_templates/src/View/Styles/HtmlView.php b/administrator/components/com_templates/src/View/Styles/HtmlView.php
index d313be3a5bc5..c3fca3a1e251 100644
--- a/administrator/components/com_templates/src/View/Styles/HtmlView.php
+++ b/administrator/components/com_templates/src/View/Styles/HtmlView.php
@@ -10,16 +10,16 @@
namespace Joomla\Component\Templates\Administrator\View\Styles;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\Registry\Registry;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Component\ComponentHelper;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Templates\Administrator\Model\StylesModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_templates/src/View/Template/HtmlView.php b/administrator/components/com_templates/src/View/Template/HtmlView.php
index 8ce040276da7..4b2cc675d004 100644
--- a/administrator/components/com_templates/src/View/Template/HtmlView.php
+++ b/administrator/components/com_templates/src/View/Template/HtmlView.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Templates\Administrator\View\Template;
-use Joomla\Registry\Registry;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Filter\InputFilter;
@@ -22,6 +21,7 @@
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Templates\Administrator\Model\TemplateModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_templates/src/View/Templates/HtmlView.php b/administrator/components/com_templates/src/View/Templates/HtmlView.php
index 197eb6a56349..cc071ea2399d 100644
--- a/administrator/components/com_templates/src/View/Templates/HtmlView.php
+++ b/administrator/components/com_templates/src/View/Templates/HtmlView.php
@@ -10,8 +10,8 @@
namespace Joomla\Component\Templates\Administrator\View\Templates;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Component\ComponentHelper;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
diff --git a/administrator/components/com_users/src/Controller/CaptiveController.php b/administrator/components/com_users/src/Controller/CaptiveController.php
index 66c63e99a336..10fc04046c9d 100644
--- a/administrator/components/com_users/src/Controller/CaptiveController.php
+++ b/administrator/components/com_users/src/Controller/CaptiveController.php
@@ -199,7 +199,7 @@ public function validate($cachable = false, $urlparameters = [])
$isValidCode = array_reduce(
$results,
- fn(bool $carry, $result) => $carry || \boolval($result),
+ fn (bool $carry, $result) => $carry || \boolval($result),
false
);
diff --git a/administrator/components/com_users/src/Controller/LevelsController.php b/administrator/components/com_users/src/Controller/LevelsController.php
index 80a9da481cda..cf8f757ba229 100644
--- a/administrator/components/com_users/src/Controller/LevelsController.php
+++ b/administrator/components/com_users/src/Controller/LevelsController.php
@@ -10,8 +10,8 @@
namespace Joomla\Component\Users\Administrator\Controller;
-use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\MVC\Controller\AdminController;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_users/src/Controller/NotesController.php b/administrator/components/com_users/src/Controller/NotesController.php
index 148afe5fe155..d3c49b76e2bb 100644
--- a/administrator/components/com_users/src/Controller/NotesController.php
+++ b/administrator/components/com_users/src/Controller/NotesController.php
@@ -10,8 +10,8 @@
namespace Joomla\Component\Users\Administrator\Controller;
-use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\MVC\Controller\AdminController;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_users/src/Dispatcher/Dispatcher.php b/administrator/components/com_users/src/Dispatcher/Dispatcher.php
index 3e4d71b88b6b..3033f396458a 100644
--- a/administrator/components/com_users/src/Dispatcher/Dispatcher.php
+++ b/administrator/components/com_users/src/Dispatcher/Dispatcher.php
@@ -58,7 +58,7 @@ protected function checkAccess()
$allowedViews = ['callback', 'captive', 'method', 'methods'];
$isAllowedTask = array_reduce(
$allowedViews,
- fn($carry, $taskPrefix) => $carry || str_starts_with($task ?? '', $taskPrefix . '.'),
+ fn ($carry, $taskPrefix) => $carry || str_starts_with($task ?? '', $taskPrefix . '.'),
false
);
diff --git a/administrator/components/com_users/src/Model/BackupcodesModel.php b/administrator/components/com_users/src/Model/BackupcodesModel.php
index 8965b7dd1eba..8f0315fc24e1 100644
--- a/administrator/components/com_users/src/Model/BackupcodesModel.php
+++ b/administrator/components/com_users/src/Model/BackupcodesModel.php
@@ -212,7 +212,7 @@ public function getBackupCodes(?User $user = null): ?array
public function isBackupCode($code, ?User $user = null): bool
{
// Load the backup codes
- $codes = in_array($this->getBackupCodes($user), [null, []], true) ? array_fill(0, 10, '') : $this->getBackupCodes($user);
+ $codes = \in_array($this->getBackupCodes($user), [null, []], true) ? array_fill(0, 10, '') : $this->getBackupCodes($user);
// Keep only the numbers in the provided $code
$code = filter_var($code, FILTER_SANITIZE_NUMBER_INT);
diff --git a/administrator/components/com_users/src/Model/CaptiveModel.php b/administrator/components/com_users/src/Model/CaptiveModel.php
index dd1b8530ca42..cc4a94bfb911 100644
--- a/administrator/components/com_users/src/Model/CaptiveModel.php
+++ b/administrator/components/com_users/src/Model/CaptiveModel.php
@@ -10,11 +10,11 @@
namespace Joomla\Component\Users\Administrator\Model;
-use Joomla\CMS\Event\Module\AfterModuleListEvent;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Date\Date;
use Joomla\CMS\Event\Module;
+use Joomla\CMS\Event\Module\AfterModuleListEvent;
use Joomla\CMS\Event\MultiFactor\Captive;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
@@ -107,7 +107,7 @@ public function getRecords(?User $user = null, bool $includeBackupCodes = false)
if (!$includeBackupCodes) {
$methodNames = array_filter(
$methodNames,
- fn($method) => $method != 'backupcodes'
+ fn ($method) => $method != 'backupcodes'
);
}
diff --git a/administrator/components/com_users/src/Model/MethodModel.php b/administrator/components/com_users/src/Model/MethodModel.php
index 2623979441fd..e3e140ab1acd 100644
--- a/administrator/components/com_users/src/Model/MethodModel.php
+++ b/administrator/components/com_users/src/Model/MethodModel.php
@@ -171,7 +171,7 @@ public function getPageTitle(): string
$task = $this->getState('task', 'edit');
$key = match ($task) {
- 'mfa' => 'COM_USERS_USER_MULTIFACTOR_AUTH',
+ 'mfa' => 'COM_USERS_USER_MULTIFACTOR_AUTH',
default => \sprintf('COM_USERS_MFA_%s_PAGE_HEAD', $task),
};
diff --git a/administrator/components/com_users/src/Model/NoteModel.php b/administrator/components/com_users/src/Model/NoteModel.php
index d7b63b05c319..2ca448c33667 100644
--- a/administrator/components/com_users/src/Model/NoteModel.php
+++ b/administrator/components/com_users/src/Model/NoteModel.php
@@ -10,8 +10,8 @@
namespace Joomla\Component\Users\Administrator\Model;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\MVC\Model\AdminModel;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Versioning\VersionableModelTrait;
diff --git a/administrator/components/com_users/src/Model/UserModel.php b/administrator/components/com_users/src/Model/UserModel.php
index 931297f12246..4bcd25df08e7 100644
--- a/administrator/components/com_users/src/Model/UserModel.php
+++ b/administrator/components/com_users/src/Model/UserModel.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Users\Administrator\Model;
-use Joomla\Component\Users\Administrator\Helper\Mfa;
use Joomla\CMS\Access\Access;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
@@ -24,6 +23,7 @@
use Joomla\CMS\User\UserFactoryAwareInterface;
use Joomla\CMS\User\UserFactoryAwareTrait;
use Joomla\CMS\User\UserHelper;
+use Joomla\Component\Users\Administrator\Helper\Mfa;
use Joomla\Database\ParameterType;
use Joomla\Utilities\ArrayHelper;
diff --git a/administrator/components/com_users/src/Service/HTML/Users.php b/administrator/components/com_users/src/Service/HTML/Users.php
index e586579a71e7..cf6bae6c1a8c 100644
--- a/administrator/components/com_users/src/Service/HTML/Users.php
+++ b/administrator/components/com_users/src/Service/HTML/Users.php
@@ -410,8 +410,8 @@ public function editor($value)
$title = $db->loadResult();
if ($title) {
- if (!$lang->load(sprintf('plg_editors_%s.sys', $value), JPATH_ADMINISTRATOR)) {
- $lang->load(sprintf('plg_editors_%s.sys', $value), JPATH_PLUGINS . '/editors/' . $value);
+ if (!$lang->load(\sprintf('plg_editors_%s.sys', $value), JPATH_ADMINISTRATOR)) {
+ $lang->load(\sprintf('plg_editors_%s.sys', $value), JPATH_PLUGINS . '/editors/' . $value);
}
$lang->load($title . '.sys');
return Text::_($title);
diff --git a/administrator/components/com_users/src/Table/MfaTable.php b/administrator/components/com_users/src/Table/MfaTable.php
index c1201a0dd522..0c1883bb19a3 100644
--- a/administrator/components/com_users/src/Table/MfaTable.php
+++ b/administrator/components/com_users/src/Table/MfaTable.php
@@ -119,7 +119,7 @@ public function store($updateNulls = true)
// Existing record. Remove it from the list of records.
$records = array_filter(
$records,
- fn($rec) => $rec->id != $this->id
+ fn ($rec) => $rec->id != $this->id
);
}
@@ -133,7 +133,7 @@ public function store($updateNulls = true)
if ($this->default == 0) {
$hasDefaultRecord = array_reduce(
$records,
- fn($carry, $record) => $carry || ($record->default == 1),
+ fn ($carry, $record) => $carry || ($record->default == 1),
false
);
@@ -147,7 +147,7 @@ public function store($updateNulls = true)
// Do I have any backup records?
$hasBackupCodes = array_reduce(
$records,
- fn(bool $carry, $record) => $carry || $record->method === 'backupcodes',
+ fn (bool $carry, $record) => $carry || $record->method === 'backupcodes',
false
);
diff --git a/administrator/components/com_users/src/View/Debuggroup/HtmlView.php b/administrator/components/com_users/src/View/Debuggroup/HtmlView.php
index 882853c09dbc..686e043b7a40 100644
--- a/administrator/components/com_users/src/View/Debuggroup/HtmlView.php
+++ b/administrator/components/com_users/src/View/Debuggroup/HtmlView.php
@@ -10,16 +10,16 @@
namespace Joomla\Component\Users\Administrator\View\Debuggroup;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\Registry\Registry;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Access\Exception\NotAllowed;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Users\Administrator\Model\DebuggroupModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_users/src/View/Debuguser/HtmlView.php b/administrator/components/com_users/src/View/Debuguser/HtmlView.php
index 6a8c4ca837d8..da0340c4f1fe 100644
--- a/administrator/components/com_users/src/View/Debuguser/HtmlView.php
+++ b/administrator/components/com_users/src/View/Debuguser/HtmlView.php
@@ -10,17 +10,17 @@
namespace Joomla\Component\Users\Administrator\View\Debuguser;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\Registry\Registry;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Access\Exception\NotAllowed;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\User\User;
use Joomla\Component\Users\Administrator\Model\DebuguserModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_users/src/View/Group/HtmlView.php b/administrator/components/com_users/src/View/Group/HtmlView.php
index 9c76c8f335cd..7d6a8c1bfe46 100644
--- a/administrator/components/com_users/src/View/Group/HtmlView.php
+++ b/administrator/components/com_users/src/View/Group/HtmlView.php
@@ -10,9 +10,8 @@
namespace Joomla\Component\Users\Administrator\View\Group;
-use Joomla\CMS\Form\Form;
-use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
@@ -20,6 +19,7 @@
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Users\Administrator\Model\GroupModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_users/src/View/Groups/HtmlView.php b/administrator/components/com_users/src/View/Groups/HtmlView.php
index 44dcc5e6e59a..d59d1a7c4259 100644
--- a/administrator/components/com_users/src/View/Groups/HtmlView.php
+++ b/administrator/components/com_users/src/View/Groups/HtmlView.php
@@ -10,15 +10,15 @@
namespace Joomla\Component\Users\Administrator\View\Groups;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\Registry\Registry;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Users\Administrator\Model\GroupsModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_users/src/View/Level/HtmlView.php b/administrator/components/com_users/src/View/Level/HtmlView.php
index 446af535850c..daaa634d6b62 100644
--- a/administrator/components/com_users/src/View/Level/HtmlView.php
+++ b/administrator/components/com_users/src/View/Level/HtmlView.php
@@ -10,9 +10,8 @@
namespace Joomla\Component\Users\Administrator\View\Level;
-use Joomla\CMS\Form\Form;
-use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
@@ -20,6 +19,7 @@
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Users\Administrator\Model\LevelModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_users/src/View/Levels/HtmlView.php b/administrator/components/com_users/src/View/Levels/HtmlView.php
index c4546e3253d2..1f7adfd5b090 100644
--- a/administrator/components/com_users/src/View/Levels/HtmlView.php
+++ b/administrator/components/com_users/src/View/Levels/HtmlView.php
@@ -10,15 +10,15 @@
namespace Joomla\Component\Users\Administrator\View\Levels;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\Registry\Registry;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Users\Administrator\Model\LevelsModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_users/src/View/Mail/HtmlView.php b/administrator/components/com_users/src/View/Mail/HtmlView.php
index ab0dd016137f..e985da6b8fbb 100644
--- a/administrator/components/com_users/src/View/Mail/HtmlView.php
+++ b/administrator/components/com_users/src/View/Mail/HtmlView.php
@@ -10,8 +10,8 @@
namespace Joomla\Component\Users\Administrator\View\Mail;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Router\Route;
diff --git a/administrator/components/com_users/src/View/Method/HtmlView.php b/administrator/components/com_users/src/View/Method/HtmlView.php
index d405dce40bdc..cd0d083b6117 100644
--- a/administrator/components/com_users/src/View/Method/HtmlView.php
+++ b/administrator/components/com_users/src/View/Method/HtmlView.php
@@ -135,7 +135,7 @@ public function display($tpl = null): void
$backupCodes = array_filter(
$backupCodes,
- fn($x) => !empty($x)
+ fn ($x) => !empty($x)
);
if (\count($backupCodes) % 2 != 0) {
diff --git a/administrator/components/com_users/src/View/Note/HtmlView.php b/administrator/components/com_users/src/View/Note/HtmlView.php
index 87bf50f312f3..70cbc0f2cdd8 100644
--- a/administrator/components/com_users/src/View/Note/HtmlView.php
+++ b/administrator/components/com_users/src/View/Note/HtmlView.php
@@ -10,10 +10,9 @@
namespace Joomla\Component\Users\Administrator\View\Note;
-use Joomla\CMS\Form\Form;
-use Joomla\Registry\Registry;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
@@ -21,6 +20,7 @@
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Users\Administrator\Model\NoteModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_users/src/View/Notes/HtmlView.php b/administrator/components/com_users/src/View/Notes/HtmlView.php
index b5292d9440e9..c4a67472a201 100644
--- a/administrator/components/com_users/src/View/Notes/HtmlView.php
+++ b/administrator/components/com_users/src/View/Notes/HtmlView.php
@@ -10,12 +10,12 @@
namespace Joomla\Component\Users\Administrator\View\Notes;
-use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\Button\DropdownButton;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\CMS\User\User;
diff --git a/administrator/components/com_users/src/View/User/HtmlView.php b/administrator/components/com_users/src/View/User/HtmlView.php
index 5684e9fadf4a..5452cb4b89fb 100644
--- a/administrator/components/com_users/src/View/User/HtmlView.php
+++ b/administrator/components/com_users/src/View/User/HtmlView.php
@@ -10,9 +10,8 @@
namespace Joomla\Component\Users\Administrator\View\User;
-use Joomla\CMS\Form\Form;
-use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
@@ -23,6 +22,7 @@
use Joomla\CMS\User\UserFactoryAwareTrait;
use Joomla\Component\Users\Administrator\Helper\Mfa;
use Joomla\Component\Users\Administrator\Model\UserModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_users/src/View/Users/HtmlView.php b/administrator/components/com_users/src/View/Users/HtmlView.php
index f0d09cd0fd4c..8891155a0759 100644
--- a/administrator/components/com_users/src/View/Users/HtmlView.php
+++ b/administrator/components/com_users/src/View/Users/HtmlView.php
@@ -10,18 +10,18 @@
namespace Joomla\Component\Users\Administrator\View\Users;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\Registry\Registry;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\Button\DropdownButton;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Users\Administrator\Model\UsersModel;
use Joomla\Database\DatabaseDriver;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/administrator/components/com_workflow/src/Controller/StagesController.php b/administrator/components/com_workflow/src/Controller/StagesController.php
index 26f55d29d58d..df5e8f4aa76a 100644
--- a/administrator/components/com_workflow/src/Controller/StagesController.php
+++ b/administrator/components/com_workflow/src/Controller/StagesController.php
@@ -10,11 +10,11 @@
namespace Joomla\Component\Workflow\Administrator\Controller;
-use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Router\Route;
use Joomla\Input\Input;
use Joomla\Utilities\ArrayHelper;
diff --git a/administrator/components/com_workflow/src/Controller/TransitionsController.php b/administrator/components/com_workflow/src/Controller/TransitionsController.php
index d0a7da9cd55c..ed92e9917ebf 100644
--- a/administrator/components/com_workflow/src/Controller/TransitionsController.php
+++ b/administrator/components/com_workflow/src/Controller/TransitionsController.php
@@ -10,11 +10,11 @@
namespace Joomla\Component\Workflow\Administrator\Controller;
-use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\Input\Input;
// phpcs:disable PSR1.Files.SideEffects
diff --git a/administrator/components/com_workflow/src/Controller/WorkflowsController.php b/administrator/components/com_workflow/src/Controller/WorkflowsController.php
index f0442366e8d1..e9d5034d31f0 100644
--- a/administrator/components/com_workflow/src/Controller/WorkflowsController.php
+++ b/administrator/components/com_workflow/src/Controller/WorkflowsController.php
@@ -10,11 +10,11 @@
namespace Joomla\Component\Workflow\Administrator\Controller;
-use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\AdminController;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Router\Route;
use Joomla\Input\Input;
use Joomla\Utilities\ArrayHelper;
diff --git a/administrator/components/com_workflow/src/Model/StageModel.php b/administrator/components/com_workflow/src/Model/StageModel.php
index ba82d893e652..bc20fd674ff9 100644
--- a/administrator/components/com_workflow/src/Model/StageModel.php
+++ b/administrator/components/com_workflow/src/Model/StageModel.php
@@ -121,7 +121,7 @@ public function save($data)
// Alter the title for save as copy
if ($origTable->load(['title' => $data['title']])) {
- [$title] = $this->generateNewTitle(0, '', $data['title']);
+ [$title] = $this->generateNewTitle(0, '', $data['title']);
$data['title'] = $title;
}
diff --git a/administrator/components/com_workflow/src/Model/StagesModel.php b/administrator/components/com_workflow/src/Model/StagesModel.php
index 294840f913a5..e57f8f1a25c1 100644
--- a/administrator/components/com_workflow/src/Model/StagesModel.php
+++ b/administrator/components/com_workflow/src/Model/StagesModel.php
@@ -11,10 +11,10 @@
namespace Joomla\Component\Workflow\Administrator\Model;
-use Joomla\CMS\Table\Table;
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\MVC\Model\ListModel;
+use Joomla\CMS\Table\Table;
use Joomla\Database\ParameterType;
use Joomla\Database\QueryInterface;
diff --git a/administrator/components/com_workflow/src/Model/TransitionModel.php b/administrator/components/com_workflow/src/Model/TransitionModel.php
index 6fc45febe3e8..21a199053736 100644
--- a/administrator/components/com_workflow/src/Model/TransitionModel.php
+++ b/administrator/components/com_workflow/src/Model/TransitionModel.php
@@ -11,10 +11,10 @@
namespace Joomla\Component\Workflow\Administrator\Model;
-use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Form;
use Joomla\CMS\MVC\Model\AdminModel;
+use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
@@ -172,7 +172,7 @@ public function save($data)
// Alter the title for save as copy
if ($origTable->load(['title' => $data['title']])) {
- [$title] = $this->generateNewTitle(0, '', $data['title']);
+ [$title] = $this->generateNewTitle(0, '', $data['title']);
$data['title'] = $title;
}
diff --git a/administrator/components/com_workflow/src/Model/TransitionsModel.php b/administrator/components/com_workflow/src/Model/TransitionsModel.php
index ef8f5a2d0819..96b956ef64a6 100644
--- a/administrator/components/com_workflow/src/Model/TransitionsModel.php
+++ b/administrator/components/com_workflow/src/Model/TransitionsModel.php
@@ -11,11 +11,11 @@
namespace Joomla\Component\Workflow\Administrator\Model;
-use Joomla\CMS\Table\Table;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\MVC\Model\ListModel;
+use Joomla\CMS\Table\Table;
use Joomla\Database\ParameterType;
use Joomla\Database\QueryInterface;
diff --git a/administrator/components/com_workflow/src/Model/WorkflowModel.php b/administrator/components/com_workflow/src/Model/WorkflowModel.php
index e09068de6af9..c9845b0a6c8b 100644
--- a/administrator/components/com_workflow/src/Model/WorkflowModel.php
+++ b/administrator/components/com_workflow/src/Model/WorkflowModel.php
@@ -110,7 +110,7 @@ public function save($data)
// Alter the title for save as copy
if ($origTable->load(['title' => $data['title']])) {
- [$title] = $this->generateNewTitle(0, '', $data['title']);
+ [$title] = $this->generateNewTitle(0, '', $data['title']);
$data['title'] = $title;
}
diff --git a/administrator/components/com_workflow/src/Model/WorkflowsModel.php b/administrator/components/com_workflow/src/Model/WorkflowsModel.php
index c2972720c81d..adccc5a50753 100644
--- a/administrator/components/com_workflow/src/Model/WorkflowsModel.php
+++ b/administrator/components/com_workflow/src/Model/WorkflowsModel.php
@@ -11,11 +11,11 @@
namespace Joomla\Component\Workflow\Administrator\Model;
-use Joomla\CMS\Table\Table;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\MVC\Model\ListModel;
+use Joomla\CMS\Table\Table;
use Joomla\Database\ParameterType;
use Joomla\Database\QueryInterface;
diff --git a/administrator/components/com_workflow/src/View/Stage/HtmlView.php b/administrator/components/com_workflow/src/View/Stage/HtmlView.php
index 1370eb5f9f41..e2f3818c9c20 100644
--- a/administrator/components/com_workflow/src/View/Stage/HtmlView.php
+++ b/administrator/components/com_workflow/src/View/Stage/HtmlView.php
@@ -10,8 +10,8 @@
namespace Joomla\Component\Workflow\Administrator\View\Stage;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
diff --git a/administrator/components/com_workflow/src/View/Stages/HtmlView.php b/administrator/components/com_workflow/src/View/Stages/HtmlView.php
index fc2e790b9d2c..3a612e0ec6cb 100644
--- a/administrator/components/com_workflow/src/View/Stages/HtmlView.php
+++ b/administrator/components/com_workflow/src/View/Stages/HtmlView.php
@@ -10,12 +10,12 @@
namespace Joomla\Component\Workflow\Administrator\View\Stages;
-use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Toolbar\Button\DropdownButton;
use Joomla\CMS\Toolbar\ToolbarHelper;
diff --git a/administrator/components/com_workflow/src/View/Transition/HtmlView.php b/administrator/components/com_workflow/src/View/Transition/HtmlView.php
index 467f1105cc98..e65509d54d10 100644
--- a/administrator/components/com_workflow/src/View/Transition/HtmlView.php
+++ b/administrator/components/com_workflow/src/View/Transition/HtmlView.php
@@ -10,10 +10,10 @@
namespace Joomla\Component\Workflow\Administrator\View\Transition;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Application\CMSApplication;
-use Joomla\CMS\Input\Input;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
+use Joomla\CMS\Input\Input;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
diff --git a/administrator/components/com_workflow/src/View/Transitions/HtmlView.php b/administrator/components/com_workflow/src/View/Transitions/HtmlView.php
index c3e8ea8a5a27..b7e52e332e97 100644
--- a/administrator/components/com_workflow/src/View/Transitions/HtmlView.php
+++ b/administrator/components/com_workflow/src/View/Transitions/HtmlView.php
@@ -10,12 +10,12 @@
namespace Joomla\Component\Workflow\Administrator\View\Transitions;
-use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Toolbar\Button\DropdownButton;
use Joomla\CMS\Toolbar\ToolbarHelper;
diff --git a/administrator/components/com_workflow/src/View/Workflow/HtmlView.php b/administrator/components/com_workflow/src/View/Workflow/HtmlView.php
index 5dc72a025eb7..f22cc19c7344 100644
--- a/administrator/components/com_workflow/src/View/Workflow/HtmlView.php
+++ b/administrator/components/com_workflow/src/View/Workflow/HtmlView.php
@@ -10,8 +10,8 @@
namespace Joomla\Component\Workflow\Administrator\View\Workflow;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
diff --git a/administrator/components/com_workflow/src/View/Workflows/HtmlView.php b/administrator/components/com_workflow/src/View/Workflows/HtmlView.php
index 42129e23531b..f26f22e64a65 100644
--- a/administrator/components/com_workflow/src/View/Workflows/HtmlView.php
+++ b/administrator/components/com_workflow/src/View/Workflows/HtmlView.php
@@ -10,12 +10,12 @@
namespace Joomla\Component\Workflow\Administrator\View\Workflows;
-use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\Button\DropdownButton;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Component\Workflow\Administrator\Model\WorkflowsModel;
diff --git a/administrator/includes/app.php b/administrator/includes/app.php
index 6ec705ee0ae5..76139e3b4504 100644
--- a/administrator/includes/app.php
+++ b/administrator/includes/app.php
@@ -1,10 +1,10 @@
strcmp((string) $a['value'], (string) $b['value'])
+ fn ($a, $b) => strcmp((string) $a['value'], (string) $b['value'])
);
// Fix wrongly set parentheses in RTL languages
diff --git a/administrator/modules/mod_messages/src/Helper/MessagesHelper.php b/administrator/modules/mod_messages/src/Helper/MessagesHelper.php
index 3231af1f6426..43776d3de6f9 100644
--- a/administrator/modules/mod_messages/src/Helper/MessagesHelper.php
+++ b/administrator/modules/mod_messages/src/Helper/MessagesHelper.php
@@ -10,8 +10,8 @@
namespace Joomla\Module\Messages\Administrator\Helper;
-use Joomla\Component\Messages\Administrator\Model\MessagesModel;
use Joomla\CMS\Application\AdministratorApplication;
+use Joomla\Component\Messages\Administrator\Model\MessagesModel;
use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
diff --git a/administrator/modules/mod_post_installation_messages/src/Dispatcher/Dispatcher.php b/administrator/modules/mod_post_installation_messages/src/Dispatcher/Dispatcher.php
index 1e22650d5bba..d91faeaa10a2 100644
--- a/administrator/modules/mod_post_installation_messages/src/Dispatcher/Dispatcher.php
+++ b/administrator/modules/mod_post_installation_messages/src/Dispatcher/Dispatcher.php
@@ -10,9 +10,9 @@
namespace Joomla\Module\PostInstallationMessages\Administrator\Dispatcher;
-use Joomla\Component\Postinstall\Administrator\Model\MessagesModel;
use Joomla\CMS\Dispatcher\AbstractModuleDispatcher;
use Joomla\CMS\Extension\ExtensionHelper;
+use Joomla\Component\Postinstall\Administrator\Model\MessagesModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/api/components/com_contact/src/Controller/ContactController.php b/api/components/com_contact/src/Controller/ContactController.php
index 91ce8b260dd8..07fe3562c91b 100644
--- a/api/components/com_contact/src/Controller/ContactController.php
+++ b/api/components/com_contact/src/Controller/ContactController.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Contact\Api\Controller;
-use Joomla\Component\Contact\Site\Model\ContactModel;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Event\Contact\SubmitContactEvent;
use Joomla\CMS\Event\Contact\ValidateContactEvent;
@@ -28,6 +27,7 @@
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\UserFactoryAwareInterface;
use Joomla\CMS\User\UserFactoryAwareTrait;
+use Joomla\Component\Contact\Site\Model\ContactModel;
use Joomla\Component\Fields\Administrator\Helper\FieldsHelper;
use Joomla\Registry\Registry;
use Joomla\String\Inflector;
diff --git a/api/components/com_contenthistory/src/Controller/HistoryController.php b/api/components/com_contenthistory/src/Controller/HistoryController.php
index 2a619bea1dbf..403d58687ec4 100644
--- a/api/components/com_contenthistory/src/Controller/HistoryController.php
+++ b/api/components/com_contenthistory/src/Controller/HistoryController.php
@@ -10,10 +10,10 @@
namespace Joomla\Component\Contenthistory\Api\Controller;
-use Joomla\CMS\MVC\Controller\Exception\ResourceNotFound;
-use Joomla\CMS\MVC\Controller\Exception\Save;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\ApiController;
+use Joomla\CMS\MVC\Controller\Exception\ResourceNotFound;
+use Joomla\CMS\MVC\Controller\Exception\Save;
use Joomla\Component\Contenthistory\Administrator\Model\HistoryModel;
// phpcs:disable PSR1.Files.SideEffects
diff --git a/api/components/com_languages/src/Controller/OverridesController.php b/api/components/com_languages/src/Controller/OverridesController.php
index a24605bc1014..b34f79e90380 100644
--- a/api/components/com_languages/src/Controller/OverridesController.php
+++ b/api/components/com_languages/src/Controller/OverridesController.php
@@ -10,12 +10,11 @@
namespace Joomla\Component\Languages\Api\Controller;
-use Joomla\CMS\MVC\Controller\Exception\Save;
-use Joomla\CMS\MVC\Model\AdminModel;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\ApiController;
-use Joomla\CMS\MVC\Controller\Exception;
+use Joomla\CMS\MVC\Controller\Exception\Save;
+use Joomla\CMS\MVC\Model\AdminModel;
use Joomla\String\Inflector;
use Tobscure\JsonApi\Exception\InvalidParameterException;
diff --git a/api/components/com_languages/src/Controller/StringsController.php b/api/components/com_languages/src/Controller/StringsController.php
index 3f785e35f2cb..3c73dc91d126 100644
--- a/api/components/com_languages/src/Controller/StringsController.php
+++ b/api/components/com_languages/src/Controller/StringsController.php
@@ -10,10 +10,10 @@
namespace Joomla\Component\Languages\Api\Controller;
-use Joomla\Component\Languages\Api\View\Strings\JsonapiView;
-use Joomla\Component\Languages\Administrator\Model\StringsModel;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\ApiController;
+use Joomla\Component\Languages\Administrator\Model\StringsModel;
+use Joomla\Component\Languages\Api\View\Strings\JsonapiView;
use Tobscure\JsonApi\Exception\InvalidParameterException;
// phpcs:disable PSR1.Files.SideEffects
diff --git a/api/components/com_languages/src/View/Overrides/JsonapiView.php b/api/components/com_languages/src/View/Overrides/JsonapiView.php
index 0cd72de3df43..a842721a3f44 100644
--- a/api/components/com_languages/src/View/Overrides/JsonapiView.php
+++ b/api/components/com_languages/src/View/Overrides/JsonapiView.php
@@ -10,9 +10,9 @@
namespace Joomla\Component\Languages\Api\View\Overrides;
+use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;
use Joomla\Component\Languages\Administrator\Model\OverrideModel;
use Joomla\Component\Languages\Administrator\Model\OverridesModel;
-use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/api/components/com_languages/src/View/Strings/JsonapiView.php b/api/components/com_languages/src/View/Strings/JsonapiView.php
index b20a0d993f80..34769455dd4b 100644
--- a/api/components/com_languages/src/View/Strings/JsonapiView.php
+++ b/api/components/com_languages/src/View/Strings/JsonapiView.php
@@ -10,11 +10,11 @@
namespace Joomla\Component\Languages\Api\View\Strings;
-use Joomla\Component\Languages\Administrator\Model\StringsModel;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;
use Joomla\CMS\Serializer\JoomlaSerializer;
+use Joomla\Component\Languages\Administrator\Model\StringsModel;
use Tobscure\JsonApi\Collection;
// phpcs:disable PSR1.Files.SideEffects
diff --git a/api/components/com_media/src/Controller/MediaController.php b/api/components/com_media/src/Controller/MediaController.php
index 2dc4720957c8..e91bc05ab16d 100644
--- a/api/components/com_media/src/Controller/MediaController.php
+++ b/api/components/com_media/src/Controller/MediaController.php
@@ -10,10 +10,10 @@
namespace Joomla\Component\Media\Api\Controller;
-use Joomla\CMS\Helper\MediaHelper;
use Joomla\CMS\Access\Exception\NotAllowed;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Filter\InputFilter;
+use Joomla\CMS\Helper\MediaHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\ApiController;
use Joomla\Component\Media\Administrator\Exception\FileExistsException;
diff --git a/api/components/com_menus/src/View/Items/JsonapiView.php b/api/components/com_menus/src/View/Items/JsonapiView.php
index 4cabd10731b2..0e41f563c953 100644
--- a/api/components/com_menus/src/View/Items/JsonapiView.php
+++ b/api/components/com_menus/src/View/Items/JsonapiView.php
@@ -10,11 +10,11 @@
namespace Joomla\Component\Menus\Api\View\Items;
-use Joomla\Component\Menus\Administrator\Model\MenutypesModel;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;
use Joomla\CMS\Serializer\JoomlaSerializer;
use Joomla\CMS\Uri\Uri;
+use Joomla\Component\Menus\Administrator\Model\MenutypesModel;
use Tobscure\JsonApi\Collection;
// phpcs:disable PSR1.Files.SideEffects
diff --git a/api/components/com_plugins/src/Controller/PluginsController.php b/api/components/com_plugins/src/Controller/PluginsController.php
index 0018fbebb7a4..7dd1ce206f1b 100644
--- a/api/components/com_plugins/src/Controller/PluginsController.php
+++ b/api/components/com_plugins/src/Controller/PluginsController.php
@@ -10,12 +10,12 @@
namespace Joomla\Component\Plugins\Api\Controller;
-use Joomla\CMS\MVC\Controller\Exception\ResourceNotFound;
-use Joomla\Component\Plugins\Administrator\Model\PluginModel;
use Joomla\CMS\Filter\InputFilter;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\ApiController;
+use Joomla\CMS\MVC\Controller\Exception\ResourceNotFound;
use Joomla\CMS\Router\Exception\RouteNotFoundException;
+use Joomla\Component\Plugins\Administrator\Model\PluginModel;
use Joomla\String\Inflector;
use Tobscure\JsonApi\Exception\InvalidParameterException;
@@ -66,7 +66,7 @@ public function edit()
foreach ($data as $key => $value) {
if (!\in_array($key, ['enabled', 'access', 'ordering'])) {
- throw new InvalidParameterException(sprintf('Invalid parameter %s.', $key), 400);
+ throw new InvalidParameterException(\sprintf('Invalid parameter %s.', $key), 400);
}
}
diff --git a/api/components/com_privacy/src/View/Consents/JsonapiView.php b/api/components/com_privacy/src/View/Consents/JsonapiView.php
index b5d545a8740c..8570a198d0a7 100644
--- a/api/components/com_privacy/src/View/Consents/JsonapiView.php
+++ b/api/components/com_privacy/src/View/Consents/JsonapiView.php
@@ -10,8 +10,8 @@
namespace Joomla\Component\Privacy\Api\View\Consents;
-use Joomla\CMS\MVC\Model\ListModel;
use Joomla\CMS\Language\Text;
+use Joomla\CMS\MVC\Model\ListModel;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\JsonApiView as BaseApiView;
use Joomla\CMS\Router\Exception\RouteNotFoundException;
diff --git a/api/includes/app.php b/api/includes/app.php
index 70eff3015d37..67b041239a85 100644
--- a/api/includes/app.php
+++ b/api/includes/app.php
@@ -1,10 +1,10 @@
getShortVersion();
+$majorVersion = Version::MAJOR_VERSION;
+$version = Version::MAJOR_VERSION . '.' . Version::MINOR_VERSION;
+$release = Version::PATCH_VERSION;
+$fullVersion = (new Version())->getShortVersion();
$previousRelease = false;
chdir($tmp);
@@ -561,7 +561,7 @@ function clean_composer(string $dir)
// This is only needed when we release a version
if ($includeExtraTextfiles) {
foreach (array_keys($checksums) as $packageName) {
- echo sprintf('Generating checksums for %s%s', $packageName, PHP_EOL);
+ echo \sprintf('Generating checksums for %s%s', $packageName, PHP_EOL);
foreach (['sha256', 'sha384', 'sha512'] as $hash) {
if (file_exists('packages/' . $packageName)) {
@@ -578,10 +578,10 @@ function clean_composer(string $dir)
$checksumsContentUpdate = '';
foreach ($checksums as $packageName => $packageHashes) {
- $checksumsContent .= sprintf('Filename: %s%s', $packageName, PHP_EOL);
+ $checksumsContent .= \sprintf('Filename: %s%s', $packageName, PHP_EOL);
foreach ($packageHashes as $hashType => $hash) {
- $checksumsContent .= sprintf('%s: %s%s', $hashType, $hash, PHP_EOL);
+ $checksumsContent .= \sprintf('%s: %s%s', $hashType, $hash, PHP_EOL);
if (str_contains($packageName, 'Update_Package.zip')) {
$checksumsContentUpdate .= "<{$hashType}>{$hash}{$hashType}>\n";
}
diff --git a/build/bump.php b/build/bump.php
index d0e36b6585bf..9e3c2bcc033b 100644
--- a/build/bump.php
+++ b/build/bump.php
@@ -98,12 +98,12 @@ function usage($command)
// Check version string (exit if not correct).
$versionParts = explode('-', $opts['v']);
-if (in_array(preg_match('#^\d+\.\d+\.\d+$#', $versionParts[0]), [0, false], true)) {
+if (\in_array(preg_match('#^\d+\.\d+\.\d+$#', $versionParts[0]), [0, false], true)) {
usage($argv[0]);
die();
}
-if (isset($versionParts[1]) && in_array(preg_match('#(dev|alpha|beta|rc)\d*#', $versionParts[1]), [0, false], true)) {
+if (isset($versionParts[1]) && \in_array(preg_match('#(dev|alpha|beta|rc)\d*#', $versionParts[1]), [0, false], true)) {
usage($argv[0]);
die();
}
diff --git a/build/check_ruleset_xml.php b/build/check_ruleset_xml.php
index 5566f63eb5f5..31ab99fed69a 100644
--- a/build/check_ruleset_xml.php
+++ b/build/check_ruleset_xml.php
@@ -51,7 +51,7 @@ function usage($command)
$obsoleteLineIdxs = [];
foreach ($rulesetLines as $line => $text) {
- if (in_array(preg_match('/^(?:\s*)(.*)(?:<\/exclude-pattern>\s*)$/', $text, $matches), [0, false], true)) {
+ if (\in_array(preg_match('/^(?:\s*)(.*)(?:<\/exclude-pattern>\s*)$/', $text, $matches), [0, false], true)) {
continue;
}
diff --git a/build/convert_or_die.php b/build/convert_or_die.php
index 0306a04598fd..2c3a0677f14c 100644
--- a/build/convert_or_die.php
+++ b/build/convert_or_die.php
@@ -42,9 +42,9 @@ function insertDefineOrDie($file, $keyword)
$insert = max($lastUse, $lastComment, $lastNamespace);
$distance = 0;
- if (in_array(trim($currentcontent[$insert + 2]), ['', '0'], true)) {
+ if (\in_array(trim($currentcontent[$insert + 2]), ['', '0'], true)) {
$distance++;
- if (in_array(trim($currentcontent[$insert + 3]), ['', '0'], true)) {
+ if (\in_array(trim($currentcontent[$insert + 3]), ['', '0'], true)) {
$distance++;
}
}
diff --git a/build/deleted_file_check.php b/build/deleted_file_check.php
index 124776e31a38..2caa93da5422 100644
--- a/build/deleted_file_check.php
+++ b/build/deleted_file_check.php
@@ -220,7 +220,7 @@ function usage($command)
foreach ($filesDifference as $file) {
// Don't remove any specific files (e.g. language files) that we want to keep on upgrade
- if (in_array($file, $filesToKeep)) {
+ if (\in_array($file, $filesToKeep)) {
continue;
}
diff --git a/build/phpstan/src/DynamicReturnType/ModelBootComponent.php b/build/phpstan/src/DynamicReturnType/ModelBootComponent.php
index 856dae4844c7..85c637e1634d 100644
--- a/build/phpstan/src/DynamicReturnType/ModelBootComponent.php
+++ b/build/phpstan/src/DynamicReturnType/ModelBootComponent.php
@@ -35,7 +35,7 @@ public function getTypeFromMethodCall(MethodReflection $methodReflection, Method
return null;
}
- $name = str_replace("'", '', $methodCall->getArgs()[0]->value->getAttribute('rawValue'));
+ $name = str_replace("'", '', $methodCall->getArgs()[0]->value->getAttribute('rawValue'));
$namespace = $this->findNamespace('\\Component\\' . $name . '\\Administrator');
if ($namespace !== '' && $namespace !== '0') {
diff --git a/build/phpstan/src/DynamicReturnType/NamespaceBased.php b/build/phpstan/src/DynamicReturnType/NamespaceBased.php
index a2fae12c8a0e..0418db8ff450 100644
--- a/build/phpstan/src/DynamicReturnType/NamespaceBased.php
+++ b/build/phpstan/src/DynamicReturnType/NamespaceBased.php
@@ -36,7 +36,7 @@ protected function findNamespaces(string $name): array
$result = [];
foreach ($this->getNamespaces() as $ns => $path) {
- if (in_array(stripos($ns, $name), [0, false], true)) {
+ if (\in_array(stripos($ns, $name), [0, false], true)) {
continue;
}
@@ -52,7 +52,7 @@ protected function findNamespaces(string $name): array
protected function findNamespace(string $name): string
{
foreach (array_keys($this->getNamespaces()) as $ns) {
- if (in_array(stripos($ns, $name), [0, false], true)) {
+ if (\in_array(stripos($ns, $name), [0, false], true)) {
continue;
}
diff --git a/build/rector.php b/build/rector.php
index 50abb548b85b..e9fdfd19bbab 100644
--- a/build/rector.php
+++ b/build/rector.php
@@ -78,7 +78,7 @@
// The setArgument function in events uses unused functions
PrivatizeFinalClassMethodRector::class => ['*/Event/*'],
// Ignore vendor
- '*/vendor/*'
+ '*/vendor/*',
]);
// The bootstrap file, which finds the core classes and loads the extension namespace
diff --git a/build/stubGenerator.php b/build/stubGenerator.php
index af735e377bf5..739cb4beff85 100644
--- a/build/stubGenerator.php
+++ b/build/stubGenerator.php
@@ -147,7 +147,7 @@ public function getMenu($name = null, $options = []): never
Factory::getContainer()->share(
'StubGenerator',
- fn(Container $container) => new \StubGenerator(
+ fn (Container $container) => new \StubGenerator(
null,
null,
null,
diff --git a/build/update_fido_cache.php b/build/update_fido_cache.php
index 082740efeb5d..f6e7a6b2fa45 100644
--- a/build/update_fido_cache.php
+++ b/build/update_fido_cache.php
@@ -50,4 +50,4 @@
file_put_contents($filePath, $rawJwt);
-echo sprintf('File saved: %s%s', $filePath, PHP_EOL);
+echo \sprintf('File saved: %s%s', $filePath, PHP_EOL);
diff --git a/components/com_ajax/ajax.php b/components/com_ajax/ajax.php
index 4732c2070698..d497b0d321e2 100644
--- a/components/com_ajax/ajax.php
+++ b/components/com_ajax/ajax.php
@@ -1,7 +1,7 @@
clickurl;
// Check for links
- if (in_array(preg_match('#http[s]?://|index[2]?\.php#', $url), [0, false], true)) {
+ if (\in_array(preg_match('#http[s]?://|index[2]?\.php#', $url), [0, false], true)) {
return 'http://' . $url;
}
diff --git a/components/com_banners/src/Model/BannersModel.php b/components/com_banners/src/Model/BannersModel.php
index 047228442315..5c5e49e5ece6 100644
--- a/components/com_banners/src/Model/BannersModel.php
+++ b/components/com_banners/src/Model/BannersModel.php
@@ -228,7 +228,7 @@ protected function getListQuery()
$condition2 .= ' OR ' . $db->quoteName('cat.metakey') . ' ' . $query->regexp($bounded[4]) . ' ';
}
- $temp[] = sprintf('(%s) AND (%s)', $condition1, $condition2);
+ $temp[] = \sprintf('(%s) AND (%s)', $condition1, $condition2);
}
$query->where('(' . implode(' OR ', $temp) . ')');
diff --git a/components/com_config/src/Controller/ConfigController.php b/components/com_config/src/Controller/ConfigController.php
index caf77eba1dbc..ec5d6133b04d 100644
--- a/components/com_config/src/Controller/ConfigController.php
+++ b/components/com_config/src/Controller/ConfigController.php
@@ -10,9 +10,9 @@
namespace Joomla\Component\Config\Site\Controller;
-use Joomla\CMS\Input\Input;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Client\ClientHelper;
+use Joomla\CMS\Input\Input;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
diff --git a/components/com_config/src/Controller/ModulesController.php b/components/com_config/src/Controller/ModulesController.php
index 1bb523d65c36..d9670f480a60 100644
--- a/components/com_config/src/Controller/ModulesController.php
+++ b/components/com_config/src/Controller/ModulesController.php
@@ -10,13 +10,13 @@
namespace Joomla\Component\Config\Site\Controller;
-use Joomla\CMS\Input\Input;
-use Joomla\CMS\Dispatcher\ComponentDispatcher;
use Joomla\CMS\Application\AdministratorApplication;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Client\ClientHelper;
+use Joomla\CMS\Dispatcher\ComponentDispatcher;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Form;
+use Joomla\CMS\Input\Input;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
diff --git a/components/com_config/src/Controller/TemplatesController.php b/components/com_config/src/Controller/TemplatesController.php
index e4899831b926..e058b9c4c73b 100644
--- a/components/com_config/src/Controller/TemplatesController.php
+++ b/components/com_config/src/Controller/TemplatesController.php
@@ -10,9 +10,9 @@
namespace Joomla\Component\Config\Site\Controller;
-use Joomla\CMS\Input\Input;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Client\ClientHelper;
+use Joomla\CMS\Input\Input;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
diff --git a/components/com_config/src/View/Config/HtmlView.php b/components/com_config/src/View/Config/HtmlView.php
index 635a2f014eeb..eb4a6287a0e6 100644
--- a/components/com_config/src/View/Config/HtmlView.php
+++ b/components/com_config/src/View/Config/HtmlView.php
@@ -10,11 +10,11 @@
namespace Joomla\Component\Config\Site\View\Config;
-use Joomla\CMS\Form\Form;
-use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\Component\Config\Administrator\Controller\RequestController;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/components/com_config/src/View/Modules/HtmlView.php b/components/com_config/src/View/Modules/HtmlView.php
index 805f21fccf6c..1c7ec906760b 100644
--- a/components/com_config/src/View/Modules/HtmlView.php
+++ b/components/com_config/src/View/Modules/HtmlView.php
@@ -10,12 +10,12 @@
namespace Joomla\Component\Config\Site\View\Modules;
-use Joomla\Component\Modules\Administrator\Model\ModuleModel;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\Component\Config\Site\Model\ModulesModel;
+use Joomla\Component\Modules\Administrator\Model\ModuleModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/components/com_config/src/View/Templates/HtmlView.php b/components/com_config/src/View/Templates/HtmlView.php
index 81b2c543b27b..c47c39ef752b 100644
--- a/components/com_config/src/View/Templates/HtmlView.php
+++ b/components/com_config/src/View/Templates/HtmlView.php
@@ -10,13 +10,13 @@
namespace Joomla\Component\Config\Site\View\Templates;
-use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Form;
use Joomla\CMS\MVC\Factory\MVCFactory;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\Component\Config\Administrator\Controller\RequestController;
use Joomla\Component\Templates\Administrator\View\Style\JsonView;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/components/com_contact/src/Controller/ContactController.php b/components/com_contact/src/Controller/ContactController.php
index 46f40d437bc4..18c7e5e1c65e 100644
--- a/components/com_contact/src/Controller/ContactController.php
+++ b/components/com_contact/src/Controller/ContactController.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Contact\Site\Controller;
-use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Event\Contact\SubmitContactEvent;
use Joomla\CMS\Event\Contact\ValidateContactEvent;
use Joomla\CMS\Factory;
@@ -19,6 +18,7 @@
use Joomla\CMS\Mail\Exception\MailDisabledException;
use Joomla\CMS\Mail\MailTemplate;
use Joomla\CMS\MVC\Controller\FormController;
+use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\String\PunycodeHelper;
diff --git a/components/com_contact/src/Controller/DisplayController.php b/components/com_contact/src/Controller/DisplayController.php
index 823ca5dfad26..3ec1fd96739d 100644
--- a/components/com_contact/src/Controller/DisplayController.php
+++ b/components/com_contact/src/Controller/DisplayController.php
@@ -10,9 +10,9 @@
namespace Joomla\Component\Contact\Site\Controller;
-use Joomla\CMS\Input\Input;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Factory;
+use Joomla\CMS\Input\Input;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
diff --git a/components/com_contact/src/Helper/AssociationHelper.php b/components/com_contact/src/Helper/AssociationHelper.php
index a4e7e417d853..cc127021b371 100644
--- a/components/com_contact/src/Helper/AssociationHelper.php
+++ b/components/com_contact/src/Helper/AssociationHelper.php
@@ -43,7 +43,7 @@ public static function getAssociations($id = 0, $view = null)
if ($view === 'contact' && $id) {
$associations = Associations::getAssociations('com_contact', '#__contact_details', 'com_contact.item', $id);
- $return = [];
+ $return = [];
foreach ($associations as $tag => $item) {
$return[$tag] = RouteHelper::getContactRoute($item->id, (int) $item->catid, $item->language);
}
diff --git a/components/com_contact/src/Model/CategoryModel.php b/components/com_contact/src/Model/CategoryModel.php
index a221890e294c..fd337abd2dd9 100644
--- a/components/com_contact/src/Model/CategoryModel.php
+++ b/components/com_contact/src/Model/CategoryModel.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Contact\Site\Model;
-use Joomla\Database\DatabaseQuery;
use Joomla\CMS\Categories\Categories;
use Joomla\CMS\Categories\CategoryNode;
use Joomla\CMS\Factory;
@@ -19,6 +18,7 @@
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\Registry\Registry;
diff --git a/components/com_contact/src/Model/FormModel.php b/components/com_contact/src/Model/FormModel.php
index 471bcd67ac76..b0367a4c7322 100644
--- a/components/com_contact/src/Model/FormModel.php
+++ b/components/com_contact/src/Model/FormModel.php
@@ -10,14 +10,14 @@
namespace Joomla\Component\Contact\Site\Model;
-use Joomla\Component\Contact\Administrator\Model\ContactModel;
-use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\TagsHelper;
use Joomla\CMS\Language\Associations;
use Joomla\CMS\Language\Multilanguage;
+use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Table\Table;
+use Joomla\Component\Contact\Administrator\Model\ContactModel;
use Joomla\Registry\Registry;
use Joomla\Utilities\ArrayHelper;
diff --git a/components/com_contact/src/Service/Router.php b/components/com_contact/src/Service/Router.php
index 6f7c34f6295e..761f82cda264 100644
--- a/components/com_contact/src/Service/Router.php
+++ b/components/com_contact/src/Service/Router.php
@@ -65,13 +65,13 @@ public function __construct(SiteApplication $app, AbstractMenu $menu, /**
*
* @since 4.0.0
*/
- private readonly CategoryFactoryInterface $categoryFactory, /**
+ private readonly CategoryFactoryInterface $categoryFactory, /**
* The db
*
*
* @since 4.0.0
*/
- private readonly DatabaseInterface $db)
+ private readonly DatabaseInterface $db)
{
$params = ComponentHelper::getParams('com_contact');
$this->noIDs = (bool) $params->get('sef_ids');
diff --git a/components/com_contact/src/View/Contact/HtmlView.php b/components/com_contact/src/View/Contact/HtmlView.php
index 36f1f559987a..e43aad7a20c2 100644
--- a/components/com_contact/src/View/Contact/HtmlView.php
+++ b/components/com_contact/src/View/Contact/HtmlView.php
@@ -10,22 +10,22 @@
namespace Joomla\Component\Contact\Site\View\Contact;
-use Joomla\CMS\User\User;
-use Joomla\Registry\Registry;
-use Joomla\CMS\Form\Form;
-use Joomla\Component\Contact\Site\Model\CategoryModel;
use Joomla\CMS\Categories\Categories;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Router\Route;
+use Joomla\CMS\User\User;
use Joomla\CMS\User\UserFactoryAwareInterface;
use Joomla\CMS\User\UserFactoryAwareTrait;
use Joomla\Component\Contact\Site\Helper\RouteHelper;
+use Joomla\Component\Contact\Site\Model\CategoryModel;
use Joomla\Component\Contact\Site\Model\ContactModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
@@ -38,11 +38,11 @@
*/
class HtmlView extends BaseHtmlView implements UserFactoryAwareInterface
{
+ use UserFactoryAwareTrait;
/**
* @var User|null
*/
public $contactUser;
- use UserFactoryAwareTrait;
/**
* The item model state
diff --git a/components/com_contact/src/View/Featured/HtmlView.php b/components/com_contact/src/View/Featured/HtmlView.php
index 04ee996cd792..59cc550233c0 100644
--- a/components/com_contact/src/View/Featured/HtmlView.php
+++ b/components/com_contact/src/View/Featured/HtmlView.php
@@ -10,15 +10,15 @@
namespace Joomla\Component\Contact\Site\View\Featured;
-use Joomla\Registry\Registry;
-use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Mail\MailHelper;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\Component\Contact\Site\Model\FeaturedModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/components/com_contact/src/View/Form/HtmlView.php b/components/com_contact/src/View/Form/HtmlView.php
index 7e97e9e15a1f..7f1a830427ec 100644
--- a/components/com_contact/src/View/Form/HtmlView.php
+++ b/components/com_contact/src/View/Form/HtmlView.php
@@ -10,15 +10,15 @@
namespace Joomla\Component\Contact\Site\View\Form;
-use Joomla\CMS\Form\Form;
-use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\TagsHelper;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\Component\Contact\Administrator\Helper\ContactHelper;
use Joomla\Component\Contact\Site\Model\FormModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/components/com_content/helpers/icon.php b/components/com_content/helpers/icon.php
index 4795b0abffa0..ec055ced4440 100644
--- a/components/com_content/helpers/icon.php
+++ b/components/com_content/helpers/icon.php
@@ -9,9 +9,9 @@
*
* @phpcs:disable PSR1.Classes.ClassDeclaration.MissingNamespace
*/
-use Joomla\Component\Content\Administrator\Service\HTML\Icon;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
+use Joomla\Component\Content\Administrator\Service\HTML\Icon;
use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
diff --git a/components/com_content/src/Controller/DisplayController.php b/components/com_content/src/Controller/DisplayController.php
index b62dd583023e..ee4c11908a05 100644
--- a/components/com_content/src/Controller/DisplayController.php
+++ b/components/com_content/src/Controller/DisplayController.php
@@ -10,12 +10,12 @@
namespace Joomla\Component\Content\Site\Controller;
-use Joomla\CMS\MVC\Controller\BaseController;
-use Joomla\CMS\Input\Input;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
+use Joomla\CMS\Input\Input;
use Joomla\CMS\Language\Text;
+use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
// phpcs:disable PSR1.Files.SideEffects
diff --git a/components/com_content/src/Helper/QueryHelper.php b/components/com_content/src/Helper/QueryHelper.php
index ef4c8491d5af..9bec5a493d60 100644
--- a/components/com_content/src/Helper/QueryHelper.php
+++ b/components/com_content/src/Helper/QueryHelper.php
@@ -10,11 +10,11 @@
namespace Joomla\Component\Content\Site\Helper;
-use Joomla\Registry\Registry;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\Database\DatabaseInterface;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
@@ -39,10 +39,10 @@ class QueryHelper
public static function orderbyPrimary($orderby)
{
return match ($orderby) {
- 'alpha' => 'c.path, ',
+ 'alpha' => 'c.path, ',
'ralpha' => 'c.path DESC, ',
- 'order' => 'c.lft, ',
- default => '',
+ 'order' => 'c.lft, ',
+ default => '',
};
}
@@ -162,10 +162,10 @@ public static function getQueryDate($orderDate, ?DatabaseInterface $db = null)
{
$db instanceof DatabaseInterface ? $db : Factory::getDbo();
return match ($orderDate) {
- 'modified' => ' CASE WHEN a.modified IS NULL THEN a.created ELSE a.modified END',
- 'published' => ' CASE WHEN a.publish_up IS NULL THEN a.created ELSE a.publish_up END ',
+ 'modified' => ' CASE WHEN a.modified IS NULL THEN a.created ELSE a.modified END',
+ 'published' => ' CASE WHEN a.publish_up IS NULL THEN a.created ELSE a.publish_up END ',
'unpublished' => ' CASE WHEN a.publish_down IS NULL THEN a.created ELSE a.publish_down END ',
- default => ' a.created ',
+ default => ' a.created ',
};
}
diff --git a/components/com_content/src/Model/ArchiveModel.php b/components/com_content/src/Model/ArchiveModel.php
index 5272460ceb09..1427b5fc9269 100644
--- a/components/com_content/src/Model/ArchiveModel.php
+++ b/components/com_content/src/Model/ArchiveModel.php
@@ -10,10 +10,10 @@
namespace Joomla\Component\Content\Site\Model;
-use Joomla\Database\DatabaseQuery;
use Joomla\CMS\Factory;
use Joomla\Component\Content\Administrator\Extension\ContentComponent;
use Joomla\Component\Content\Site\Helper\QueryHelper;
+use Joomla\Database\DatabaseQuery;
use Joomla\Database\ParameterType;
use Joomla\Database\QueryInterface;
diff --git a/components/com_content/src/Model/CategoryModel.php b/components/com_content/src/Model/CategoryModel.php
index 858906a5eea0..a4886fc29e82 100644
--- a/components/com_content/src/Model/CategoryModel.php
+++ b/components/com_content/src/Model/CategoryModel.php
@@ -10,13 +10,13 @@
namespace Joomla\Component\Content\Site\Model;
-use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Categories\Categories;
use Joomla\CMS\Categories\CategoryNode;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\MVC\Model\ListModel;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Table\Table;
use Joomla\Component\Content\Site\Helper\QueryHelper;
use Joomla\Utilities\ArrayHelper;
diff --git a/components/com_content/src/Model/FeaturedModel.php b/components/com_content/src/Model/FeaturedModel.php
index cd1452b7f401..adf0464714fb 100644
--- a/components/com_content/src/Model/FeaturedModel.php
+++ b/components/com_content/src/Model/FeaturedModel.php
@@ -59,7 +59,7 @@ protected function populateState($ordering = null, $direction = null)
$limitstart = $input->getUint('limitstart', 0);
$this->setState('list.start', $limitstart);
- $params = $this->state->params;
+ $params = $this->state->params;
$menuParams = $app->getMenu()->getActive() ? $app->getMenu()->getActive()->getParams() : new Registry();
$mergedParams = clone $menuParams;
diff --git a/components/com_content/src/Model/FormModel.php b/components/com_content/src/Model/FormModel.php
index f1c488b05a95..fd2ae33c763d 100644
--- a/components/com_content/src/Model/FormModel.php
+++ b/components/com_content/src/Model/FormModel.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Content\Site\Model;
-use Joomla\Component\Content\Administrator\Model\ArticleModel;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\TagsHelper;
@@ -18,6 +17,7 @@
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Object\CMSObject;
use Joomla\CMS\Table\Table;
+use Joomla\Component\Content\Administrator\Model\ArticleModel;
use Joomla\Database\ParameterType;
use Joomla\Registry\Registry;
use Joomla\Utilities\ArrayHelper;
diff --git a/components/com_content/src/Service/Router.php b/components/com_content/src/Service/Router.php
index 7b6168480709..6b99a0bee7f4 100644
--- a/components/com_content/src/Service/Router.php
+++ b/components/com_content/src/Service/Router.php
@@ -65,13 +65,13 @@ public function __construct(SiteApplication $app, AbstractMenu $menu, /**
*
* @since 4.0.0
*/
- private readonly CategoryFactoryInterface $categoryFactory, /**
+ private readonly CategoryFactoryInterface $categoryFactory, /**
* The db
*
*
* @since 4.0.0
*/
- private readonly DatabaseInterface $db)
+ private readonly DatabaseInterface $db)
{
$params = ComponentHelper::getParams('com_content');
$this->noIDs = (bool) $params->get('sef_ids');
diff --git a/components/com_content/src/View/Archive/HtmlView.php b/components/com_content/src/View/Archive/HtmlView.php
index 00f9011b7237..57da6e4801be 100644
--- a/components/com_content/src/View/Archive/HtmlView.php
+++ b/components/com_content/src/View/Archive/HtmlView.php
@@ -10,16 +10,16 @@
namespace Joomla\Component\Content\Site\View\Archive;
-use Joomla\Registry\Registry;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\CMS\User\User;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Plugin\PluginHelper;
+use Joomla\CMS\User\User;
use Joomla\Component\Content\Site\Model\ArchiveModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/components/com_content/src/View/Article/HtmlView.php b/components/com_content/src/View/Article/HtmlView.php
index 9f7480ee3ca3..246459fb070d 100644
--- a/components/com_content/src/View/Article/HtmlView.php
+++ b/components/com_content/src/View/Article/HtmlView.php
@@ -10,13 +10,11 @@
namespace Joomla\Component\Content\Site\View\Article;
-use Joomla\CMS\Event\Content\ContentPrepareEvent;
+use Joomla\CMS\Categories\Categories;
+use Joomla\CMS\Event\Content\AfterDisplayEvent;
use Joomla\CMS\Event\Content\AfterTitleEvent;
use Joomla\CMS\Event\Content\BeforeDisplayEvent;
-use Joomla\CMS\Event\Content\AfterDisplayEvent;
-use Joomla\Registry\Registry;
-use Joomla\CMS\User\User;
-use Joomla\CMS\Categories\Categories;
+use Joomla\CMS\Event\Content\ContentPrepareEvent;
use Joomla\CMS\Factory;
use Joomla\CMS\Helper\TagsHelper;
use Joomla\CMS\Language\Associations;
@@ -27,9 +25,11 @@
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
+use Joomla\CMS\User\User;
use Joomla\Component\Content\Site\Helper\AssociationHelper;
use Joomla\Component\Content\Site\Helper\RouteHelper;
use Joomla\Component\Content\Site\Model\ArticleModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/components/com_content/src/View/Featured/HtmlView.php b/components/com_content/src/View/Featured/HtmlView.php
index 82e87c7c3759..e3a3d1d946ce 100644
--- a/components/com_content/src/View/Featured/HtmlView.php
+++ b/components/com_content/src/View/Featured/HtmlView.php
@@ -10,17 +10,17 @@
namespace Joomla\Component\Content\Site\View\Featured;
-use Joomla\Registry\Registry;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\Database\DatabaseDriver;
-use Joomla\CMS\User\User;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Router\Route;
+use Joomla\CMS\User\User;
use Joomla\Component\Content\Site\Model\FeaturedModel;
+use Joomla\Database\DatabaseDriver;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/components/com_content/src/View/Form/HtmlView.php b/components/com_content/src/View/Form/HtmlView.php
index ead0e6bcc2e6..0e698c200ab0 100644
--- a/components/com_content/src/View/Form/HtmlView.php
+++ b/components/com_content/src/View/Form/HtmlView.php
@@ -10,17 +10,17 @@
namespace Joomla\Component\Content\Site\View\Form;
-use Joomla\CMS\Form\Form;
-use Joomla\Registry\Registry;
-use Joomla\CMS\User\User;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\TagsHelper;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Plugin\PluginHelper;
+use Joomla\CMS\User\User;
use Joomla\Component\Content\Site\Model\FormModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/components/com_fields/src/Controller/DisplayController.php b/components/com_fields/src/Controller/DisplayController.php
index 96d0e8e94cff..26612f92ce23 100644
--- a/components/com_fields/src/Controller/DisplayController.php
+++ b/components/com_fields/src/Controller/DisplayController.php
@@ -10,9 +10,9 @@
namespace Joomla\Component\Fields\Site\Controller;
-use Joomla\CMS\MVC\Controller\BaseController;
-use Joomla\CMS\Input\Input;
use Joomla\CMS\Application\CMSApplication;
+use Joomla\CMS\Input\Input;
+use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
// phpcs:disable PSR1.Files.SideEffects
diff --git a/components/com_finder/src/Model/SearchModel.php b/components/com_finder/src/Model/SearchModel.php
index 4aa12eee0d71..044cf9f9f0d2 100644
--- a/components/com_finder/src/Model/SearchModel.php
+++ b/components/com_finder/src/Model/SearchModel.php
@@ -564,7 +564,7 @@ protected function populateState($ordering = null, $direction = null)
$dirn = StringHelper::strtolower($dirn);
match ($dirn) {
- 'asc' => $this->setState('list.direction', 'ASC'),
+ 'asc' => $this->setState('list.direction', 'ASC'),
default => $this->setState('list.direction', 'DESC'),
};
diff --git a/components/com_finder/src/View/Search/HtmlView.php b/components/com_finder/src/View/Search/HtmlView.php
index 1631cf0bbbea..e34db138e186 100644
--- a/components/com_finder/src/View/Search/HtmlView.php
+++ b/components/com_finder/src/View/Search/HtmlView.php
@@ -10,8 +10,6 @@
namespace Joomla\Component\Finder\Site\View\Search;
-use Joomla\Registry\Registry;
-use Joomla\CMS\User\User;
use Joomla\CMS\Event\Finder\ResultEvent;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
@@ -25,10 +23,12 @@
use Joomla\CMS\Router\SiteRouterAwareInterface;
use Joomla\CMS\Router\SiteRouterAwareTrait;
use Joomla\CMS\Uri\Uri;
+use Joomla\CMS\User\User;
use Joomla\Component\Finder\Administrator\Indexer\Query;
use Joomla\Component\Finder\Site\Helper\FinderHelper;
use Joomla\Component\Finder\Site\Model\SearchModel;
use Joomla\Filesystem\Path;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
@@ -41,11 +41,11 @@
*/
class HtmlView extends BaseHtmlView implements SiteRouterAwareInterface
{
+ use SiteRouterAwareTrait;
/**
* @var mixed[]
*/
public $sortOrderFields;
- use SiteRouterAwareTrait;
/**
* The query indexer object
diff --git a/components/com_newsfeeds/src/Helper/AssociationHelper.php b/components/com_newsfeeds/src/Helper/AssociationHelper.php
index deec9a9dea41..d417f855ccd1 100644
--- a/components/com_newsfeeds/src/Helper/AssociationHelper.php
+++ b/components/com_newsfeeds/src/Helper/AssociationHelper.php
@@ -43,7 +43,7 @@ public static function getAssociations($id = 0, $view = null)
if ($view === 'newsfeed' && $id) {
$associations = Associations::getAssociations('com_newsfeeds', '#__newsfeeds', 'com_newsfeeds.item', $id);
- $return = [];
+ $return = [];
foreach ($associations as $tag => $item) {
$return[$tag] = RouteHelper::getNewsfeedRoute($item->id, (int) $item->catid, $item->language);
}
diff --git a/components/com_newsfeeds/src/Service/Router.php b/components/com_newsfeeds/src/Service/Router.php
index 8bacd133e735..a099f90633fc 100644
--- a/components/com_newsfeeds/src/Service/Router.php
+++ b/components/com_newsfeeds/src/Service/Router.php
@@ -65,13 +65,13 @@ public function __construct(SiteApplication $app, AbstractMenu $menu, /**
*
* @since 4.0.0
*/
- private readonly CategoryFactoryInterface $categoryFactory, /**
+ private readonly CategoryFactoryInterface $categoryFactory, /**
* The db
*
*
* @since 4.0.0
*/
- private readonly DatabaseInterface $db)
+ private readonly DatabaseInterface $db)
{
$params = ComponentHelper::getParams('com_newsfeeds');
$this->noIDs = (bool) $params->get('sef_ids');
diff --git a/components/com_newsfeeds/src/View/Newsfeed/HtmlView.php b/components/com_newsfeeds/src/View/Newsfeed/HtmlView.php
index 0430e6a366d5..5dea1a9a8ca4 100644
--- a/components/com_newsfeeds/src/View/Newsfeed/HtmlView.php
+++ b/components/com_newsfeeds/src/View/Newsfeed/HtmlView.php
@@ -10,8 +10,6 @@
namespace Joomla\Component\Newsfeeds\Site\View\Newsfeed;
-use Joomla\CMS\User\User;
-use Joomla\Registry\Registry;
use Joomla\CMS\Categories\Categories;
use Joomla\CMS\Factory;
use Joomla\CMS\Feed\FeedFactory;
@@ -19,8 +17,10 @@
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\User\User;
use Joomla\Component\Newsfeeds\Site\Helper\RouteHelper;
use Joomla\Component\Newsfeeds\Site\Model\NewsfeedModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/components/com_tags/src/Model/TagModel.php b/components/com_tags/src/Model/TagModel.php
index 4e359f43dd37..a18e5e0796a4 100644
--- a/components/com_tags/src/Model/TagModel.php
+++ b/components/com_tags/src/Model/TagModel.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Tags\Site\Model;
-use Joomla\Component\Tags\Administrator\Table\TagTable;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Helper\TagsHelper;
@@ -18,6 +17,7 @@
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\CMS\Object\CMSObject;
+use Joomla\Component\Tags\Administrator\Table\TagTable;
use Joomla\Component\Tags\Site\Helper\RouteHelper;
use Joomla\Database\QueryInterface;
use Joomla\Utilities\ArrayHelper;
@@ -112,8 +112,8 @@ public function getItems()
// Get display date
$item->displayDate = match ($this->state->params->get('tag_list_show_date')) {
'modified' => $item->core_modified_time,
- 'created' => $item->core_created_time,
- default => ($item->core_publish_up == 0) ? $item->core_created_time : $item->core_publish_up,
+ 'created' => $item->core_created_time,
+ default => ($item->core_publish_up == 0) ? $item->core_created_time : $item->core_publish_up,
};
}
diff --git a/components/com_tags/src/Service/Router.php b/components/com_tags/src/Service/Router.php
index 46ac5e7966ad..b29b47c4702d 100644
--- a/components/com_tags/src/Service/Router.php
+++ b/components/com_tags/src/Service/Router.php
@@ -67,7 +67,7 @@ public function __construct(SiteApplication $app, AbstractMenu $menu, ?CategoryF
*
* @since 4.0.0
*/
- private readonly DatabaseInterface $db)
+ private readonly DatabaseInterface $db)
{
parent::__construct($app, $menu);
@@ -97,7 +97,7 @@ public function preprocess($query)
}
foreach ($query['id'] as &$item) {
- if (in_array(strpos((string) $item, ':'), [0, false], true)) {
+ if (\in_array(strpos((string) $item, ':'), [0, false], true)) {
$dbquery = $this->db->getQuery(true);
$id = (int) $item;
diff --git a/components/com_tags/src/View/Tag/HtmlView.php b/components/com_tags/src/View/Tag/HtmlView.php
index bae534e67f65..608a96a4b81a 100644
--- a/components/com_tags/src/View/Tag/HtmlView.php
+++ b/components/com_tags/src/View/Tag/HtmlView.php
@@ -10,11 +10,11 @@
namespace Joomla\Component\Tags\Site\View\Tag;
-use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Factory;
use Joomla\CMS\Menu\MenuItem;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Router\Route;
use Joomla\CMS\User\User;
diff --git a/components/com_tags/src/View/Tags/HtmlView.php b/components/com_tags/src/View/Tags/HtmlView.php
index a783a88b5dcc..f30720399dc2 100644
--- a/components/com_tags/src/View/Tags/HtmlView.php
+++ b/components/com_tags/src/View/Tags/HtmlView.php
@@ -10,13 +10,13 @@
namespace Joomla\Component\Tags\Site\View\Tags;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\CMS\User\User;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Router\Route;
+use Joomla\CMS\User\User;
use Joomla\Component\Tags\Site\Model\TagsModel;
use Joomla\Registry\Registry;
diff --git a/components/com_users/src/Controller/ProfileController.php b/components/com_users/src/Controller/ProfileController.php
index 92c4ca38f5b8..6a754d3e4f41 100644
--- a/components/com_users/src/Controller/ProfileController.php
+++ b/components/com_users/src/Controller/ProfileController.php
@@ -10,13 +10,13 @@
namespace Joomla\Component\Users\Site\Controller;
-use Joomla\CMS\Event\Model\NormaliseRequestDataEvent;
-use Joomla\Component\Users\Site\Model\ProfileModel;
use Joomla\CMS\Application\CMSWebApplicationInterface;
+use Joomla\CMS\Event\Model\NormaliseRequestDataEvent;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
+use Joomla\Component\Users\Site\Model\ProfileModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/components/com_users/src/Controller/RegistrationController.php b/components/com_users/src/Controller/RegistrationController.php
index b806f6bebf1c..b17a0c08eb48 100644
--- a/components/com_users/src/Controller/RegistrationController.php
+++ b/components/com_users/src/Controller/RegistrationController.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Users\Site\Controller;
-use Joomla\Component\Users\Site\Model\RegistrationModel;
use Joomla\CMS\Application\CMSWebApplicationInterface;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Language\Text;
@@ -18,6 +17,7 @@
use Joomla\CMS\Router\Route;
use Joomla\CMS\User\UserFactoryAwareInterface;
use Joomla\CMS\User\UserFactoryAwareTrait;
+use Joomla\Component\Users\Site\Model\RegistrationModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/components/com_users/src/Controller/RemindController.php b/components/com_users/src/Controller/RemindController.php
index 6f9f8bd876a8..458fe7e615a2 100644
--- a/components/com_users/src/Controller/RemindController.php
+++ b/components/com_users/src/Controller/RemindController.php
@@ -10,10 +10,10 @@
namespace Joomla\Component\Users\Site\Controller;
-use Joomla\Component\Users\Site\Model\RemindModel;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Router\Route;
+use Joomla\Component\Users\Site\Model\RemindModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/components/com_users/src/Controller/ResetController.php b/components/com_users/src/Controller/ResetController.php
index 22f253bd02c1..a2b610cd6fd8 100644
--- a/components/com_users/src/Controller/ResetController.php
+++ b/components/com_users/src/Controller/ResetController.php
@@ -10,10 +10,10 @@
namespace Joomla\Component\Users\Site\Controller;
-use Joomla\Component\Users\Site\Model\ResetModel;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
use Joomla\CMS\Router\Route;
+use Joomla\Component\Users\Site\Model\ResetModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/components/com_users/src/Controller/UserController.php b/components/com_users/src/Controller/UserController.php
index 4739bf0698a2..9d9f13ea1896 100644
--- a/components/com_users/src/Controller/UserController.php
+++ b/components/com_users/src/Controller/UserController.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Users\Site\Controller;
-use Joomla\Component\Users\Site\Model\RemindModel;
use Joomla\CMS\Application\ApplicationHelper;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Language\Text;
@@ -18,6 +17,7 @@
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;
use Joomla\CMS\Uri\Uri;
+use Joomla\Component\Users\Site\Model\RemindModel;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/components/com_users/src/Model/ProfileModel.php b/components/com_users/src/Model/ProfileModel.php
index 4d1575c5c3cb..c0d28af8ea2b 100644
--- a/components/com_users/src/Model/ProfileModel.php
+++ b/components/com_users/src/Model/ProfileModel.php
@@ -10,7 +10,6 @@
namespace Joomla\Component\Users\Site\Model;
-use Joomla\Component\Users\Administrator\Helper\Mfa;
use Joomla\CMS\Access\Access;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
@@ -23,6 +22,7 @@
use Joomla\CMS\String\PunycodeHelper;
use Joomla\CMS\User\User;
use Joomla\CMS\User\UserHelper;
+use Joomla\Component\Users\Administrator\Helper\Mfa;
use Joomla\Component\Users\Administrator\Model\UserModel;
use Joomla\Registry\Registry;
diff --git a/components/com_users/src/View/Login/HtmlView.php b/components/com_users/src/View/Login/HtmlView.php
index daa3c8b533ea..922d8df54830 100644
--- a/components/com_users/src/View/Login/HtmlView.php
+++ b/components/com_users/src/View/Login/HtmlView.php
@@ -10,15 +10,15 @@
namespace Joomla\Component\Users\Site\View\Login;
-use Joomla\CMS\Form\Form;
-use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Helper\AuthenticationHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\User\User;
use Joomla\Component\Users\Site\Model\LoginModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/components/com_users/src/View/Profile/HtmlView.php b/components/com_users/src/View/Profile/HtmlView.php
index 7bd88260084f..535b6a55d9d3 100644
--- a/components/com_users/src/View/Profile/HtmlView.php
+++ b/components/com_users/src/View/Profile/HtmlView.php
@@ -10,9 +10,8 @@
namespace Joomla\Component\Users\Site\View\Profile;
-use Joomla\CMS\Form\Form;
-use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
@@ -22,6 +21,7 @@
use Joomla\Component\Users\Administrator\Helper\Mfa;
use Joomla\Component\Users\Site\Model\ProfileModel;
use Joomla\Database\DatabaseDriver;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/components/com_users/src/View/Registration/HtmlView.php b/components/com_users/src/View/Registration/HtmlView.php
index 6d2bd25192ab..78ad17c60e4a 100644
--- a/components/com_users/src/View/Registration/HtmlView.php
+++ b/components/com_users/src/View/Registration/HtmlView.php
@@ -10,15 +10,15 @@
namespace Joomla\Component\Users\Site\View\Registration;
-use Joomla\CMS\Form\Form;
-use Joomla\Registry\Registry;
use Joomla\CMS\Document\HtmlDocument;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\Component\Users\Site\Model\RegistrationModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/components/com_users/src/View/Remind/HtmlView.php b/components/com_users/src/View/Remind/HtmlView.php
index f5e57e569cb8..82f4104b1ce5 100644
--- a/components/com_users/src/View/Remind/HtmlView.php
+++ b/components/com_users/src/View/Remind/HtmlView.php
@@ -10,13 +10,13 @@
namespace Joomla\Component\Users\Site\View\Remind;
-use Joomla\CMS\Form\Form;
-use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\Component\Users\Site\Model\RemindModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/components/com_users/src/View/Reset/HtmlView.php b/components/com_users/src/View/Reset/HtmlView.php
index 7f579f9f3981..a2f7f100e4fa 100644
--- a/components/com_users/src/View/Reset/HtmlView.php
+++ b/components/com_users/src/View/Reset/HtmlView.php
@@ -10,13 +10,13 @@
namespace Joomla\Component\Users\Site\View\Reset;
-use Joomla\CMS\Form\Form;
-use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\View\GenericDataException;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\Component\Users\Site\Model\ResetModel;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/components/com_wrapper/src/View/Wrapper/HtmlView.php b/components/com_wrapper/src/View/Wrapper/HtmlView.php
index e560f3db2f9c..9d1b2add6eaf 100644
--- a/components/com_wrapper/src/View/Wrapper/HtmlView.php
+++ b/components/com_wrapper/src/View/Wrapper/HtmlView.php
@@ -10,10 +10,10 @@
namespace Joomla\Component\Wrapper\Site\View\Wrapper;
-use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
use Joomla\CMS\Uri\Uri;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/includes/app.php b/includes/app.php
index 922c8542b36e..55df6290264f 100644
--- a/includes/app.php
+++ b/includes/app.php
@@ -1,10 +1,10 @@
';
foreach ($errorfiles as $error) {
- $output .= sprintf('
%s
', $error);
+ $output .= \sprintf('
%s
', $error);
}
$output .= '';
@@ -247,7 +247,7 @@ public function execute()
}
// If gzip compression is enabled in configuration and the server is compliant, compress the output.
- if ($this->get('gzip') && (in_array(\ini_get('zlib.output_compression'), ['', '0'], true) || \ini_get('zlib.output_compression') === false) && (\ini_get('output_handler') != 'ob_gzhandler')) {
+ if ($this->get('gzip') && (\in_array(\ini_get('zlib.output_compression'), ['', '0'], true) || \ini_get('zlib.output_compression') === false) && (\ini_get('output_handler') != 'ob_gzhandler')) {
$this->compress();
}
} catch (\Throwable $throwable) {
diff --git a/installation/src/Console/InstallCommand.php b/installation/src/Console/InstallCommand.php
index e99d63e82e1d..84c572fafdf0 100644
--- a/installation/src/Console/InstallCommand.php
+++ b/installation/src/Console/InstallCommand.php
@@ -9,13 +9,13 @@
namespace Joomla\CMS\Installation\Console;
-use Joomla\CMS\Installation\Model\ConfigurationModel;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\FormField;
use Joomla\CMS\Form\FormHelper;
use Joomla\CMS\Helper\PublicFolderGeneratorHelper;
use Joomla\CMS\Installation\Model\ChecksModel;
use Joomla\CMS\Installation\Model\CleanupModel;
+use Joomla\CMS\Installation\Model\ConfigurationModel;
use Joomla\CMS\Installation\Model\DatabaseModel;
use Joomla\CMS\Installation\Model\SetupModel;
use Joomla\CMS\Language\Text;
diff --git a/installation/src/Controller/InstallationController.php b/installation/src/Controller/InstallationController.php
index 951b08234704..d2dbf8743d84 100644
--- a/installation/src/Controller/InstallationController.php
+++ b/installation/src/Controller/InstallationController.php
@@ -10,13 +10,13 @@
namespace Joomla\CMS\Installation\Controller;
+use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Input\Input;
-use Joomla\CMS\Installation\Model\SetupModel;
-use Joomla\CMS\Installation\Model\DatabaseModel;
+use Joomla\CMS\Installation\Model\CleanupModel;
use Joomla\CMS\Installation\Model\ConfigurationModel;
+use Joomla\CMS\Installation\Model\DatabaseModel;
use Joomla\CMS\Installation\Model\LanguagesModel;
-use Joomla\CMS\Installation\Model\CleanupModel;
-use Joomla\CMS\Application\CMSApplication;
+use Joomla\CMS\Installation\Model\SetupModel;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\Session\Session;
diff --git a/installation/src/Controller/LanguageController.php b/installation/src/Controller/LanguageController.php
index a76615f3be83..393e22311e7f 100644
--- a/installation/src/Controller/LanguageController.php
+++ b/installation/src/Controller/LanguageController.php
@@ -10,8 +10,8 @@
namespace Joomla\CMS\Installation\Controller;
-use Joomla\CMS\Installation\Model\LanguagesModel;
use Joomla\CMS\Factory;
+use Joomla\CMS\Installation\Model\LanguagesModel;
use Joomla\CMS\Installation\Model\SetupModel;
use Joomla\CMS\Language\Language;
use Joomla\CMS\Language\Text;
@@ -96,7 +96,7 @@ public function setdefault()
$admin_lang = $this->input->getString('administratorlang', false);
// Check that the string is an ISO Language Code avoiding any injection.
- if (in_array(preg_match('/^[a-z]{2}(\-[A-Z]{2})?$/', $admin_lang), [0, false], true)) {
+ if (\in_array(preg_match('/^[a-z]{2}(\-[A-Z]{2})?$/', $admin_lang), [0, false], true)) {
$admin_lang = 'en-GB';
}
@@ -113,7 +113,7 @@ public function setdefault()
$frontend_lang = $this->input->getString('frontendlang', false);
// Check that the string is an ISO Language Code avoiding any injection.
- if (in_array(preg_match('/^[a-z]{2}(\-[A-Z]{2})?$/', $frontend_lang), [0, false], true)) {
+ if (\in_array(preg_match('/^[a-z]{2}(\-[A-Z]{2})?$/', $frontend_lang), [0, false], true)) {
$frontend_lang = 'en-GB';
}
diff --git a/installation/src/Helper/DatabaseHelper.php b/installation/src/Helper/DatabaseHelper.php
index f9daf177c949..c71563b48eaa 100644
--- a/installation/src/Helper/DatabaseHelper.php
+++ b/installation/src/Helper/DatabaseHelper.php
@@ -203,7 +203,7 @@ public static function validateConnectionParameters($options)
}
// Validate database table prefix.
- if (empty($options->db_prefix) || in_array(preg_match('#^[a-zA-Z]+\w*$#', $options->db_prefix), [0, false], true)) {
+ if (empty($options->db_prefix) || \in_array(preg_match('#^[a-zA-Z]+\w*$#', $options->db_prefix), [0, false], true)) {
return Text::_('INSTL_DATABASE_PREFIX_MSG');
}
@@ -213,7 +213,7 @@ public static function validateConnectionParameters($options)
}
// Validate database name.
- if (\in_array($options->db_type, ['pgsql', 'postgresql']) && in_array(preg_match('#^[a-zA-Z_][0-9a-zA-Z_$]*$#', $options->db_name), [0, false], true)) {
+ if (\in_array($options->db_type, ['pgsql', 'postgresql']) && \in_array(preg_match('#^[a-zA-Z_][0-9a-zA-Z_$]*$#', $options->db_name), [0, false], true)) {
return Text::_('INSTL_DATABASE_NAME_MSG_POSTGRES');
}
diff --git a/installation/src/Model/ConfigurationModel.php b/installation/src/Model/ConfigurationModel.php
index a99c15b91355..9f9c1f99d291 100644
--- a/installation/src/Model/ConfigurationModel.php
+++ b/installation/src/Model/ConfigurationModel.php
@@ -10,11 +10,11 @@
namespace Joomla\CMS\Installation\Model;
-use Joomla\CMS\Table\Extension;
use Joomla\CMS\Factory;
use Joomla\CMS\Installation\Helper\DatabaseHelper;
use Joomla\CMS\Installer\Installer;
use Joomla\CMS\Language\Text;
+use Joomla\CMS\Table\Extension;
use Joomla\CMS\User\UserHelper;
use Joomla\CMS\Version;
use Joomla\Database\DatabaseDriver;
diff --git a/installation/src/Service/Provider/Application.php b/installation/src/Service/Provider/Application.php
index 13fec00a0ab2..cb3159509d96 100644
--- a/installation/src/Service/Provider/Application.php
+++ b/installation/src/Service/Provider/Application.php
@@ -10,7 +10,6 @@
namespace Joomla\CMS\Installation\Service\Provider;
-use Joomla\Event\DispatcherInterface;
use Joomla\CMS\Error\Renderer\JsonRenderer;
use Joomla\CMS\Input\Input as CMSInput;
use Joomla\CMS\Installation\Application\CliInstallationApplication;
@@ -18,6 +17,7 @@
use Joomla\CMS\Language\LanguageFactoryInterface;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
+use Joomla\Event\DispatcherInterface;
use Joomla\Event\Priority;
use Joomla\Session\SessionEvents;
use Joomla\Session\SessionInterface;
@@ -80,7 +80,7 @@ function (Container $container) {
// Inject a custom JSON error renderer
$container->share(
JsonRenderer::class,
- fn(Container $container) => new \Joomla\CMS\Installation\Error\Renderer\JsonRenderer()
+ fn (Container $container) => new \Joomla\CMS\Installation\Error\Renderer\JsonRenderer()
);
}
}
diff --git a/language/en-GB/localise.php b/language/en-GB/localise.php
index 0ad9efa5a2fa..901a7335d784 100644
--- a/language/en-GB/localise.php
+++ b/language/en-GB/localise.php
@@ -34,8 +34,8 @@ abstract class En_GBLocalise
public static function getPluralSuffixes($count)
{
return match ($count) {
- 0 => ['0'],
- 1 => ['ONE', '1'],
+ 0 => ['0'],
+ 1 => ['ONE', '1'],
default => ['OTHER', 'MORE'],
};
}
diff --git a/libraries/src/Adapter/Adapter.php b/libraries/src/Adapter/Adapter.php
index 4c9f1b5dc265..a39da95e3834 100644
--- a/libraries/src/Adapter/Adapter.php
+++ b/libraries/src/Adapter/Adapter.php
@@ -9,11 +9,11 @@
namespace Joomla\CMS\Adapter;
-use Joomla\Database\DatabaseDriver;
use Joomla\CMS\Factory;
use Joomla\CMS\Object\LegacyErrorHandlingTrait;
use Joomla\CMS\Object\LegacyPropertyManagementTrait;
use Joomla\Database\DatabaseAwareInterface;
+use Joomla\Database\DatabaseDriver;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
@@ -79,8 +79,10 @@ public function __construct(/**
*
* @since 1.6
*/
- protected $_basepath, $classprefix = null, $adapterfolder = null)
- {
+ protected $_basepath,
+ $classprefix = null,
+ $adapterfolder = null
+ ) {
$this->_classprefix = $classprefix ?: 'J';
$this->_adapterfolder = $adapterfolder ?: 'adapters';
diff --git a/libraries/src/Application/ApiApplication.php b/libraries/src/Application/ApiApplication.php
index f2f3ac25e472..d0a04e3388b3 100644
--- a/libraries/src/Application/ApiApplication.php
+++ b/libraries/src/Application/ApiApplication.php
@@ -9,9 +9,9 @@
namespace Joomla\CMS\Application;
-use Joomla\CMS\Application\Exception\NotAcceptable;
use Joomla\Application\Web\WebClient;
use Joomla\CMS\Access\Exception\AuthenticationFailed;
+use Joomla\CMS\Application\Exception\NotAcceptable;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Event\Application\AfterApiRouteEvent;
use Joomla\CMS\Event\Application\AfterDispatchEvent;
@@ -349,7 +349,7 @@ private function handlePreflight($method, $router)
$matchingRoutesMethods = array_unique(
array_reduce(
$matchingRoutes,
- fn($carry, $route) => array_merge($carry, $route->getMethods()),
+ fn ($carry, $route) => array_merge($carry, $route->getMethods()),
[]
)
);
diff --git a/libraries/src/Application/BaseApplication.php b/libraries/src/Application/BaseApplication.php
index 50797e5b117a..5a5a56c8ee43 100644
--- a/libraries/src/Application/BaseApplication.php
+++ b/libraries/src/Application/BaseApplication.php
@@ -30,12 +30,12 @@
*/
abstract class BaseApplication extends AbstractApplication
{
+ use EventAware;
+ use IdentityAware;
/**
* @var Input
*/
public $input;
- use EventAware;
- use IdentityAware;
/**
* Class constructor.
diff --git a/libraries/src/Application/CMSApplication.php b/libraries/src/Application/CMSApplication.php
index 175b497268b1..68be8767af05 100644
--- a/libraries/src/Application/CMSApplication.php
+++ b/libraries/src/Application/CMSApplication.php
@@ -9,10 +9,10 @@
namespace Joomla\CMS\Application;
-use Joomla\CMS\Document\Document;
use Joomla\Application\SessionAwareWebApplicationTrait;
use Joomla\Application\Web\WebClient;
use Joomla\CMS\Authentication\Authentication;
+use Joomla\CMS\Document\Document;
use Joomla\CMS\Event\Application\AfterCompressEvent;
use Joomla\CMS\Event\Application\AfterInitialiseEvent;
use Joomla\CMS\Event\Application\AfterRenderEvent;
@@ -273,7 +273,7 @@ private function sanityCheckSystemVariables()
// Get invalid input variables
$invalidInputVariables = array_filter(
['option', 'view', 'format', 'lang', 'Itemid', 'template', 'templateStyle', 'task'],
- fn($systemVariable) => $input->exists($systemVariable) && \is_array($input->getRaw($systemVariable))
+ fn ($systemVariable) => $input->exists($systemVariable) && \is_array($input->getRaw($systemVariable))
);
// Unset invalid system variables
@@ -311,7 +311,7 @@ public function execute()
}
// If gzip compression is enabled in configuration and the server is compliant, compress the output.
- if ($this->get('gzip') && (in_array(\ini_get('zlib.output_compression'), ['', '0'], true) || \ini_get('zlib.output_compression') === false) && \ini_get('output_handler') !== 'ob_gzhandler') {
+ if ($this->get('gzip') && (\in_array(\ini_get('zlib.output_compression'), ['', '0'], true) || \ini_get('zlib.output_compression') === false) && \ini_get('output_handler') !== 'ob_gzhandler') {
$this->compress();
// Trigger the onAfterCompress event.
@@ -392,7 +392,7 @@ protected function checkUserRequireReset($option, $view, $layout, $tasks)
$tasks = explode(',', (string) $tasks);
// Check full task version "option/task"
// Check short task version, must be on the same option of the view
- if (!in_array($this->input->getCmd('option', '') . '/' . $task, $tasks) && ($this->input->getCmd('option', '') !== $option || !in_array($task, $tasks))) {
+ if (!\in_array($this->input->getCmd('option', '') . '/' . $task, $tasks) && ($this->input->getCmd('option', '') !== $option || !\in_array($task, $tasks))) {
// Not permitted task
$redirect = true;
}
@@ -1178,7 +1178,7 @@ public function setUserState($key, $value)
public function toString($compress = false)
{
// Don't compress something if the server is going to do it anyway. Waste of time.
- if ($compress && (in_array(\ini_get('zlib.output_compression'), ['', '0'], true) || \ini_get('zlib.output_compression') === false) && \ini_get('output_handler') !== 'ob_gzhandler') {
+ if ($compress && (\in_array(\ini_get('zlib.output_compression'), ['', '0'], true) || \ini_get('zlib.output_compression') === false) && \ini_get('output_handler') !== 'ob_gzhandler') {
$this->compress();
}
diff --git a/libraries/src/Application/CliApplication.php b/libraries/src/Application/CliApplication.php
index 917b634ed961..40c8dcb2768b 100644
--- a/libraries/src/Application/CliApplication.php
+++ b/libraries/src/Application/CliApplication.php
@@ -9,8 +9,6 @@
namespace Joomla\CMS\Application;
-use Joomla\CMS\Session\Session;
-use Joomla\CMS\Input\Cli;
use Joomla\Application\AbstractApplication;
use Joomla\CMS\Application\CLI\CliInput;
use Joomla\CMS\Application\CLI\CliOutput;
@@ -19,7 +17,9 @@
use Joomla\CMS\Event\Application\BeforeExecuteEvent;
use Joomla\CMS\Extension\ExtensionManagerTrait;
use Joomla\CMS\Factory;
+use Joomla\CMS\Input\Cli;
use Joomla\CMS\Language\Language;
+use Joomla\CMS\Session\Session;
use Joomla\DI\Container;
use Joomla\DI\ContainerAwareTrait;
use Joomla\Event\DispatcherInterface;
diff --git a/libraries/src/Application/ConsoleApplication.php b/libraries/src/Application/ConsoleApplication.php
index c75644ce2283..3712d77f29b9 100644
--- a/libraries/src/Application/ConsoleApplication.php
+++ b/libraries/src/Application/ConsoleApplication.php
@@ -9,27 +9,27 @@
namespace Joomla\CMS\Application;
-use Joomla\CMS\Input\Cli;
-use Joomla\CMS\Console\CleanCacheCommand;
-use Joomla\CMS\Console\CheckUpdatesCommand;
-use Joomla\CMS\Console\CheckJoomlaUpdatesCommand;
-use Joomla\CMS\Console\RemoveOldFilesCommand;
use Joomla\CMS\Console\AddUserCommand;
use Joomla\CMS\Console\AddUserToGroupCommand;
-use Joomla\CMS\Console\RemoveUserFromGroupCommand;
-use Joomla\CMS\Console\DeleteUserCommand;
use Joomla\CMS\Console\ChangeUserPasswordCommand;
+use Joomla\CMS\Console\CheckJoomlaUpdatesCommand;
+use Joomla\CMS\Console\CheckUpdatesCommand;
+use Joomla\CMS\Console\CleanCacheCommand;
+use Joomla\CMS\Console\DeleteUserCommand;
use Joomla\CMS\Console\ListUserCommand;
+use Joomla\CMS\Console\RemoveOldFilesCommand;
+use Joomla\CMS\Console\RemoveUserFromGroupCommand;
use Joomla\CMS\Console\SiteCreatePublicFolderCommand;
-use Joomla\Console\Command\AbstractCommand;
use Joomla\CMS\Extension\ExtensionManagerTrait;
use Joomla\CMS\Factory;
+use Joomla\CMS\Input\Cli;
use Joomla\CMS\Language\Language;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Router\Router;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Version;
use Joomla\Console\Application;
+use Joomla\Console\Command\AbstractCommand;
use Joomla\Database\DatabaseAwareTrait;
use Joomla\DI\Container;
use Joomla\DI\ContainerAwareTrait;
diff --git a/libraries/src/Application/DaemonApplication.php b/libraries/src/Application/DaemonApplication.php
index fd2258c9b2ab..631d4c51d862 100644
--- a/libraries/src/Application/DaemonApplication.php
+++ b/libraries/src/Application/DaemonApplication.php
@@ -762,7 +762,7 @@ protected function writeProcessIdFile()
}
// Write the process id file out to disk.
- if (in_array(file_put_contents($file, $this->processId), [0, false], true)) {
+ if (\in_array(file_put_contents($file, $this->processId), [0, false], true)) {
Log::add('Unable to write process id file: ' . $file, Log::ERROR);
return false;
diff --git a/libraries/src/Application/SiteApplication.php b/libraries/src/Application/SiteApplication.php
index f9f8d12a80a2..7ec5446cb862 100644
--- a/libraries/src/Application/SiteApplication.php
+++ b/libraries/src/Application/SiteApplication.php
@@ -9,7 +9,6 @@
namespace Joomla\CMS\Application;
-use Joomla\CMS\Router\Router;
use Joomla\Application\Web\WebClient;
use Joomla\CMS\Cache\CacheControllerFactoryAwareTrait;
use Joomla\CMS\Cache\Controller\OutputController;
@@ -24,6 +23,7 @@
use Joomla\CMS\Language\Text;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Router\Route;
+use Joomla\CMS\Router\Router;
use Joomla\CMS\Router\SiteRouter;
use Joomla\CMS\Uri\Uri;
use Joomla\DI\Container;
diff --git a/libraries/src/Application/WebApplication.php b/libraries/src/Application/WebApplication.php
index 9ddff4ecaa78..14853c6b9cb1 100644
--- a/libraries/src/Application/WebApplication.php
+++ b/libraries/src/Application/WebApplication.php
@@ -197,7 +197,7 @@ public function execute()
}
// If gzip compression is enabled in configuration and the server is compliant, compress the output.
- if ($this->get('gzip') && (in_array(\ini_get('zlib.output_compression'), ['', '0'], true) || \ini_get('zlib.output_compression') === false) && (\ini_get('output_handler') !== 'ob_gzhandler')) {
+ if ($this->get('gzip') && (\in_array(\ini_get('zlib.output_compression'), ['', '0'], true) || \ini_get('zlib.output_compression') === false) && (\ini_get('output_handler') !== 'ob_gzhandler')) {
$this->compress();
}
@@ -408,7 +408,7 @@ protected function loadSystemUris($requestUri = null)
$uri = Uri::getInstance($this->get('uri.request'));
// If we are working from a CGI SAPI with the 'cgi.fix_pathinfo' directive disabled we use PHP_SELF.
- if (str_contains(PHP_SAPI, 'cgi') && (in_array(\ini_get('cgi.fix_pathinfo'), ['', '0'], true) || \ini_get('cgi.fix_pathinfo') === false) && !empty($_SERVER['REQUEST_URI'])) {
+ if (str_contains(PHP_SAPI, 'cgi') && (\in_array(\ini_get('cgi.fix_pathinfo'), ['', '0'], true) || \ini_get('cgi.fix_pathinfo') === false) && !empty($_SERVER['REQUEST_URI'])) {
// We aren't expecting PATH_INFO within PHP_SELF so this should work.
$path = \dirname((string) $_SERVER['PHP_SELF']);
} else {
diff --git a/libraries/src/Autoload/ClassLoader.php b/libraries/src/Autoload/ClassLoader.php
index ac0716453721..5ed7bd4da604 100644
--- a/libraries/src/Autoload/ClassLoader.php
+++ b/libraries/src/Autoload/ClassLoader.php
@@ -39,8 +39,7 @@ public function __construct(
* @since 3.4
*/
private readonly ComposerClassLoader $loader
- )
- {
+ ) {
}
/**
diff --git a/libraries/src/Cache/Storage/CacheStorageHelper.php b/libraries/src/Cache/Storage/CacheStorageHelper.php
index 505ccdebc873..4279aff53175 100644
--- a/libraries/src/Cache/Storage/CacheStorageHelper.php
+++ b/libraries/src/Cache/Storage/CacheStorageHelper.php
@@ -50,8 +50,7 @@ public function __construct(
* @since 1.7.0
*/
public $group
- )
- {
+ ) {
}
/**
diff --git a/libraries/src/Cache/Storage/FileStorage.php b/libraries/src/Cache/Storage/FileStorage.php
index aa57a72eacf4..ca31584e6dec 100644
--- a/libraries/src/Cache/Storage/FileStorage.php
+++ b/libraries/src/Cache/Storage/FileStorage.php
@@ -589,7 +589,7 @@ protected function _filesInFolder(
$excludefilter = \count($excludefilter) !== 0 ? '/(' . implode('|', $excludefilter) . ')/' : '';
while (($file = readdir($handle)) !== false) {
- if (($file !== '.') && ($file !== '..') && (!\in_array($file, $exclude)) && ($excludefilter === '' || $excludefilter === '0' || in_array(preg_match($excludefilter, $file), [0, false], true))) {
+ if (($file !== '.') && ($file !== '..') && (!\in_array($file, $exclude)) && ($excludefilter === '' || $excludefilter === '0' || \in_array(preg_match($excludefilter, $file), [0, false], true))) {
$dir = $path . '/' . $file;
$isDir = is_dir($dir);
@@ -603,7 +603,7 @@ protected function _filesInFolder(
$arr = array_merge($arr, $arr2);
}
- } elseif (preg_match(sprintf('/%s/', $filter), $file)) {
+ } elseif (preg_match(\sprintf('/%s/', $filter), $file)) {
$arr[] = $fullpath ? $path . '/' . $file : $file;
}
}
@@ -659,14 +659,14 @@ protected function _folders(
if (
($file !== '.') && ($file !== '..')
&& (!\in_array($file, $exclude))
- && ($excludefilter_string === '' || $excludefilter_string === '0' || in_array(preg_match($excludefilter_string, $file), [0, false], true))
+ && ($excludefilter_string === '' || $excludefilter_string === '0' || \in_array(preg_match($excludefilter_string, $file), [0, false], true))
) {
$dir = $path . '/' . $file;
$isDir = is_dir($dir);
if ($isDir) {
// Removes filtered directories
- if (preg_match(sprintf('/%s/', $filter), $file)) {
+ if (preg_match(\sprintf('/%s/', $filter), $file)) {
$arr[] = $fullpath ? $dir : $file;
}
diff --git a/libraries/src/Cache/Storage/MemcachedStorage.php b/libraries/src/Cache/Storage/MemcachedStorage.php
index d983dc480975..eb9c06fc3554 100644
--- a/libraries/src/Cache/Storage/MemcachedStorage.php
+++ b/libraries/src/Cache/Storage/MemcachedStorage.php
@@ -101,7 +101,7 @@ protected function getConnection()
static::$_db->setOption(\Memcached::OPT_COMPRESSION, $this->_compress);
$stats = static::$_db->getStats();
- $result = !empty($stats[sprintf('%s:%s', $host, $port)]) && $stats[sprintf('%s:%s', $host, $port)]['pid'] > 0;
+ $result = !empty($stats[\sprintf('%s:%s', $host, $port)]) && $stats[\sprintf('%s:%s', $host, $port)]['pid'] > 0;
if (!$result) {
// Null out the connection to inform the constructor it will need to attempt to connect if this class is instantiated again
diff --git a/libraries/src/Captcha/Captcha.php b/libraries/src/Captcha/Captcha.php
index bb060b2c5402..67687d2cb652 100644
--- a/libraries/src/Captcha/Captcha.php
+++ b/libraries/src/Captcha/Captcha.php
@@ -72,8 +72,9 @@ public function __construct(/**
*
* @since 2.5
*/
- private $name, $options)
- {
+ private $name,
+ $options
+ ) {
/** @var CaptchaRegistry $registry */
$registry = $options['registry'] ?? Factory::getContainer()->get(CaptchaRegistry::class);
diff --git a/libraries/src/Categories/CategoryFactory.php b/libraries/src/Categories/CategoryFactory.php
index b6d6cc4fb920..04b8a6025331 100644
--- a/libraries/src/Categories/CategoryFactory.php
+++ b/libraries/src/Categories/CategoryFactory.php
@@ -40,8 +40,7 @@ public function __construct(
* @since 4.0.0
*/
private $namespace
- )
- {
+ ) {
}
/**
diff --git a/libraries/src/Categories/CategoryNode.php b/libraries/src/Categories/CategoryNode.php
index c31d28d75830..91c836e2cb69 100644
--- a/libraries/src/Categories/CategoryNode.php
+++ b/libraries/src/Categories/CategoryNode.php
@@ -9,12 +9,12 @@
namespace Joomla\CMS\Categories;
-use Joomla\CMS\User\User;
use Joomla\CMS\Factory;
use Joomla\CMS\Object\LegacyErrorHandlingTrait;
use Joomla\CMS\Object\LegacyPropertyManagementTrait;
use Joomla\CMS\Tree\NodeInterface;
use Joomla\CMS\Tree\NodeTrait;
+use Joomla\CMS\User\User;
use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
diff --git a/libraries/src/Client/FtpClient.php b/libraries/src/Client/FtpClient.php
index d6196076461a..85590abcee6c 100644
--- a/libraries/src/Client/FtpClient.php
+++ b/libraries/src/Client/FtpClient.php
@@ -1519,7 +1519,7 @@ public function listDetails($path = null, $type = 'all')
if (@preg_match($regexp, $file, $regs)) {
$fType = (int) ($regs[7] === '');
- $timestamp = strtotime(sprintf('%s-%s-%s %s:%s%s', $regs[3], $regs[1], $regs[2], $regs[4], $regs[5], $regs[6]));
+ $timestamp = strtotime(\sprintf('%s-%s-%s %s:%s%s', $regs[3], $regs[1], $regs[2], $regs[4], $regs[5], $regs[6]));
// $tmp_array['line'] = $regs[0];
$tmp_array['type'] = $fType;
@@ -1573,7 +1573,7 @@ protected function _putCmd($cmd, $expectedResponse)
}
// Send the command to the server
- if (in_array(fwrite($this->_conn, $cmd . "\r\n"), [0, false], true)) {
+ if (\in_array(fwrite($this->_conn, $cmd . "\r\n"), [0, false], true)) {
Log::add(Text::sprintf('DDD', Text::sprintf('JLIB_CLIENT_ERROR_FTP_PUTCMD_SEND', __METHOD__, $cmd)), Log::WARNING, 'jerror');
}
@@ -1599,7 +1599,7 @@ protected function _verifyResponse($expected)
do {
$this->_response .= fgets($this->_conn, 4096);
- } while (in_array(preg_match('/^([0-9]{3})(-(.*' . CRLF . ')+\1)? [^' . CRLF . ']+' . CRLF . "$/", $this->_response, $parts), [0, false], true) && time() < $endTime);
+ } while (\in_array(preg_match('/^([0-9]{3})(-(.*' . CRLF . ')+\1)? [^' . CRLF . ']+' . CRLF . "$/", $this->_response, $parts), [0, false], true) && time() < $endTime);
// Catch a timeout or bad response
if (!isset($parts[1])) {
@@ -1654,7 +1654,7 @@ protected function _passive()
do {
$this->_response .= fgets($this->_conn, 4096);
- } while (in_array(preg_match('/^([0-9]{3})(-(.*' . CRLF . ')+\1)? [^' . CRLF . ']+' . CRLF . "$/", $this->_response, $parts), [0, false], true) && time() < $endTime);
+ } while (\in_array(preg_match('/^([0-9]{3})(-(.*' . CRLF . ')+\1)? [^' . CRLF . ']+' . CRLF . "$/", $this->_response, $parts), [0, false], true) && time() < $endTime);
// Catch a timeout or bad response
if (!isset($parts[1])) {
diff --git a/libraries/src/Component/Router/RouterBase.php b/libraries/src/Component/Router/RouterBase.php
index ef09661f7d40..5fd98d964fa5 100644
--- a/libraries/src/Component/Router/RouterBase.php
+++ b/libraries/src/Component/Router/RouterBase.php
@@ -10,8 +10,8 @@
namespace Joomla\CMS\Component\Router;
use Joomla\CMS\Application\CMSApplication;
-use Joomla\CMS\Menu\AbstractMenu;
use Joomla\CMS\Factory;
+use Joomla\CMS\Menu\AbstractMenu;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/libraries/src/Component/Router/RouterFactory.php b/libraries/src/Component/Router/RouterFactory.php
index 7ff3c9c8e2e9..7bec64ab594f 100644
--- a/libraries/src/Component/Router/RouterFactory.php
+++ b/libraries/src/Component/Router/RouterFactory.php
@@ -56,8 +56,7 @@ public function __construct(
* @since 4.0.0
*/
private readonly ?DatabaseInterface $db = null
- )
- {
+ ) {
}
/**
diff --git a/libraries/src/Component/Router/RouterLegacy.php b/libraries/src/Component/Router/RouterLegacy.php
index 6e88810de39b..2e8acb308499 100644
--- a/libraries/src/Component/Router/RouterLegacy.php
+++ b/libraries/src/Component/Router/RouterLegacy.php
@@ -37,8 +37,7 @@ public function __construct(
* @since 3.3
*/
protected $component
- )
- {
+ ) {
}
/**
diff --git a/libraries/src/Component/Router/RouterView.php b/libraries/src/Component/Router/RouterView.php
index 75d94f4bb31a..1524a0aad5a9 100644
--- a/libraries/src/Component/Router/RouterView.php
+++ b/libraries/src/Component/Router/RouterView.php
@@ -265,7 +265,7 @@ public function getName()
if (empty($this->name)) {
$r = null;
- if (in_array(preg_match('/(.*)Router/i', static::class, $r), [0, false], true)) {
+ if (\in_array(preg_match('/(.*)Router/i', static::class, $r), [0, false], true)) {
throw new \Exception('JLIB_APPLICATION_ERROR_ROUTER_GET_NAME', 500);
}
diff --git a/libraries/src/Component/Router/RouterViewConfiguration.php b/libraries/src/Component/Router/RouterViewConfiguration.php
index 0dada9580e30..c14d565f0536 100644
--- a/libraries/src/Component/Router/RouterViewConfiguration.php
+++ b/libraries/src/Component/Router/RouterViewConfiguration.php
@@ -96,8 +96,8 @@ public function __construct(/**
*
* @since 3.5
*/
- public $name)
- {
+ public $name
+ ) {
$this->path[] = $this->name;
}
diff --git a/libraries/src/Component/Router/Rules/PreprocessRules.php b/libraries/src/Component/Router/Rules/PreprocessRules.php
index d7f211fbe876..bb32b97185df 100644
--- a/libraries/src/Component/Router/Rules/PreprocessRules.php
+++ b/libraries/src/Component/Router/Rules/PreprocessRules.php
@@ -56,17 +56,17 @@ public function __construct(RouterViewConfiguration $view, /**
*
* @since 5.3.0
*/
- protected $table, /**
+ protected $table, /**
* ID column in the table to read the information from
*
* @since 5.3.0
*/
- protected $key, /**
+ protected $key, /**
* Parent ID column in the table to read the information from
*
* @since 5.3.0
*/
- protected $parent_key = null)
+ protected $parent_key = null)
{
$this->view = $view;
}
@@ -116,7 +116,7 @@ public function preprocess(&$query)
}
// Lets fix the slug (id:alias)
- if (in_array(strpos((string) $query[$key], ':'), [0, false], true)) {
+ if (\in_array(strpos((string) $query[$key], ':'), [0, false], true)) {
$query[$key] .= ':' . $obj->alias;
}
diff --git a/libraries/src/Console/AddUserCommand.php b/libraries/src/Console/AddUserCommand.php
index 94acb9cda104..ccda21804651 100644
--- a/libraries/src/Console/AddUserCommand.php
+++ b/libraries/src/Console/AddUserCommand.php
@@ -159,9 +159,9 @@ protected function doExecute(InputInterface $input, OutputInterface $output): in
if (!$userObj->save()) {
match ($userObj->getError()) {
"JLIB_DATABASE_ERROR_USERNAME_INUSE" => $this->ioStyle->error("The username already exists!"),
- "JLIB_DATABASE_ERROR_EMAIL_INUSE" => $this->ioStyle->error("The email address already exists!"),
- "JLIB_DATABASE_ERROR_VALID_MAIL" => $this->ioStyle->error("The email address is invalid!"),
- default => 1,
+ "JLIB_DATABASE_ERROR_EMAIL_INUSE" => $this->ioStyle->error("The email address already exists!"),
+ "JLIB_DATABASE_ERROR_VALID_MAIL" => $this->ioStyle->error("The email address is invalid!"),
+ default => 1,
};
return 1;
diff --git a/libraries/src/Console/ExtensionRemoveCommand.php b/libraries/src/Console/ExtensionRemoveCommand.php
index 3b880ac5a56a..c7f742c30af4 100644
--- a/libraries/src/Console/ExtensionRemoveCommand.php
+++ b/libraries/src/Console/ExtensionRemoveCommand.php
@@ -183,7 +183,7 @@ protected function doExecute(InputInterface $input, OutputInterface $output): in
$row = new Extension($this->getDatabase());
if ((int) $extensionId === 0 || !$row->load($extensionId)) {
- $this->ioStyle->error(sprintf('Extension with ID of %s not found.', $extensionId));
+ $this->ioStyle->error(\sprintf('Extension with ID of %s not found.', $extensionId));
return self::REMOVE_NOT_FOUND;
}
diff --git a/libraries/src/Console/ExtensionsListCommand.php b/libraries/src/Console/ExtensionsListCommand.php
index 70c0f9e51886..0fcd9e77b3b1 100644
--- a/libraries/src/Console/ExtensionsListCommand.php
+++ b/libraries/src/Console/ExtensionsListCommand.php
@@ -229,7 +229,7 @@ protected function doExecute(InputInterface $input, OutputInterface $output): in
}
if (empty($extensions)) {
- $this->ioStyle->error(sprintf("Cannot find extensions of the type '%s' specified.", $type));
+ $this->ioStyle->error(\sprintf("Cannot find extensions of the type '%s' specified.", $type));
return Command::SUCCESS;
}
diff --git a/libraries/src/Console/FinderIndexCommand.php b/libraries/src/Console/FinderIndexCommand.php
index c098482df325..462d05bf7b25 100644
--- a/libraries/src/Console/FinderIndexCommand.php
+++ b/libraries/src/Console/FinderIndexCommand.php
@@ -128,8 +128,8 @@ public function __construct(/**
*
* @since 4.0.0
*/
- private DatabaseInterface $db)
- {
+ private DatabaseInterface $db
+ ) {
parent::__construct();
}
diff --git a/libraries/src/Console/GetConfigurationCommand.php b/libraries/src/Console/GetConfigurationCommand.php
index 205fa52d301a..82b194e7ddb3 100644
--- a/libraries/src/Console/GetConfigurationCommand.php
+++ b/libraries/src/Console/GetConfigurationCommand.php
@@ -182,7 +182,7 @@ public function processGroupOptions($group): int
}
if (!$foundGroup) {
- $this->ioStyle->error(sprintf('Group *%s* not found', $group));
+ $this->ioStyle->error(\sprintf('Group *%s* not found', $group));
return self::CONFIG_GET_GROUP_NOT_FOUND;
}
@@ -245,7 +245,7 @@ public function processSingleOption($option): int
$configs = $this->getApplication()->getConfig()->toArray();
if (!\array_key_exists($option, $configs)) {
- $this->ioStyle->error(sprintf("Can't find option *%s* in configuration list", $option));
+ $this->ioStyle->error(\sprintf("Can't find option *%s* in configuration list", $option));
return self::CONFIG_GET_OPTION_NOT_FOUND;
}
diff --git a/libraries/src/Console/ListUserCommand.php b/libraries/src/Console/ListUserCommand.php
index 018701e6a9de..9d9147116856 100644
--- a/libraries/src/Console/ListUserCommand.php
+++ b/libraries/src/Console/ListUserCommand.php
@@ -94,7 +94,7 @@ protected function doExecute(InputInterface $input, OutputInterface $output): in
foreach ($db->loadAssocList() as $user) {
$user["groups"] = array_map(
- fn($groupId) => $groups[$groupId],
+ fn ($groupId) => $groups[$groupId],
explode(",", (string) $user["groups"])
);
diff --git a/libraries/src/Console/Loader/WritableContainerLoader.php b/libraries/src/Console/Loader/WritableContainerLoader.php
index 33f9c4d4d324..d4e45336acd6 100644
--- a/libraries/src/Console/Loader/WritableContainerLoader.php
+++ b/libraries/src/Console/Loader/WritableContainerLoader.php
@@ -45,8 +45,7 @@ public function __construct(
* @since 4.0.0
*/
private array $commandMap
- )
- {
+ ) {
}
/**
diff --git a/libraries/src/Console/SessionMetadataGcCommand.php b/libraries/src/Console/SessionMetadataGcCommand.php
index 5e31edd7bc78..595768d45d31 100644
--- a/libraries/src/Console/SessionMetadataGcCommand.php
+++ b/libraries/src/Console/SessionMetadataGcCommand.php
@@ -49,13 +49,13 @@ public function __construct(/**
*
* @since 4.0.0
*/
- private readonly SessionInterface $session, /**
+ private readonly SessionInterface $session, /**
* The session metadata manager.
*
* @since 4.0.0
*/
- private readonly MetadataManager $metadataManager)
- {
+ private readonly MetadataManager $metadataManager
+ ) {
parent::__construct();
}
diff --git a/libraries/src/Console/SetConfigurationCommand.php b/libraries/src/Console/SetConfigurationCommand.php
index 8eec388550a4..fbb4e12f5fb2 100644
--- a/libraries/src/Console/SetConfigurationCommand.php
+++ b/libraries/src/Console/SetConfigurationCommand.php
@@ -9,11 +9,11 @@
namespace Joomla\CMS\Console;
-use Joomla\Database\DatabaseInterface;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\Console\Command\AbstractCommand;
use Joomla\Database\DatabaseDriver;
+use Joomla\Database\DatabaseInterface;
use Joomla\Registry\Registry;
use Symfony\Component\Console\Input\Input;
use Symfony\Component\Console\Input\InputArgument;
@@ -164,7 +164,7 @@ private function validateOptions(): bool
$this->options,
function ($value, $key) use ($configs, &$valid) {
if (!\array_key_exists($key, $configs)) {
- $this->ioStyle->error(sprintf("Can't find option *%s* in configuration list", $key));
+ $this->ioStyle->error(\sprintf("Can't find option *%s* in configuration list", $key));
$valid = false;
}
}
@@ -286,7 +286,7 @@ public function checkDb($options): bool
}
// Validate database table prefix.
- if (isset($options['dbprefix']) && in_array(preg_match('#^[a-zA-Z]+\w*$#', (string) $options['dbprefix']), [0, false], true)) {
+ if (isset($options['dbprefix']) && \in_array(preg_match('#^[a-zA-Z]+\w*$#', (string) $options['dbprefix']), [0, false], true)) {
$this->ioStyle->error(Text::_('INSTL_DATABASE_PREFIX_MSG'));
return false;
@@ -307,7 +307,7 @@ public function checkDb($options): bool
}
// Validate database name.
- if (\in_array($options['dbtype'], ['pgsql', 'postgresql'], true) && in_array(preg_match('#^[a-zA-Z_][0-9a-zA-Z_$]*$#', (string) $options['db']), [0, false], true)) {
+ if (\in_array($options['dbtype'], ['pgsql', 'postgresql'], true) && \in_array(preg_match('#^[a-zA-Z_][0-9a-zA-Z_$]*$#', (string) $options['db']), [0, false], true)) {
$this->ioStyle->error(Text::_('INSTL_DATABASE_NAME_MSG_POSTGRES'));
return false;
diff --git a/libraries/src/Console/TasksRunCommand.php b/libraries/src/Console/TasksRunCommand.php
index 05cf82051ad5..cbc2c3a213d8 100644
--- a/libraries/src/Console/TasksRunCommand.php
+++ b/libraries/src/Console/TasksRunCommand.php
@@ -9,9 +9,9 @@
namespace Joomla\CMS\Console;
-use Joomla\Component\Scheduler\Administrator\Task\Task;
use Joomla\Component\Scheduler\Administrator\Scheduler\Scheduler;
use Joomla\Component\Scheduler\Administrator\Task\Status;
+use Joomla\Component\Scheduler\Administrator\Task\Task;
use Joomla\Console\Command\AbstractCommand;
use Symfony\Component\Console\Exception\InvalidArgumentException;
use Symfony\Component\Console\Input\InputInterface;
@@ -113,7 +113,7 @@ protected function doExecute(InputInterface $input, OutputInterface $output): in
$netTime = round(microtime(true) - $status['startTime'], 2);
$this->ioStyle->newLine();
- $this->ioStyle->writeln(sprintf('Finished running %d tasks in %s seconds.', $taskCount, $netTime));
+ $this->ioStyle->writeln(\sprintf('Finished running %d tasks in %s seconds.', $taskCount, $netTime));
return $taskCount === 1 ? $exit : Status::OK;
}
diff --git a/libraries/src/Console/TasksStateCommand.php b/libraries/src/Console/TasksStateCommand.php
index e37c24021217..aed6c7f71962 100644
--- a/libraries/src/Console/TasksStateCommand.php
+++ b/libraries/src/Console/TasksStateCommand.php
@@ -130,14 +130,14 @@ protected function doExecute(InputInterface $input, OutputInterface $output): in
// We couldn't fetch that task :(
if (empty($task->id)) {
- $this->ioStyle->error(sprintf("Task ID '%d' does not exist!", $id));
+ $this->ioStyle->error(\sprintf("Task ID '%d' does not exist!", $id));
return 1;
}
// If the item is checked-out we need a check in (currently not possible through the CLI)
if ($taskModel->isCheckedOut($task)) {
- $this->ioStyle->error(sprintf("Task ID '%d' is checked out!", $id));
+ $this->ioStyle->error(\sprintf("Task ID '%d' is checked out!", $id));
return 1;
}
@@ -148,12 +148,12 @@ protected function doExecute(InputInterface $input, OutputInterface $output): in
$action = Task::STATE_MAP[$state];
if (!$table->publish($id, $state)) {
- $this->ioStyle->error(sprintf("Can't %s Task ID '%d'", $action, $id));
+ $this->ioStyle->error(\sprintf("Can't %s Task ID '%d'", $action, $id));
return 3;
}
- $this->ioStyle->success(sprintf('Task ID %d %s.', $id, $action));
+ $this->ioStyle->success(\sprintf('Task ID %d %s.', $id, $action));
return 0;
}
diff --git a/libraries/src/Console/UpdateCoreCommand.php b/libraries/src/Console/UpdateCoreCommand.php
index 3b68be70eeab..e453b968dcfd 100644
--- a/libraries/src/Console/UpdateCoreCommand.php
+++ b/libraries/src/Console/UpdateCoreCommand.php
@@ -113,7 +113,7 @@ public function __construct()
private function configureIO(InputInterface $input, OutputInterface $output)
{
$this->progressBar = new ProgressBar($output, 9);
- $this->ioStyle = new SymfonyStyle($input, $output);
+ $this->ioStyle = new SymfonyStyle($input, $output);
$language = Factory::getLanguage();
$language->load('lib_joomla', JPATH_ADMINISTRATOR);
diff --git a/libraries/src/Date/Date.php b/libraries/src/Date/Date.php
index c8e37f02740d..37fd8173f1d4 100644
--- a/libraries/src/Date/Date.php
+++ b/libraries/src/Date/Date.php
@@ -242,13 +242,13 @@ public static function getInstance($date = 'now', $tz = null)
public function dayToString($day, $abbr = false)
{
return match ($day) {
- 0 => $abbr ? Text::_('SUN') : Text::_('SUNDAY'),
- 1 => $abbr ? Text::_('MON') : Text::_('MONDAY'),
- 2 => $abbr ? Text::_('TUE') : Text::_('TUESDAY'),
- 3 => $abbr ? Text::_('WED') : Text::_('WEDNESDAY'),
- 4 => $abbr ? Text::_('THU') : Text::_('THURSDAY'),
- 5 => $abbr ? Text::_('FRI') : Text::_('FRIDAY'),
- 6 => $abbr ? Text::_('SAT') : Text::_('SATURDAY'),
+ 0 => $abbr ? Text::_('SUN') : Text::_('SUNDAY'),
+ 1 => $abbr ? Text::_('MON') : Text::_('MONDAY'),
+ 2 => $abbr ? Text::_('TUE') : Text::_('TUESDAY'),
+ 3 => $abbr ? Text::_('WED') : Text::_('WEDNESDAY'),
+ 4 => $abbr ? Text::_('THU') : Text::_('THURSDAY'),
+ 5 => $abbr ? Text::_('FRI') : Text::_('FRIDAY'),
+ 6 => $abbr ? Text::_('SAT') : Text::_('SATURDAY'),
default => '',
};
}
@@ -351,18 +351,18 @@ public function getOffsetFromGmt($hours = false)
public function monthToString($month, $abbr = false)
{
return match ($month) {
- 1 => $abbr ? Text::_('JANUARY_SHORT') : Text::_('JANUARY'),
- 2 => $abbr ? Text::_('FEBRUARY_SHORT') : Text::_('FEBRUARY'),
- 3 => $abbr ? Text::_('MARCH_SHORT') : Text::_('MARCH'),
- 4 => $abbr ? Text::_('APRIL_SHORT') : Text::_('APRIL'),
- 5 => $abbr ? Text::_('MAY_SHORT') : Text::_('MAY'),
- 6 => $abbr ? Text::_('JUNE_SHORT') : Text::_('JUNE'),
- 7 => $abbr ? Text::_('JULY_SHORT') : Text::_('JULY'),
- 8 => $abbr ? Text::_('AUGUST_SHORT') : Text::_('AUGUST'),
- 9 => $abbr ? Text::_('SEPTEMBER_SHORT') : Text::_('SEPTEMBER'),
- 10 => $abbr ? Text::_('OCTOBER_SHORT') : Text::_('OCTOBER'),
- 11 => $abbr ? Text::_('NOVEMBER_SHORT') : Text::_('NOVEMBER'),
- 12 => $abbr ? Text::_('DECEMBER_SHORT') : Text::_('DECEMBER'),
+ 1 => $abbr ? Text::_('JANUARY_SHORT') : Text::_('JANUARY'),
+ 2 => $abbr ? Text::_('FEBRUARY_SHORT') : Text::_('FEBRUARY'),
+ 3 => $abbr ? Text::_('MARCH_SHORT') : Text::_('MARCH'),
+ 4 => $abbr ? Text::_('APRIL_SHORT') : Text::_('APRIL'),
+ 5 => $abbr ? Text::_('MAY_SHORT') : Text::_('MAY'),
+ 6 => $abbr ? Text::_('JUNE_SHORT') : Text::_('JUNE'),
+ 7 => $abbr ? Text::_('JULY_SHORT') : Text::_('JULY'),
+ 8 => $abbr ? Text::_('AUGUST_SHORT') : Text::_('AUGUST'),
+ 9 => $abbr ? Text::_('SEPTEMBER_SHORT') : Text::_('SEPTEMBER'),
+ 10 => $abbr ? Text::_('OCTOBER_SHORT') : Text::_('OCTOBER'),
+ 11 => $abbr ? Text::_('NOVEMBER_SHORT') : Text::_('NOVEMBER'),
+ 12 => $abbr ? Text::_('DECEMBER_SHORT') : Text::_('DECEMBER'),
default => '',
};
}
diff --git a/libraries/src/Dispatcher/ComponentDispatcherFactory.php b/libraries/src/Dispatcher/ComponentDispatcherFactory.php
index 60249f0ae18c..ab9558510d27 100644
--- a/libraries/src/Dispatcher/ComponentDispatcherFactory.php
+++ b/libraries/src/Dispatcher/ComponentDispatcherFactory.php
@@ -47,7 +47,7 @@ public function __construct(string $namespace, /**
*
* @since 4.0.0
*/
- private readonly MVCFactoryInterface $mvcFactory)
+ private readonly MVCFactoryInterface $mvcFactory)
{
$this->namespace = $namespace;
}
diff --git a/libraries/src/Dispatcher/LegacyComponentDispatcher.php b/libraries/src/Dispatcher/LegacyComponentDispatcher.php
index f27162255cc4..2e46053055de 100644
--- a/libraries/src/Dispatcher/LegacyComponentDispatcher.php
+++ b/libraries/src/Dispatcher/LegacyComponentDispatcher.php
@@ -39,8 +39,7 @@ public function __construct(
* @since 4.0.0
*/
private readonly CMSApplication $app
- )
- {
+ ) {
}
/**
diff --git a/libraries/src/Dispatcher/ModuleDispatcherFactory.php b/libraries/src/Dispatcher/ModuleDispatcherFactory.php
index 741b78ca694b..28ed745fe947 100644
--- a/libraries/src/Dispatcher/ModuleDispatcherFactory.php
+++ b/libraries/src/Dispatcher/ModuleDispatcherFactory.php
@@ -38,8 +38,7 @@ public function __construct(
* @since 4.0.0
*/
private readonly string $namespace
- )
- {
+ ) {
}
/**
diff --git a/libraries/src/Document/Document.php b/libraries/src/Document/Document.php
index ba78e849611c..b9273cb1d60c 100644
--- a/libraries/src/Document/Document.php
+++ b/libraries/src/Document/Document.php
@@ -1057,9 +1057,9 @@ public function getMimeEncoding()
public function setLineEnd($style)
{
$this->_lineEnd = match ($style) {
- 'win' => "\15\12",
- 'unix' => "\12",
- 'mac' => "\15",
+ 'win' => "\15\12",
+ 'unix' => "\12",
+ 'mac' => "\15",
default => $style,
};
diff --git a/libraries/src/Document/DocumentRenderer.php b/libraries/src/Document/DocumentRenderer.php
index 515d723cd85f..94c0229464f8 100644
--- a/libraries/src/Document/DocumentRenderer.php
+++ b/libraries/src/Document/DocumentRenderer.php
@@ -75,6 +75,6 @@ protected function _relToAbs($text)
{
$base = Uri::base();
- return preg_replace("/(href|src)=\"(?!http|ftp|https|mailto|data|\/\/)([^\"]*)\"/", sprintf('$1="%s$2"', $base), $text);
+ return preg_replace("/(href|src)=\"(?!http|ftp|https|mailto|data|\/\/)([^\"]*)\"/", \sprintf('$1="%s$2"', $base), $text);
}
}
diff --git a/libraries/src/Document/FeedDocument.php b/libraries/src/Document/FeedDocument.php
index 315c4eaea508..f6754e8ab8e8 100644
--- a/libraries/src/Document/FeedDocument.php
+++ b/libraries/src/Document/FeedDocument.php
@@ -222,7 +222,7 @@ public function render($cache = false, $params = [])
// Generate stylesheet links
foreach ($this->_styleSheets as $src => $attr) {
- $data .= sprintf('\n";
+ $data .= \sprintf('\n";
}
// Render the feed
diff --git a/libraries/src/Document/HtmlDocument.php b/libraries/src/Document/HtmlDocument.php
index 11cb0cda7720..5648cdaf1ff1 100644
--- a/libraries/src/Document/HtmlDocument.php
+++ b/libraries/src/Document/HtmlDocument.php
@@ -9,10 +9,10 @@
namespace Joomla\CMS\Document;
-use Joomla\CMS\Cache\Controller\OutputController;
use Joomla\CMS\Cache\Cache;
use Joomla\CMS\Cache\CacheControllerFactoryAwareInterface;
use Joomla\CMS\Cache\CacheControllerFactoryAwareTrait;
+use Joomla\CMS\Cache\Controller\OutputController;
use Joomla\CMS\Factory as CmsFactory;
use Joomla\CMS\Filter\InputFilter;
use Joomla\CMS\Helper\ModuleHelper;
@@ -338,10 +338,10 @@ public function mergeHeadData($data)
return $this;
}
- $this->title = (isset($data['title']) && !empty($data['title']) && (in_array(stristr($this->title, (string) $data['title']), ['', '0'], true) || stristr($this->title, (string) $data['title']) === false))
+ $this->title = (isset($data['title']) && !empty($data['title']) && (\in_array(stristr($this->title, (string) $data['title']), ['', '0'], true) || stristr($this->title, (string) $data['title']) === false))
? $this->title . $data['title']
: $this->title;
- $this->description = (isset($data['description']) && !empty($data['description']) && (in_array(stristr($this->description, (string) $data['description']), ['', '0'], true) || stristr($this->description, (string) $data['description']) === false))
+ $this->description = (isset($data['description']) && !empty($data['description']) && (\in_array(stristr($this->description, (string) $data['description']), ['', '0'], true) || stristr($this->description, (string) $data['description']) === false))
? $this->description . $data['description']
: $this->description;
$this->link = $data['link'] ?? $this->link;
diff --git a/libraries/src/Document/ImageDocument.php b/libraries/src/Document/ImageDocument.php
index 15fe428df178..9a7eae0731a5 100644
--- a/libraries/src/Document/ImageDocument.php
+++ b/libraries/src/Document/ImageDocument.php
@@ -57,7 +57,7 @@ public function render($cache = false, $params = [])
$this->_mime = match ($type) {
'jpg', 'jpeg' => 'image/jpeg',
- 'gif' => 'image/gif',
+ 'gif' => 'image/gif',
default => 'image/png',
};
diff --git a/libraries/src/Document/Renderer/Feed/AtomRenderer.php b/libraries/src/Document/Renderer/Feed/AtomRenderer.php
index 3828e4a7ac3c..c550baa72e5d 100644
--- a/libraries/src/Document/Renderer/Feed/AtomRenderer.php
+++ b/libraries/src/Document/Renderer/Feed/AtomRenderer.php
@@ -9,8 +9,8 @@
namespace Joomla\CMS\Document\Renderer\Feed;
-use Joomla\CMS\Document\FeedDocument;
use Joomla\CMS\Document\DocumentRenderer;
+use Joomla\CMS\Document\FeedDocument;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
diff --git a/libraries/src/Document/Renderer/Feed/RssRenderer.php b/libraries/src/Document/Renderer/Feed/RssRenderer.php
index e74185b6b589..0a19c83e25ae 100644
--- a/libraries/src/Document/Renderer/Feed/RssRenderer.php
+++ b/libraries/src/Document/Renderer/Feed/RssRenderer.php
@@ -9,9 +9,9 @@
namespace Joomla\CMS\Document\Renderer\Feed;
-use Joomla\CMS\Document\FeedDocument;
use Joomla\CMS\Date\Date;
use Joomla\CMS\Document\DocumentRenderer;
+use Joomla\CMS\Document\FeedDocument;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
diff --git a/libraries/src/Document/Renderer/Html/ModulesRenderer.php b/libraries/src/Document/Renderer/Html/ModulesRenderer.php
index fd4e74d6c368..461acfb05a3d 100644
--- a/libraries/src/Document/Renderer/Html/ModulesRenderer.php
+++ b/libraries/src/Document/Renderer/Html/ModulesRenderer.php
@@ -9,8 +9,8 @@
namespace Joomla\CMS\Document\Renderer\Html;
-use Joomla\CMS\Event\Module\AfterRenderModulesEvent;
use Joomla\CMS\Document\DocumentRenderer;
+use Joomla\CMS\Event\Module\AfterRenderModulesEvent;
use Joomla\CMS\Factory;
use Joomla\CMS\Helper\ModuleHelper;
use Joomla\CMS\Layout\LayoutHelper;
diff --git a/libraries/src/Encrypt/Aes.php b/libraries/src/Encrypt/Aes.php
index 3bad04c4e374..17a927481af6 100644
--- a/libraries/src/Encrypt/Aes.php
+++ b/libraries/src/Encrypt/Aes.php
@@ -257,7 +257,7 @@ function hash_pbkdf2($algo, $password, $salt, $count, $length = 0, $rawOutput =
$block_count = $length !== 0 ? ceil($length / \strlen(hash($algo, '', $rawOutput))) : 1;
for ($i = 1; $i <= $block_count; $i++) {
- $last = hash_hmac($algo, $salt . pack('N', $i), $password, true);
+ $last = hash_hmac($algo, $salt . pack('N', $i), $password, true);
$xorsum = $last;
for ($j = 1; $j < $count; $j++) {
$xorsum ^= ($last = hash_hmac($algo, $last, $password, true));
diff --git a/libraries/src/Encrypt/Base32.php b/libraries/src/Encrypt/Base32.php
index 7fbea69525dd..33d7dc3e4f40 100644
--- a/libraries/src/Encrypt/Base32.php
+++ b/libraries/src/Encrypt/Base32.php
@@ -61,7 +61,7 @@ private function bin2str($str)
throw new \Exception('Length must be divisible by 8');
}
- if (in_array(preg_match('/^[01]+$/', $str), [0, false], true)) {
+ if (\in_array(preg_match('/^[01]+$/', $str), [0, false], true)) {
throw new \Exception("Only 0's and 1's are permitted");
}
@@ -91,7 +91,7 @@ private function fromBin($str)
throw new \Exception('Length must be divisible by 8');
}
- if (in_array(preg_match('/^[01]+$/', $str), [0, false], true)) {
+ if (\in_array(preg_match('/^[01]+$/', $str), [0, false], true)) {
throw new \Exception("Only 0's and 1's are permitted");
}
@@ -128,7 +128,7 @@ private function fromBin($str)
*/
private function toBin($str)
{
- if (in_array(preg_match('/^[' . self::CSRFC3548 . ']+$/', $str), [0, false], true)) {
+ if (\in_array(preg_match('/^[' . self::CSRFC3548 . ']+$/', $str), [0, false], true)) {
throw new \Exception('Must match character set');
}
diff --git a/libraries/src/Encrypt/Totp.php b/libraries/src/Encrypt/Totp.php
index b12239c85d33..ed950f5b82e4 100644
--- a/libraries/src/Encrypt/Totp.php
+++ b/libraries/src/Encrypt/Totp.php
@@ -50,16 +50,17 @@ class Totp
public function __construct(/**
* Timestep
*/
- private $_timeStep = 30, /**
+ private $_timeStep = 30, /**
* Passcode length
*/
- private $_passCodeLength = 6, /**
+ private $_passCodeLength = 6, /**
* The length of the secret in bytes.
* RFC 4226: "The length of the shared secret MUST be at least 128 bits. This document RECOMMENDs a shared secret length of 160 bits."
* The original value was 10 bytes (80 bits) this value has been increased to 20 (160 bits) with Joomla! 3.9.25
*/
- private $_secretLength = 10, $base32 = null)
- {
+ private $_secretLength = 10,
+ $base32 = null
+ ) {
$this->_pinModulo = 10 ** $this->_passCodeLength;
$this->_base32 = \is_null($base32) ? new Base32() : $base32;
diff --git a/libraries/src/Environment/Browser.php b/libraries/src/Environment/Browser.php
index a37a692bc8f6..c23fd654d182 100644
--- a/libraries/src/Environment/Browser.php
+++ b/libraries/src/Environment/Browser.php
@@ -849,7 +849,7 @@ public function getHTTPProtocol()
public function isViewable($mimetype)
{
$mimetype = strtolower($mimetype);
- [$type, $subtype] = explode('/', $mimetype);
+ [$type, $subtype] = explode('/', $mimetype);
if (!empty($this->accept)) {
$wildcard_match = false;
diff --git a/libraries/src/Event/AbstractEvent.php b/libraries/src/Event/AbstractEvent.php
index f2ccebdd8428..115563d50bc8 100644
--- a/libraries/src/Event/AbstractEvent.php
+++ b/libraries/src/Event/AbstractEvent.php
@@ -58,7 +58,7 @@ public static function create(string $eventName, array $arguments = [])
{
// Make sure a non-empty subject argument exists and that it is an object
if (empty($arguments['subject']) || !\is_object($arguments['subject'])) {
- throw new \BadMethodCallException(sprintf('No subject given for the %s event', $eventName));
+ throw new \BadMethodCallException(\sprintf('No subject given for the %s event', $eventName));
}
// Get the class name from the arguments, if specified
diff --git a/libraries/src/Event/Application/ApplicationConfigurationEvent.php b/libraries/src/Event/Application/ApplicationConfigurationEvent.php
index c12c8806b2ff..f3e5339405e3 100644
--- a/libraries/src/Event/Application/ApplicationConfigurationEvent.php
+++ b/libraries/src/Event/Application/ApplicationConfigurationEvent.php
@@ -38,7 +38,7 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('subject', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
}
}
diff --git a/libraries/src/Event/Application/ApplicationDocumentEvent.php b/libraries/src/Event/Application/ApplicationDocumentEvent.php
index bc0988f0a599..dd066216cf76 100644
--- a/libraries/src/Event/Application/ApplicationDocumentEvent.php
+++ b/libraries/src/Event/Application/ApplicationDocumentEvent.php
@@ -35,7 +35,7 @@ abstract class ApplicationDocumentEvent extends ApplicationEvent
public function __construct($name, array $arguments = [])
{
if (!\array_key_exists('document', $arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'document' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'document' of event %s is required but has not been provided", $name));
}
parent::__construct($name, $arguments);
diff --git a/libraries/src/Event/Application/ApplicationEvent.php b/libraries/src/Event/Application/ApplicationEvent.php
index b26cbf6af19d..b5d1dfb5692d 100644
--- a/libraries/src/Event/Application/ApplicationEvent.php
+++ b/libraries/src/Event/Application/ApplicationEvent.php
@@ -36,7 +36,7 @@ abstract class ApplicationEvent extends AbstractImmutableEvent
public function __construct($name, array $arguments = [])
{
if (!\array_key_exists('subject', $arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
}
parent::__construct($name, $arguments);
diff --git a/libraries/src/Event/Application/BeforeApiRouteEvent.php b/libraries/src/Event/Application/BeforeApiRouteEvent.php
index ce08993266c4..0c6b460790c8 100644
--- a/libraries/src/Event/Application/BeforeApiRouteEvent.php
+++ b/libraries/src/Event/Application/BeforeApiRouteEvent.php
@@ -35,7 +35,7 @@ class BeforeApiRouteEvent extends ApplicationEvent
public function __construct($name, array $arguments = [])
{
if (!\array_key_exists('router', $arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'router' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'router' of event %s is required but has not been provided", $name));
}
parent::__construct($name, $arguments);
diff --git a/libraries/src/Event/Application/DaemonReceiveSignalEvent.php b/libraries/src/Event/Application/DaemonReceiveSignalEvent.php
index 5ea04b002ed9..70df5e23c535 100644
--- a/libraries/src/Event/Application/DaemonReceiveSignalEvent.php
+++ b/libraries/src/Event/Application/DaemonReceiveSignalEvent.php
@@ -33,7 +33,7 @@ class DaemonReceiveSignalEvent extends ApplicationEvent
public function __construct($name, array $arguments = [])
{
if (!\array_key_exists('signal', $arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'signal' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'signal' of event %s is required but has not been provided", $name));
}
parent::__construct($name, $arguments);
diff --git a/libraries/src/Event/Captcha/CaptchaSetupEvent.php b/libraries/src/Event/Captcha/CaptchaSetupEvent.php
index 8924b7cbbe6e..e8cc62bc72bc 100644
--- a/libraries/src/Event/Captcha/CaptchaSetupEvent.php
+++ b/libraries/src/Event/Captcha/CaptchaSetupEvent.php
@@ -32,7 +32,7 @@ class CaptchaSetupEvent extends AbstractImmutableEvent
public function __construct($name, array $arguments = [])
{
if (!\array_key_exists('subject', $arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
}
parent::__construct($name, $arguments);
diff --git a/libraries/src/Event/Contact/SubmitContactEvent.php b/libraries/src/Event/Contact/SubmitContactEvent.php
index 5aa25c4ab5ec..70c21ae47ca0 100644
--- a/libraries/src/Event/Contact/SubmitContactEvent.php
+++ b/libraries/src/Event/Contact/SubmitContactEvent.php
@@ -55,11 +55,11 @@ public function __construct($name, array $arguments = [])
}
if (!\array_key_exists('subject', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('data', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'data' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'data' of event %s is required but has not been provided", $name));
}
// For backward compatibility make sure the content is referenced
diff --git a/libraries/src/Event/Contact/ValidateContactEvent.php b/libraries/src/Event/Contact/ValidateContactEvent.php
index ab775d3e50d3..7ab3fd0e4cd8 100644
--- a/libraries/src/Event/Contact/ValidateContactEvent.php
+++ b/libraries/src/Event/Contact/ValidateContactEvent.php
@@ -60,11 +60,11 @@ public function __construct($name, array $arguments = [])
}
if (!\array_key_exists('subject', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('data', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'data' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'data' of event %s is required but has not been provided", $name));
}
// For backward compatibility make sure the content is referenced
diff --git a/libraries/src/Event/Content/ContentEvent.php b/libraries/src/Event/Content/ContentEvent.php
index cdb4cf59bf9f..d450c8feeab8 100644
--- a/libraries/src/Event/Content/ContentEvent.php
+++ b/libraries/src/Event/Content/ContentEvent.php
@@ -55,11 +55,11 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('context', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'context' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'context' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('subject', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
}
}
diff --git a/libraries/src/Event/CoreEventAware.php b/libraries/src/Event/CoreEventAware.php
index 038faec52cea..2c441155a9f3 100644
--- a/libraries/src/Event/CoreEventAware.php
+++ b/libraries/src/Event/CoreEventAware.php
@@ -9,21 +9,83 @@
namespace Joomla\CMS\Event;
-use Joomla\CMS\Event\Application\BeforeExecuteEvent;
+use Joomla\CMS\Event\ActionLog\AfterLogExportEvent;
+use Joomla\CMS\Event\ActionLog\AfterLogPurgeEvent;
+use Joomla\CMS\Event\Application\AfterApiRouteEvent;
+use Joomla\CMS\Event\Application\AfterCompressEvent;
+use Joomla\CMS\Event\Application\AfterDispatchEvent;
use Joomla\CMS\Event\Application\AfterExecuteEvent;
use Joomla\CMS\Event\Application\AfterInitialiseEvent;
+use Joomla\CMS\Event\Application\AfterRenderEvent;
+use Joomla\CMS\Event\Application\AfterRespondEvent;
use Joomla\CMS\Event\Application\AfterRouteEvent;
+use Joomla\CMS\Event\Application\AfterSaveConfigurationEvent;
use Joomla\CMS\Event\Application\BeforeApiRouteEvent;
-use Joomla\CMS\Event\Application\AfterApiRouteEvent;
-use Joomla\CMS\Event\Application\AfterDispatchEvent;
-use Joomla\CMS\Event\Application\BeforeRenderEvent;
-use Joomla\CMS\Event\Application\AfterRenderEvent;
use Joomla\CMS\Event\Application\BeforeCompileHeadEvent;
-use Joomla\CMS\Event\Application\AfterCompressEvent;
+use Joomla\CMS\Event\Application\BeforeExecuteEvent;
+use Joomla\CMS\Event\Application\BeforeRenderEvent;
use Joomla\CMS\Event\Application\BeforeRespondEvent;
-use Joomla\CMS\Event\Application\AfterRespondEvent;
use Joomla\CMS\Event\Application\BeforeSaveConfigurationEvent;
-use Joomla\CMS\Event\Application\AfterSaveConfigurationEvent;
+use Joomla\CMS\Event\Cache\AfterPurgeEvent;
+use Joomla\CMS\Event\Contact\SubmitContactEvent;
+use Joomla\CMS\Event\Contact\ValidateContactEvent;
+use Joomla\CMS\Event\Content\AfterDisplayEvent;
+use Joomla\CMS\Event\Content\AfterTitleEvent;
+use Joomla\CMS\Event\Content\BeforeDisplayEvent;
+use Joomla\CMS\Event\Content\ContentPrepareEvent;
+use Joomla\CMS\Event\CustomFields\AfterPrepareFieldEvent;
+use Joomla\CMS\Event\CustomFields\BeforePrepareFieldEvent;
+use Joomla\CMS\Event\CustomFields\GetTypesEvent;
+use Joomla\CMS\Event\CustomFields\PrepareDomEvent;
+use Joomla\CMS\Event\CustomFields\PrepareFieldEvent;
+use Joomla\CMS\Event\Extension\AfterInstallEvent;
+use Joomla\CMS\Event\Extension\AfterJoomlaUpdateEvent;
+use Joomla\CMS\Event\Extension\AfterUninstallEvent;
+use Joomla\CMS\Event\Extension\AfterUpdateEvent;
+use Joomla\CMS\Event\Extension\BeforeInstallEvent;
+use Joomla\CMS\Event\Extension\BeforeJoomlaUpdateEvent;
+use Joomla\CMS\Event\Extension\BeforeUninstallEvent;
+use Joomla\CMS\Event\Extension\BeforeUpdateEvent;
+use Joomla\CMS\Event\Finder\BeforeIndexEvent;
+use Joomla\CMS\Event\Finder\BuildIndexEvent;
+use Joomla\CMS\Event\Finder\GarbageCollectionEvent;
+use Joomla\CMS\Event\Finder\PrepareContentEvent;
+use Joomla\CMS\Event\Finder\ResultEvent;
+use Joomla\CMS\Event\Finder\StartIndexEvent;
+use Joomla\CMS\Event\Installer\AddInstallationTabEvent;
+use Joomla\CMS\Event\Installer\AfterInstallerEvent;
+use Joomla\CMS\Event\Installer\BeforeInstallationEvent;
+use Joomla\CMS\Event\Installer\BeforeInstallerEvent;
+use Joomla\CMS\Event\Installer\BeforePackageDownloadEvent;
+use Joomla\CMS\Event\Mail\BeforeRenderingMailTemplateEvent;
+use Joomla\CMS\Event\Menu\AfterGetMenuTypeOptionsEvent;
+use Joomla\CMS\Event\Menu\BeforeRenderMenuItemsViewEvent;
+use Joomla\CMS\Event\Menu\PreprocessMenuItemsEvent;
+use Joomla\CMS\Event\Model\AfterCategoryChangeStateEvent;
+use Joomla\CMS\Event\Model\AfterChangeStateEvent;
+use Joomla\CMS\Event\Model\AfterSaveEvent;
+use Joomla\CMS\Event\Model\BeforeBatchEvent;
+use Joomla\CMS\Event\Model\BeforeChangeStateEvent;
+use Joomla\CMS\Event\Model\BeforeSaveEvent;
+use Joomla\CMS\Event\Model\BeforeValidateDataEvent;
+use Joomla\CMS\Event\Model\NormaliseRequestDataEvent;
+use Joomla\CMS\Event\Module\AfterCleanModuleListEvent;
+use Joomla\CMS\Event\Module\AfterModuleListEvent;
+use Joomla\CMS\Event\Module\AfterRenderModuleEvent;
+use Joomla\CMS\Event\Module\AfterRenderModulesEvent;
+use Joomla\CMS\Event\Module\BeforeRenderModuleEvent;
+use Joomla\CMS\Event\Module\PrepareModuleListEvent;
+use Joomla\CMS\Event\PageCache\GetKeyEvent;
+use Joomla\CMS\Event\PageCache\IsExcludedEvent;
+use Joomla\CMS\Event\PageCache\SetCachingEvent;
+use Joomla\CMS\Event\Plugin\System\Schemaorg\PrepareDataEvent;
+use Joomla\CMS\Event\Plugin\System\Schemaorg\PrepareFormEvent;
+use Joomla\CMS\Event\Plugin\System\Schemaorg\PrepareSaveEvent;
+use Joomla\CMS\Event\Privacy\CanRemoveDataEvent;
+use Joomla\CMS\Event\Privacy\CheckPrivacyPolicyPublishedEvent;
+use Joomla\CMS\Event\Privacy\CollectCapabilitiesEvent;
+use Joomla\CMS\Event\Privacy\ExportRequestEvent;
+use Joomla\CMS\Event\Privacy\RemoveDataEvent;
use Joomla\CMS\Event\QuickIcon\GetIconEvent;
use Joomla\CMS\Event\Table\AfterBindEvent;
use Joomla\CMS\Event\Table\AfterCheckinEvent;
@@ -50,86 +112,24 @@
use Joomla\CMS\Event\Table\CheckEvent;
use Joomla\CMS\Event\Table\ObjectCreateEvent;
use Joomla\CMS\Event\Table\SetNewTagsEvent;
-use Joomla\CMS\Event\View\DisplayEvent;
-use Joomla\CMS\Event\Workflow\WorkflowFunctionalityUsedEvent;
-use Joomla\CMS\Event\Workflow\WorkflowTransitionEvent;
-use Joomla\CMS\Event\Plugin\System\Schemaorg\PrepareDataEvent;
-use Joomla\CMS\Event\Plugin\System\Schemaorg\PrepareFormEvent;
-use Joomla\CMS\Event\Plugin\System\Schemaorg\PrepareSaveEvent;
-use Joomla\CMS\Event\Content\ContentPrepareEvent;
-use Joomla\CMS\Event\Content\AfterTitleEvent;
-use Joomla\CMS\Event\Content\BeforeDisplayEvent;
-use Joomla\CMS\Event\Content\AfterDisplayEvent;
-use Joomla\CMS\Event\Model\NormaliseRequestDataEvent;
-use Joomla\CMS\Event\Model\BeforeValidateDataEvent;
-use Joomla\CMS\Event\Model\BeforeSaveEvent;
-use Joomla\CMS\Event\Model\AfterSaveEvent;
-use Joomla\CMS\Event\Model\BeforeChangeStateEvent;
-use Joomla\CMS\Event\Model\AfterChangeStateEvent;
-use Joomla\CMS\Event\Model\AfterCategoryChangeStateEvent;
-use Joomla\CMS\Event\Model\BeforeBatchEvent;
+use Joomla\CMS\Event\User\AfterLoginEvent;
+use Joomla\CMS\Event\User\AfterLogoutEvent;
+use Joomla\CMS\Event\User\AfterRemindEvent;
+use Joomla\CMS\Event\User\AfterResetCompleteEvent;
+use Joomla\CMS\Event\User\AfterResetRequestEvent;
use Joomla\CMS\Event\User\AuthenticationEvent;
use Joomla\CMS\Event\User\AuthorisationEvent;
use Joomla\CMS\Event\User\AuthorisationFailureEvent;
+use Joomla\CMS\Event\User\BeforeResetCompleteEvent;
+use Joomla\CMS\Event\User\BeforeResetRequestEvent;
+use Joomla\CMS\Event\User\LoginButtonsEvent;
use Joomla\CMS\Event\User\LoginEvent;
-use Joomla\CMS\Event\User\AfterLoginEvent;
use Joomla\CMS\Event\User\LoginFailureEvent;
use Joomla\CMS\Event\User\LogoutEvent;
-use Joomla\CMS\Event\User\AfterLogoutEvent;
use Joomla\CMS\Event\User\LogoutFailureEvent;
-use Joomla\CMS\Event\User\LoginButtonsEvent;
-use Joomla\CMS\Event\User\AfterRemindEvent;
-use Joomla\CMS\Event\User\BeforeResetRequestEvent;
-use Joomla\CMS\Event\User\AfterResetRequestEvent;
-use Joomla\CMS\Event\User\BeforeResetCompleteEvent;
-use Joomla\CMS\Event\User\AfterResetCompleteEvent;
-use Joomla\CMS\Event\Module\BeforeRenderModuleEvent;
-use Joomla\CMS\Event\Module\AfterRenderModuleEvent;
-use Joomla\CMS\Event\Module\AfterRenderModulesEvent;
-use Joomla\CMS\Event\Module\PrepareModuleListEvent;
-use Joomla\CMS\Event\Module\AfterModuleListEvent;
-use Joomla\CMS\Event\Module\AfterCleanModuleListEvent;
-use Joomla\CMS\Event\Extension\BeforeInstallEvent;
-use Joomla\CMS\Event\Extension\AfterInstallEvent;
-use Joomla\CMS\Event\Extension\BeforeUninstallEvent;
-use Joomla\CMS\Event\Extension\AfterUninstallEvent;
-use Joomla\CMS\Event\Extension\BeforeUpdateEvent;
-use Joomla\CMS\Event\Extension\AfterUpdateEvent;
-use Joomla\CMS\Event\Extension\BeforeJoomlaUpdateEvent;
-use Joomla\CMS\Event\Extension\AfterJoomlaUpdateEvent;
-use Joomla\CMS\Event\Installer\AddInstallationTabEvent;
-use Joomla\CMS\Event\Installer\BeforeInstallationEvent;
-use Joomla\CMS\Event\Installer\BeforeInstallerEvent;
-use Joomla\CMS\Event\Installer\AfterInstallerEvent;
-use Joomla\CMS\Event\Installer\BeforePackageDownloadEvent;
-use Joomla\CMS\Event\Finder\ResultEvent;
-use Joomla\CMS\Event\Finder\PrepareContentEvent;
-use Joomla\CMS\Event\Finder\BeforeIndexEvent;
-use Joomla\CMS\Event\Finder\BuildIndexEvent;
-use Joomla\CMS\Event\Finder\StartIndexEvent;
-use Joomla\CMS\Event\Finder\GarbageCollectionEvent;
-use Joomla\CMS\Event\Menu\BeforeRenderMenuItemsViewEvent;
-use Joomla\CMS\Event\Menu\AfterGetMenuTypeOptionsEvent;
-use Joomla\CMS\Event\Menu\PreprocessMenuItemsEvent;
-use Joomla\CMS\Event\ActionLog\AfterLogPurgeEvent;
-use Joomla\CMS\Event\ActionLog\AfterLogExportEvent;
-use Joomla\CMS\Event\Cache\AfterPurgeEvent;
-use Joomla\CMS\Event\Contact\ValidateContactEvent;
-use Joomla\CMS\Event\Contact\SubmitContactEvent;
-use Joomla\CMS\Event\CustomFields\GetTypesEvent;
-use Joomla\CMS\Event\CustomFields\PrepareDomEvent;
-use Joomla\CMS\Event\CustomFields\BeforePrepareFieldEvent;
-use Joomla\CMS\Event\CustomFields\PrepareFieldEvent;
-use Joomla\CMS\Event\CustomFields\AfterPrepareFieldEvent;
-use Joomla\CMS\Event\Privacy\CollectCapabilitiesEvent;
-use Joomla\CMS\Event\Privacy\CheckPrivacyPolicyPublishedEvent;
-use Joomla\CMS\Event\Privacy\ExportRequestEvent;
-use Joomla\CMS\Event\Privacy\CanRemoveDataEvent;
-use Joomla\CMS\Event\Privacy\RemoveDataEvent;
-use Joomla\CMS\Event\PageCache\SetCachingEvent;
-use Joomla\CMS\Event\PageCache\GetKeyEvent;
-use Joomla\CMS\Event\PageCache\IsExcludedEvent;
-use Joomla\CMS\Event\Mail\BeforeRenderingMailTemplateEvent;
+use Joomla\CMS\Event\View\DisplayEvent;
+use Joomla\CMS\Event\Workflow\WorkflowFunctionalityUsedEvent;
+use Joomla\CMS\Event\Workflow\WorkflowTransitionEvent;
use Joomla\Event\Event;
// phpcs:disable PSR1.Files.SideEffects
diff --git a/libraries/src/Event/CustomFields/AbstractPrepareFieldEvent.php b/libraries/src/Event/CustomFields/AbstractPrepareFieldEvent.php
index be2ad16d16a6..c1fec4e7fc04 100644
--- a/libraries/src/Event/CustomFields/AbstractPrepareFieldEvent.php
+++ b/libraries/src/Event/CustomFields/AbstractPrepareFieldEvent.php
@@ -45,11 +45,11 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('context', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'context' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'context' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('item', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'item' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'item' of event %s is required but has not been provided", $name));
}
}
diff --git a/libraries/src/Event/CustomFields/AfterPrepareFieldEvent.php b/libraries/src/Event/CustomFields/AfterPrepareFieldEvent.php
index 5d638cb91aa9..039fcb8aa68c 100644
--- a/libraries/src/Event/CustomFields/AfterPrepareFieldEvent.php
+++ b/libraries/src/Event/CustomFields/AfterPrepareFieldEvent.php
@@ -45,7 +45,7 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('value', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'value' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'value' of event %s is required but has not been provided", $name));
}
// For backward compatibility make sure the value is referenced
diff --git a/libraries/src/Event/CustomFields/CustomFieldsEvent.php b/libraries/src/Event/CustomFields/CustomFieldsEvent.php
index 4e024077751f..45ef3c09834c 100644
--- a/libraries/src/Event/CustomFields/CustomFieldsEvent.php
+++ b/libraries/src/Event/CustomFields/CustomFieldsEvent.php
@@ -55,7 +55,7 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('subject', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
}
}
diff --git a/libraries/src/Event/CustomFields/PrepareDomEvent.php b/libraries/src/Event/CustomFields/PrepareDomEvent.php
index 388fd8bb3d49..caf69f5ede00 100644
--- a/libraries/src/Event/CustomFields/PrepareDomEvent.php
+++ b/libraries/src/Event/CustomFields/PrepareDomEvent.php
@@ -47,11 +47,11 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('fieldset', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'fieldset' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'fieldset' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('form', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'form' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'form' of event %s is required but has not been provided", $name));
}
}
diff --git a/libraries/src/Event/Editor/EditorButtonsSetupEvent.php b/libraries/src/Event/Editor/EditorButtonsSetupEvent.php
index 0e7d89c0c10f..601fd175a128 100644
--- a/libraries/src/Event/Editor/EditorButtonsSetupEvent.php
+++ b/libraries/src/Event/Editor/EditorButtonsSetupEvent.php
@@ -32,15 +32,15 @@ final class EditorButtonsSetupEvent extends AbstractImmutableEvent
public function __construct($name, array $arguments = [])
{
if (!\array_key_exists('subject', $arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('editorType', $arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'editorType' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'editorType' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('disabledButtons', $arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'disabledButtons' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'disabledButtons' of event %s is required but has not been provided", $name));
}
parent::__construct($name, $arguments);
diff --git a/libraries/src/Event/Editor/EditorSetupEvent.php b/libraries/src/Event/Editor/EditorSetupEvent.php
index ca84393ba641..20d17e188666 100644
--- a/libraries/src/Event/Editor/EditorSetupEvent.php
+++ b/libraries/src/Event/Editor/EditorSetupEvent.php
@@ -32,7 +32,7 @@ final class EditorSetupEvent extends AbstractImmutableEvent
public function __construct($name, array $arguments = [])
{
if (!\array_key_exists('subject', $arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
}
parent::__construct($name, $arguments);
diff --git a/libraries/src/Event/Extension/AfterInstallEvent.php b/libraries/src/Event/Extension/AfterInstallEvent.php
index 3a9ff542542f..9d685bc080a5 100644
--- a/libraries/src/Event/Extension/AfterInstallEvent.php
+++ b/libraries/src/Event/Extension/AfterInstallEvent.php
@@ -47,11 +47,11 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('installer', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'method' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'method' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('eid', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'eid' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'eid' of event %s is required but has not been provided", $name));
}
}
diff --git a/libraries/src/Event/Extension/AfterUninstallEvent.php b/libraries/src/Event/Extension/AfterUninstallEvent.php
index e10fd36b3c0d..5af47b67550d 100644
--- a/libraries/src/Event/Extension/AfterUninstallEvent.php
+++ b/libraries/src/Event/Extension/AfterUninstallEvent.php
@@ -47,15 +47,15 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('installer', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'method' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'method' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('eid', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'eid' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'eid' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('removed', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'removed' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'removed' of event %s is required but has not been provided", $name));
}
}
diff --git a/libraries/src/Event/Extension/AfterUpdateEvent.php b/libraries/src/Event/Extension/AfterUpdateEvent.php
index 0fb0b00ed778..4e416b7466a1 100644
--- a/libraries/src/Event/Extension/AfterUpdateEvent.php
+++ b/libraries/src/Event/Extension/AfterUpdateEvent.php
@@ -47,11 +47,11 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('installer', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'method' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'method' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('eid', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'eid' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'eid' of event %s is required but has not been provided", $name));
}
}
diff --git a/libraries/src/Event/Extension/BeforeInstallEvent.php b/libraries/src/Event/Extension/BeforeInstallEvent.php
index 4bb6e9891e80..9870251d7d13 100644
--- a/libraries/src/Event/Extension/BeforeInstallEvent.php
+++ b/libraries/src/Event/Extension/BeforeInstallEvent.php
@@ -45,11 +45,11 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('method', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'method' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'method' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('type', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'type' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'type' of event %s is required but has not been provided", $name));
}
}
diff --git a/libraries/src/Event/Extension/BeforeUninstallEvent.php b/libraries/src/Event/Extension/BeforeUninstallEvent.php
index e6784dfe1762..78b149eeae63 100644
--- a/libraries/src/Event/Extension/BeforeUninstallEvent.php
+++ b/libraries/src/Event/Extension/BeforeUninstallEvent.php
@@ -45,7 +45,7 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('eid', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'eid' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'eid' of event %s is required but has not been provided", $name));
}
}
diff --git a/libraries/src/Event/Extension/BeforeUpdateEvent.php b/libraries/src/Event/Extension/BeforeUpdateEvent.php
index 36f3b032f003..12aa60af99a4 100644
--- a/libraries/src/Event/Extension/BeforeUpdateEvent.php
+++ b/libraries/src/Event/Extension/BeforeUpdateEvent.php
@@ -45,11 +45,11 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('type', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'type' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'type' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('manifest', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'manifest' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'manifest' of event %s is required but has not been provided", $name));
}
}
diff --git a/libraries/src/Event/Finder/AbstractFinderEvent.php b/libraries/src/Event/Finder/AbstractFinderEvent.php
index c53ab94dd81b..514b00ee2335 100644
--- a/libraries/src/Event/Finder/AbstractFinderEvent.php
+++ b/libraries/src/Event/Finder/AbstractFinderEvent.php
@@ -55,7 +55,7 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('subject', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
}
}
}
diff --git a/libraries/src/Event/Installer/AfterInstallerEvent.php b/libraries/src/Event/Installer/AfterInstallerEvent.php
index 36c27e2c14a6..a751d47f00c9 100644
--- a/libraries/src/Event/Installer/AfterInstallerEvent.php
+++ b/libraries/src/Event/Installer/AfterInstallerEvent.php
@@ -47,15 +47,15 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('installer', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'installer' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'installer' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('installerResult', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'installerResult' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'installerResult' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('message', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'message' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'message' of event %s is required but has not been provided", $name));
}
// For backward compatibility make sure the values is referenced
diff --git a/libraries/src/Event/Installer/BeforePackageDownloadEvent.php b/libraries/src/Event/Installer/BeforePackageDownloadEvent.php
index 85e5890bce23..2eed1c197e44 100644
--- a/libraries/src/Event/Installer/BeforePackageDownloadEvent.php
+++ b/libraries/src/Event/Installer/BeforePackageDownloadEvent.php
@@ -56,11 +56,11 @@ public function __construct($name, array $arguments = [])
}
if (!\array_key_exists('url', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'url' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'url' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('headers', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'headers' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'headers' of event %s is required but has not been provided", $name));
}
// For backward compatibility make sure the value is referenced
diff --git a/libraries/src/Event/Installer/InstallerEvent.php b/libraries/src/Event/Installer/InstallerEvent.php
index 6050c98367c4..b7e9fdbde6ee 100644
--- a/libraries/src/Event/Installer/InstallerEvent.php
+++ b/libraries/src/Event/Installer/InstallerEvent.php
@@ -57,11 +57,11 @@ public function __construct($name, array $arguments = [])
}
if (!\array_key_exists('subject', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('package', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'package' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'package' of event %s is required but has not been provided", $name));
}
// For backward compatibility make sure the package is referenced
diff --git a/libraries/src/Event/Mail/MailTemplateEvent.php b/libraries/src/Event/Mail/MailTemplateEvent.php
index 08654663d358..343055802400 100644
--- a/libraries/src/Event/Mail/MailTemplateEvent.php
+++ b/libraries/src/Event/Mail/MailTemplateEvent.php
@@ -56,11 +56,11 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('subject', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('templateId', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'templateId' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'templateId' of event %s is required but has not been provided", $name));
}
}
diff --git a/libraries/src/Event/Menu/AfterGetMenuTypeOptionsEvent.php b/libraries/src/Event/Menu/AfterGetMenuTypeOptionsEvent.php
index 00686c33cab2..e4821a164823 100644
--- a/libraries/src/Event/Menu/AfterGetMenuTypeOptionsEvent.php
+++ b/libraries/src/Event/Menu/AfterGetMenuTypeOptionsEvent.php
@@ -56,11 +56,11 @@ public function __construct($name, array $arguments = [])
}
if (!\array_key_exists('items', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'items' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'items' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('subject', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
}
// For backward compatibility make sure the content is referenced
diff --git a/libraries/src/Event/Menu/BeforeRenderMenuItemsViewEvent.php b/libraries/src/Event/Menu/BeforeRenderMenuItemsViewEvent.php
index e84b31b0584b..11999e1c84d0 100644
--- a/libraries/src/Event/Menu/BeforeRenderMenuItemsViewEvent.php
+++ b/libraries/src/Event/Menu/BeforeRenderMenuItemsViewEvent.php
@@ -56,7 +56,7 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('subject', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
}
}
diff --git a/libraries/src/Event/Menu/PreprocessMenuItemsEvent.php b/libraries/src/Event/Menu/PreprocessMenuItemsEvent.php
index 5d7d507095ea..f7ce0a3e0e23 100644
--- a/libraries/src/Event/Menu/PreprocessMenuItemsEvent.php
+++ b/libraries/src/Event/Menu/PreprocessMenuItemsEvent.php
@@ -57,11 +57,11 @@ public function __construct($name, array $arguments = [])
}
if (!\array_key_exists('context', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'context' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'context' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('subject', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
}
// For backward compatibility make sure the content is referenced
@@ -100,10 +100,10 @@ protected function onSetContext(string $value): string
protected function onSetSubject(array $value): array
{
// Filter out MenuItem elements. Non empty result means invalid data
- $valid = array_filter($value, fn($item) => !$item instanceof MenuItem) === [];
+ $valid = array_filter($value, fn ($item) => !$item instanceof MenuItem) === [];
if (!$valid) {
- throw new \UnexpectedValueException(sprintf("Argument 'subject' of event %s is not of the expected type", $this->name));
+ throw new \UnexpectedValueException(\sprintf("Argument 'subject' of event %s is not of the expected type", $this->name));
}
return $value;
diff --git a/libraries/src/Event/Model/AfterCleanCacheEvent.php b/libraries/src/Event/Model/AfterCleanCacheEvent.php
index 3e1e67a3d5c6..e784b8342e80 100644
--- a/libraries/src/Event/Model/AfterCleanCacheEvent.php
+++ b/libraries/src/Event/Model/AfterCleanCacheEvent.php
@@ -55,15 +55,15 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('defaultgroup', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'defaultgroup' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'defaultgroup' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('cachebase', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'cachebase' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'cachebase' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('result', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'result' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'result' of event %s is required but has not been provided", $name));
}
}
diff --git a/libraries/src/Event/Model/FormEvent.php b/libraries/src/Event/Model/FormEvent.php
index a1b9030ed8e3..40f078b779ab 100644
--- a/libraries/src/Event/Model/FormEvent.php
+++ b/libraries/src/Event/Model/FormEvent.php
@@ -56,11 +56,11 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('subject', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('data', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'data' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'data' of event %s is required but has not been provided", $name));
}
}
diff --git a/libraries/src/Event/Model/ModelEvent.php b/libraries/src/Event/Model/ModelEvent.php
index 338eb2d666f9..69ca296e7cb6 100644
--- a/libraries/src/Event/Model/ModelEvent.php
+++ b/libraries/src/Event/Model/ModelEvent.php
@@ -55,11 +55,11 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('context', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'context' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'context' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('subject', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
}
}
diff --git a/libraries/src/Event/Model/PrepareDataEvent.php b/libraries/src/Event/Model/PrepareDataEvent.php
index ffa54bce7774..970a70daa9d0 100644
--- a/libraries/src/Event/Model/PrepareDataEvent.php
+++ b/libraries/src/Event/Model/PrepareDataEvent.php
@@ -50,7 +50,7 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('data', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'data' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'data' of event %s is required but has not been provided", $name));
}
// For backward compatibility make sure the content is referenced
diff --git a/libraries/src/Event/Module/AfterRenderModulesEvent.php b/libraries/src/Event/Module/AfterRenderModulesEvent.php
index 9be1446a0594..c081073b0520 100644
--- a/libraries/src/Event/Module/AfterRenderModulesEvent.php
+++ b/libraries/src/Event/Module/AfterRenderModulesEvent.php
@@ -50,11 +50,11 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('content', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'content' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'content' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('attributes', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'attributes' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'attributes' of event %s is required but has not been provided", $name));
}
// For backward compatibility make sure the content is referenced
diff --git a/libraries/src/Event/Module/ModuleEvent.php b/libraries/src/Event/Module/ModuleEvent.php
index fd1ab03d8fb0..eeebecf5bb31 100644
--- a/libraries/src/Event/Module/ModuleEvent.php
+++ b/libraries/src/Event/Module/ModuleEvent.php
@@ -55,7 +55,7 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('subject', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
}
}
}
diff --git a/libraries/src/Event/Module/ModuleListEvent.php b/libraries/src/Event/Module/ModuleListEvent.php
index f10aa38b99e4..4c802b5302ce 100644
--- a/libraries/src/Event/Module/ModuleListEvent.php
+++ b/libraries/src/Event/Module/ModuleListEvent.php
@@ -48,7 +48,7 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('modules', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'modules' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'modules' of event %s is required but has not been provided", $name));
}
// For backward compatibility make sure the content is referenced
@@ -73,10 +73,10 @@ public function __construct($name, array $arguments = [])
protected function onSetModules(array $value): array
{
// Filter out Module elements. Non empty result means invalid data
- $valid = array_filter($value, fn($item) => !\is_object($item)) === [];
+ $valid = array_filter($value, fn ($item) => !\is_object($item)) === [];
if (!$valid) {
- throw new \UnexpectedValueException(sprintf("Argument 'modules' of event %s is not of the expected type", $this->name));
+ throw new \UnexpectedValueException(\sprintf("Argument 'modules' of event %s is not of the expected type", $this->name));
}
return $value;
diff --git a/libraries/src/Event/Module/RenderModuleEvent.php b/libraries/src/Event/Module/RenderModuleEvent.php
index fa32e448545f..fd205eb1730c 100644
--- a/libraries/src/Event/Module/RenderModuleEvent.php
+++ b/libraries/src/Event/Module/RenderModuleEvent.php
@@ -45,7 +45,7 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('attributes', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'attributes' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'attributes' of event %s is required but has not been provided", $name));
}
// For backward compatibility make sure the content is referenced
diff --git a/libraries/src/Event/Plugin/AjaxEvent.php b/libraries/src/Event/Plugin/AjaxEvent.php
index d87b21500c7f..31f4cbe0c2ef 100644
--- a/libraries/src/Event/Plugin/AjaxEvent.php
+++ b/libraries/src/Event/Plugin/AjaxEvent.php
@@ -42,7 +42,7 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('subject', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
}
}
diff --git a/libraries/src/Event/Plugin/System/Schemaorg/BeforeCompileHeadEvent.php b/libraries/src/Event/Plugin/System/Schemaorg/BeforeCompileHeadEvent.php
index 0191d3359b76..89928892a0d8 100644
--- a/libraries/src/Event/Plugin/System/Schemaorg/BeforeCompileHeadEvent.php
+++ b/libraries/src/Event/Plugin/System/Schemaorg/BeforeCompileHeadEvent.php
@@ -38,11 +38,11 @@ class BeforeCompileHeadEvent extends AbstractImmutableEvent
public function __construct($name, array $arguments = [])
{
if (!\array_key_exists('subject', $arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('context', $arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'context' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'context' of event %s is required but has not been provided", $name));
}
parent::__construct($name, $arguments);
diff --git a/libraries/src/Event/Plugin/System/Schemaorg/PrepareDataEvent.php b/libraries/src/Event/Plugin/System/Schemaorg/PrepareDataEvent.php
index 0b154e5df649..4f979063fc98 100644
--- a/libraries/src/Event/Plugin/System/Schemaorg/PrepareDataEvent.php
+++ b/libraries/src/Event/Plugin/System/Schemaorg/PrepareDataEvent.php
@@ -37,11 +37,11 @@ class PrepareDataEvent extends AbstractImmutableEvent
public function __construct($name, array $arguments = [])
{
if (!\array_key_exists('subject', $arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('context', $arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'context' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'context' of event %s is required but has not been provided", $name));
}
parent::__construct($name, $arguments);
diff --git a/libraries/src/Event/Plugin/System/Schemaorg/PrepareFormEvent.php b/libraries/src/Event/Plugin/System/Schemaorg/PrepareFormEvent.php
index c4df84ce76a3..3c8f858bfdcc 100644
--- a/libraries/src/Event/Plugin/System/Schemaorg/PrepareFormEvent.php
+++ b/libraries/src/Event/Plugin/System/Schemaorg/PrepareFormEvent.php
@@ -38,7 +38,7 @@ class PrepareFormEvent extends AbstractImmutableEvent
public function __construct($name, array $arguments = [])
{
if (!\array_key_exists('subject', $arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
}
parent::__construct($name, $arguments);
diff --git a/libraries/src/Event/Plugin/System/Schemaorg/PrepareSaveEvent.php b/libraries/src/Event/Plugin/System/Schemaorg/PrepareSaveEvent.php
index db25c3d56e0d..4e01ac1353ab 100644
--- a/libraries/src/Event/Plugin/System/Schemaorg/PrepareSaveEvent.php
+++ b/libraries/src/Event/Plugin/System/Schemaorg/PrepareSaveEvent.php
@@ -38,23 +38,23 @@ class PrepareSaveEvent extends AbstractImmutableEvent
public function __construct($name, array $arguments = [])
{
if (!\array_key_exists('subject', $arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('context', $arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'context' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'context' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('item', $arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'item' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'item' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('isNew', $arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'isNew' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'isNew' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('schema', $arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'schema' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'schema' of event %s is required but has not been provided", $name));
}
parent::__construct($name, $arguments);
diff --git a/libraries/src/Event/Privacy/CanRemoveDataEvent.php b/libraries/src/Event/Privacy/CanRemoveDataEvent.php
index de104d3e57fd..d7a438ecaac4 100644
--- a/libraries/src/Event/Privacy/CanRemoveDataEvent.php
+++ b/libraries/src/Event/Privacy/CanRemoveDataEvent.php
@@ -55,11 +55,11 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('subject', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('user', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'user' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'user' of event %s is required but has not been provided", $name));
}
}
diff --git a/libraries/src/Event/Privacy/CheckPrivacyPolicyPublishedEvent.php b/libraries/src/Event/Privacy/CheckPrivacyPolicyPublishedEvent.php
index ef6483102ebe..1be3faef1e0b 100644
--- a/libraries/src/Event/Privacy/CheckPrivacyPolicyPublishedEvent.php
+++ b/libraries/src/Event/Privacy/CheckPrivacyPolicyPublishedEvent.php
@@ -47,7 +47,7 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('subject', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
}
// For backward compatibility make sure the content is referenced
@@ -72,7 +72,7 @@ public function __construct($name, array $arguments = [])
protected function onSetSubject(array $value): array
{
if (!\array_key_exists('published', $value) || !\array_key_exists('articlePublished', $value) || !\array_key_exists('editLink', $value)) {
- throw new \UnexpectedValueException(sprintf("Argument 'subject' of event %s is not of the expected type", $this->name));
+ throw new \UnexpectedValueException(\sprintf("Argument 'subject' of event %s is not of the expected type", $this->name));
}
return $value;
diff --git a/libraries/src/Event/Privacy/ExportRequestEvent.php b/libraries/src/Event/Privacy/ExportRequestEvent.php
index 602f8e3e09c9..a6df58f1cb0a 100644
--- a/libraries/src/Event/Privacy/ExportRequestEvent.php
+++ b/libraries/src/Event/Privacy/ExportRequestEvent.php
@@ -55,11 +55,11 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('subject', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('user', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'user' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'user' of event %s is required but has not been provided", $name));
}
}
diff --git a/libraries/src/Event/Privacy/RemoveDataEvent.php b/libraries/src/Event/Privacy/RemoveDataEvent.php
index 6e51bae36478..94a5adc85a02 100644
--- a/libraries/src/Event/Privacy/RemoveDataEvent.php
+++ b/libraries/src/Event/Privacy/RemoveDataEvent.php
@@ -50,11 +50,11 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('subject', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
}
if (!\array_key_exists('user', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'user' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'user' of event %s is required but has not been provided", $name));
}
}
diff --git a/libraries/src/Event/Table/AbstractEvent.php b/libraries/src/Event/Table/AbstractEvent.php
index ea856acebddc..5ee2dd0b4ff8 100644
--- a/libraries/src/Event/Table/AbstractEvent.php
+++ b/libraries/src/Event/Table/AbstractEvent.php
@@ -34,7 +34,7 @@ abstract class AbstractEvent extends AbstractImmutableEvent
public function __construct($name, array $arguments = [])
{
if (!\array_key_exists('subject', $arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $this->name));
}
parent::__construct($name, $arguments);
@@ -55,7 +55,7 @@ public function __construct($name, array $arguments = [])
protected function setSubject($value)
{
if (!\is_object($value) || !($value instanceof TableInterface)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is not of the expected type", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is not of the expected type", $this->name));
}
return $value;
diff --git a/libraries/src/Event/Table/AfterLoadEvent.php b/libraries/src/Event/Table/AfterLoadEvent.php
index 97c42ddb116b..1d080a81d157 100644
--- a/libraries/src/Event/Table/AfterLoadEvent.php
+++ b/libraries/src/Event/Table/AfterLoadEvent.php
@@ -78,7 +78,7 @@ protected function setResult($value)
protected function setRow($value)
{
if (!\is_null($value) && !\is_array($value)) {
- throw new \BadMethodCallException(sprintf("Argument 'row' of event %s is not of the expected type", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'row' of event %s is not of the expected type", $this->name));
}
return $value;
diff --git a/libraries/src/Event/Table/AfterMoveEvent.php b/libraries/src/Event/Table/AfterMoveEvent.php
index b6df73ad14db..82e718d648a9 100644
--- a/libraries/src/Event/Table/AfterMoveEvent.php
+++ b/libraries/src/Event/Table/AfterMoveEvent.php
@@ -66,7 +66,7 @@ public function __construct($name, array $arguments = [])
protected function setRow($value)
{
if (!($value instanceof \stdClass) && !empty($value)) {
- throw new \BadMethodCallException(sprintf("Argument 'row' of event %s must be an stdClass object or null", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'row' of event %s must be an stdClass object or null", $this->name));
}
return $value;
@@ -87,7 +87,7 @@ protected function setRow($value)
protected function setDelta($value)
{
if (!is_numeric($value)) {
- throw new \BadMethodCallException(sprintf("Argument 'delta' of event %s must be an integer", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'delta' of event %s must be an integer", $this->name));
}
return (int) $value;
@@ -108,7 +108,7 @@ protected function setDelta($value)
protected function setWhere($value)
{
if (!empty($value) && !\is_string($value)) {
- throw new \BadMethodCallException(sprintf("Argument 'where' of event %s must be empty or string", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'where' of event %s must be empty or string", $this->name));
}
return $value;
diff --git a/libraries/src/Event/Table/AfterReorderEvent.php b/libraries/src/Event/Table/AfterReorderEvent.php
index 4fb8e0efae5e..5ca955477793 100644
--- a/libraries/src/Event/Table/AfterReorderEvent.php
+++ b/libraries/src/Event/Table/AfterReorderEvent.php
@@ -57,7 +57,7 @@ public function __construct($name, array $arguments = [])
protected function setWhere($value)
{
if (!empty($value) && !\is_string($value) && !\is_array($value)) {
- throw new \BadMethodCallException(sprintf("Argument 'where' of event %s must be empty or string or array of strings", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'where' of event %s must be empty or string or array of strings", $this->name));
}
return $value;
diff --git a/libraries/src/Event/Table/BeforeBindEvent.php b/libraries/src/Event/Table/BeforeBindEvent.php
index 80f802e8b477..28de04fac787 100644
--- a/libraries/src/Event/Table/BeforeBindEvent.php
+++ b/libraries/src/Event/Table/BeforeBindEvent.php
@@ -61,7 +61,7 @@ public function __construct($name, array $arguments = [])
protected function setSrc($value)
{
if (!empty($value) && !\is_object($value) && !\is_array($value)) {
- throw new \BadMethodCallException(sprintf("Argument 'src' of event %s must be empty, object or array", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'src' of event %s must be empty, object or array", $this->name));
}
return $value;
@@ -82,7 +82,7 @@ protected function setSrc($value)
protected function setIgnore($value)
{
if (!empty($value) && !\is_array($value)) {
- throw new \BadMethodCallException(sprintf("Argument 'ignore' of event %s must be empty or array", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'ignore' of event %s must be empty or array", $this->name));
}
return $value;
diff --git a/libraries/src/Event/Table/BeforeCheckoutEvent.php b/libraries/src/Event/Table/BeforeCheckoutEvent.php
index cca0eb458502..32c767164c8b 100644
--- a/libraries/src/Event/Table/BeforeCheckoutEvent.php
+++ b/libraries/src/Event/Table/BeforeCheckoutEvent.php
@@ -61,7 +61,7 @@ public function __construct($name, array $arguments = [])
protected function setUserId($value)
{
if (!is_numeric($value) || empty($value)) {
- throw new \BadMethodCallException(sprintf("Argument 'userId' of event %s must be an integer", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'userId' of event %s must be an integer", $this->name));
}
return (int) $value;
diff --git a/libraries/src/Event/Table/BeforeMoveEvent.php b/libraries/src/Event/Table/BeforeMoveEvent.php
index dcd9e15586ff..ae9ebde9e3ed 100644
--- a/libraries/src/Event/Table/BeforeMoveEvent.php
+++ b/libraries/src/Event/Table/BeforeMoveEvent.php
@@ -68,7 +68,7 @@ public function __construct($name, array $arguments = [])
protected function setQuery($value)
{
if (!($value instanceof DatabaseQuery)) {
- throw new \BadMethodCallException(sprintf("Argument 'query' of event %s must be of DatabaseQuery type", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'query' of event %s must be of DatabaseQuery type", $this->name));
}
return $value;
@@ -89,7 +89,7 @@ protected function setQuery($value)
protected function setDelta($value)
{
if (!is_numeric($value)) {
- throw new \BadMethodCallException(sprintf("Argument 'delta' of event %s must be an integer", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'delta' of event %s must be an integer", $this->name));
}
return (int) $value;
@@ -110,7 +110,7 @@ protected function setDelta($value)
protected function setWhere($value)
{
if (!empty($value) && !\is_string($value)) {
- throw new \BadMethodCallException(sprintf("Argument 'where' of event %s must be empty or string", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'where' of event %s must be empty or string", $this->name));
}
return $value;
diff --git a/libraries/src/Event/Table/BeforePublishEvent.php b/libraries/src/Event/Table/BeforePublishEvent.php
index 00ebc0547540..d9294c3339b0 100644
--- a/libraries/src/Event/Table/BeforePublishEvent.php
+++ b/libraries/src/Event/Table/BeforePublishEvent.php
@@ -66,7 +66,7 @@ public function __construct($name, array $arguments = [])
protected function setQuery($value)
{
if (!empty($value) && !\is_array($value)) {
- throw new \BadMethodCallException(sprintf("Argument 'pks' of event %s must be empty or an array", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'pks' of event %s must be empty or an array", $this->name));
}
return $value;
@@ -87,7 +87,7 @@ protected function setQuery($value)
protected function setState($value)
{
if (!is_numeric($value)) {
- throw new \BadMethodCallException(sprintf("Argument 'state' of event %s must be an integer", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'state' of event %s must be an integer", $this->name));
}
return (int) $value;
@@ -108,7 +108,7 @@ protected function setState($value)
protected function setUserId($value)
{
if (!is_numeric($value)) {
- throw new \BadMethodCallException(sprintf("Argument 'userId' of event %s must be an integer", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'userId' of event %s must be an integer", $this->name));
}
return (int) $value;
diff --git a/libraries/src/Event/Table/BeforeReorderEvent.php b/libraries/src/Event/Table/BeforeReorderEvent.php
index 2d2a116dea7d..a612f1c5c8b0 100644
--- a/libraries/src/Event/Table/BeforeReorderEvent.php
+++ b/libraries/src/Event/Table/BeforeReorderEvent.php
@@ -63,7 +63,7 @@ public function __construct($name, array $arguments = [])
protected function setQuery($value)
{
if (!($value instanceof DatabaseQuery)) {
- throw new \BadMethodCallException(sprintf("Argument 'query' of event %s must be of DatabaseQuery type", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'query' of event %s must be of DatabaseQuery type", $this->name));
}
return $value;
@@ -84,7 +84,7 @@ protected function setQuery($value)
protected function setWhere($value)
{
if (!empty($value) && !\is_string($value) && !\is_array($value)) {
- throw new \BadMethodCallException(sprintf("Argument 'where' of event %s must be empty or string or array of strings", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'where' of event %s must be empty or string or array of strings", $this->name));
}
return $value;
diff --git a/libraries/src/Event/User/AbstractSaveEvent.php b/libraries/src/Event/User/AbstractSaveEvent.php
index a8f6a7c99bc6..3272541364e9 100644
--- a/libraries/src/Event/User/AbstractSaveEvent.php
+++ b/libraries/src/Event/User/AbstractSaveEvent.php
@@ -45,7 +45,7 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('isNew', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'isNew' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'isNew' of event %s is required but has not been provided", $name));
}
}
diff --git a/libraries/src/Event/User/AfterDeleteEvent.php b/libraries/src/Event/User/AfterDeleteEvent.php
index dc0a11b2622c..966d7202f507 100644
--- a/libraries/src/Event/User/AfterDeleteEvent.php
+++ b/libraries/src/Event/User/AfterDeleteEvent.php
@@ -47,7 +47,7 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('deletingResult', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'deletingResult' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'deletingResult' of event %s is required but has not been provided", $name));
}
}
diff --git a/libraries/src/Event/User/AfterSaveEvent.php b/libraries/src/Event/User/AfterSaveEvent.php
index 6a8ad2043ad9..14598a8d3d90 100644
--- a/libraries/src/Event/User/AfterSaveEvent.php
+++ b/libraries/src/Event/User/AfterSaveEvent.php
@@ -47,7 +47,7 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('savingResult', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'savingResult' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'savingResult' of event %s is required but has not been provided", $name));
}
}
diff --git a/libraries/src/Event/User/AuthenticationEvent.php b/libraries/src/Event/User/AuthenticationEvent.php
index a85078301fa1..5d36073c9442 100644
--- a/libraries/src/Event/User/AuthenticationEvent.php
+++ b/libraries/src/Event/User/AuthenticationEvent.php
@@ -50,7 +50,7 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('credentials', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'credentials' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'credentials' of event %s is required but has not been provided", $name));
}
}
diff --git a/libraries/src/Event/User/UserEvent.php b/libraries/src/Event/User/UserEvent.php
index 07a2760a0c6e..4b19c4081bc9 100644
--- a/libraries/src/Event/User/UserEvent.php
+++ b/libraries/src/Event/User/UserEvent.php
@@ -55,7 +55,7 @@ public function __construct($name, array $arguments = [])
parent::__construct($name, $arguments);
if (!\array_key_exists('subject', $this->arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $name));
}
}
}
diff --git a/libraries/src/Event/View/DisplayEvent.php b/libraries/src/Event/View/DisplayEvent.php
index 5ca0e7ffc3f1..ef5020e336d0 100644
--- a/libraries/src/Event/View/DisplayEvent.php
+++ b/libraries/src/Event/View/DisplayEvent.php
@@ -36,23 +36,23 @@ class DisplayEvent extends AbstractImmutableEvent
public function __construct($name, array $arguments = [])
{
if (!isset($arguments['subject'])) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $this->name));
}
if (!($arguments['subject'] instanceof ViewInterface)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is not of type 'ViewInterface'", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is not of type 'ViewInterface'", $this->name));
}
if (!isset($arguments['extension'])) {
- throw new \BadMethodCallException(sprintf("Argument 'extension' of event %s is required but has not been provided", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'extension' of event %s is required but has not been provided", $this->name));
}
if (!isset($arguments['extension']) || !\is_string($arguments['extension'])) {
- throw new \BadMethodCallException(sprintf("Argument 'extension' of event %s is not of type 'string'", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'extension' of event %s is not of type 'string'", $this->name));
}
if (!str_contains($arguments['extension'], '.')) {
- throw new \BadMethodCallException(sprintf("Argument 'extension' of event %s has wrong format. Valid format: 'component.section'", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'extension' of event %s has wrong format. Valid format: 'component.section'", $this->name));
}
if (!\array_key_exists('extensionName', $arguments) || !\array_key_exists('section', $arguments)) {
diff --git a/libraries/src/Event/WebAsset/AbstractEvent.php b/libraries/src/Event/WebAsset/AbstractEvent.php
index ac56c9ac3a50..e4bc7222f825 100644
--- a/libraries/src/Event/WebAsset/AbstractEvent.php
+++ b/libraries/src/Event/WebAsset/AbstractEvent.php
@@ -35,7 +35,7 @@ abstract class AbstractEvent extends AbstractImmutableEvent
public function __construct($name, array $arguments = [])
{
if (!\array_key_exists('subject', $arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $this->name));
}
parent::__construct($name, $arguments);
diff --git a/libraries/src/Event/Workflow/AbstractEvent.php b/libraries/src/Event/Workflow/AbstractEvent.php
index adf0bc7dc48d..ea6b6a2251b2 100644
--- a/libraries/src/Event/Workflow/AbstractEvent.php
+++ b/libraries/src/Event/Workflow/AbstractEvent.php
@@ -35,15 +35,15 @@ abstract class AbstractEvent extends AbstractImmutableEvent
public function __construct($name, array $arguments = [])
{
if (!\array_key_exists('subject', $arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'subject' of event %s is required but has not been provided", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'subject' of event %s is required but has not been provided", $this->name));
}
if (!\array_key_exists('extension', $arguments)) {
- throw new \BadMethodCallException(sprintf("Argument 'extension' of event %s is required but has not been provided", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'extension' of event %s is required but has not been provided", $this->name));
}
if (!str_contains((string) $arguments['extension'], '.')) {
- throw new \BadMethodCallException(sprintf("Argument 'extension' of event %s has wrong format. Valid format: 'component.section'", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'extension' of event %s has wrong format. Valid format: 'component.section'", $this->name));
}
if (!\array_key_exists('extensionName', $arguments) || !\array_key_exists('section', $arguments)) {
diff --git a/libraries/src/Exception/ExceptionHandler.php b/libraries/src/Exception/ExceptionHandler.php
index b601f5d3ff4d..ca3568a5bafe 100644
--- a/libraries/src/Exception/ExceptionHandler.php
+++ b/libraries/src/Exception/ExceptionHandler.php
@@ -43,7 +43,7 @@ public static function handleUserDeprecatedErrors(int $errorNumber, string $erro
// We only want to handle user deprecation messages, these will be triggered in code
if ($errorNumber === E_USER_DEPRECATED) {
try {
- Log::add(sprintf('%s - %s - Line %d', $errorMessage, $errorFile, $errorLine), Log::WARNING, 'deprecated');
+ Log::add(\sprintf('%s - %s - Line %d', $errorMessage, $errorFile, $errorLine), Log::WARNING, 'deprecated');
} catch (\Exception) {
// Silence
}
diff --git a/libraries/src/Extension/Component.php b/libraries/src/Extension/Component.php
index c75800f6602f..9f9fc49dda28 100644
--- a/libraries/src/Extension/Component.php
+++ b/libraries/src/Extension/Component.php
@@ -39,8 +39,7 @@ public function __construct(
* @since 4.0.0
*/
private readonly ComponentDispatcherFactoryInterface $dispatcherFactory
- )
- {
+ ) {
}
/**
diff --git a/libraries/src/Extension/Module.php b/libraries/src/Extension/Module.php
index d99d86761e52..1d7d7408be4a 100644
--- a/libraries/src/Extension/Module.php
+++ b/libraries/src/Extension/Module.php
@@ -50,8 +50,7 @@ public function __construct(
* @since 4.0.0
*/
private readonly ?HelperFactoryInterface $helperFactory
- )
- {
+ ) {
}
/**
diff --git a/libraries/src/Extension/Service/Provider/CategoryFactory.php b/libraries/src/Extension/Service/Provider/CategoryFactory.php
index 744b858b7bb1..affa31ca8d5f 100644
--- a/libraries/src/Extension/Service/Provider/CategoryFactory.php
+++ b/libraries/src/Extension/Service/Provider/CategoryFactory.php
@@ -40,8 +40,7 @@ public function __construct(
* @since 4.0.0
*/
private $namespace
- )
- {
+ ) {
}
/**
diff --git a/libraries/src/Extension/Service/Provider/ComponentDispatcherFactory.php b/libraries/src/Extension/Service/Provider/ComponentDispatcherFactory.php
index 500d0f32016e..8b38c943365b 100644
--- a/libraries/src/Extension/Service/Provider/ComponentDispatcherFactory.php
+++ b/libraries/src/Extension/Service/Provider/ComponentDispatcherFactory.php
@@ -40,8 +40,7 @@ public function __construct(
* @since 4.0.0
*/
private readonly string $namespace
- )
- {
+ ) {
}
/**
@@ -57,7 +56,7 @@ public function register(Container $container)
{
$container->set(
ComponentDispatcherFactoryInterface::class,
- fn(Container $container) => new \Joomla\CMS\Dispatcher\ComponentDispatcherFactory($this->namespace, $container->get(MVCFactoryInterface::class))
+ fn (Container $container) => new \Joomla\CMS\Dispatcher\ComponentDispatcherFactory($this->namespace, $container->get(MVCFactoryInterface::class))
);
}
}
diff --git a/libraries/src/Extension/Service/Provider/HelperFactory.php b/libraries/src/Extension/Service/Provider/HelperFactory.php
index a76fee68a65b..be1df7aa9226 100644
--- a/libraries/src/Extension/Service/Provider/HelperFactory.php
+++ b/libraries/src/Extension/Service/Provider/HelperFactory.php
@@ -40,8 +40,7 @@ public function __construct(
* @since 4.0.0
*/
private readonly string $namespace
- )
- {
+ ) {
}
/**
diff --git a/libraries/src/Extension/Service/Provider/MVCFactory.php b/libraries/src/Extension/Service/Provider/MVCFactory.php
index 86266f44dca4..209f0b9dca06 100644
--- a/libraries/src/Extension/Service/Provider/MVCFactory.php
+++ b/libraries/src/Extension/Service/Provider/MVCFactory.php
@@ -9,8 +9,8 @@
namespace Joomla\CMS\Extension\Service\Provider;
-use Joomla\CMS\Factory;
use Joomla\CMS\Cache\CacheControllerFactoryInterface;
+use Joomla\CMS\Factory;
use Joomla\CMS\Form\FormFactoryInterface;
use Joomla\CMS\Mail\MailerFactoryInterface;
use Joomla\CMS\MVC\Factory\ApiMVCFactory;
@@ -48,8 +48,7 @@ public function __construct(
* @since 4.0.0
*/
private readonly string $namespace
- )
- {
+ ) {
}
/**
diff --git a/libraries/src/Extension/Service/Provider/Module.php b/libraries/src/Extension/Service/Provider/Module.php
index 99a99e2e945c..a9f317c96eb2 100644
--- a/libraries/src/Extension/Service/Provider/Module.php
+++ b/libraries/src/Extension/Service/Provider/Module.php
@@ -39,7 +39,7 @@ public function register(Container $container)
{
$container->set(
ModuleInterface::class,
- fn(Container $container) => new \Joomla\CMS\Extension\Module(
+ fn (Container $container) => new \Joomla\CMS\Extension\Module(
$container->get(ModuleDispatcherFactoryInterface::class),
$container->has(HelperFactoryInterface::class) ? $container->get(HelperFactoryInterface::class) : null
)
diff --git a/libraries/src/Extension/Service/Provider/ModuleDispatcherFactory.php b/libraries/src/Extension/Service/Provider/ModuleDispatcherFactory.php
index 150ef31c062a..8da1d320d1c2 100644
--- a/libraries/src/Extension/Service/Provider/ModuleDispatcherFactory.php
+++ b/libraries/src/Extension/Service/Provider/ModuleDispatcherFactory.php
@@ -39,8 +39,7 @@ public function __construct(
* @since 4.0.0
*/
private readonly string $namespace
- )
- {
+ ) {
}
/**
@@ -56,7 +55,7 @@ public function register(Container $container)
{
$container->set(
ModuleDispatcherFactoryInterface::class,
- fn(Container $container) => new \Joomla\CMS\Dispatcher\ModuleDispatcherFactory($this->namespace)
+ fn (Container $container) => new \Joomla\CMS\Dispatcher\ModuleDispatcherFactory($this->namespace)
);
}
}
diff --git a/libraries/src/Extension/Service/Provider/RouterFactory.php b/libraries/src/Extension/Service/Provider/RouterFactory.php
index e8e919c1b1d2..65ba72627dc2 100644
--- a/libraries/src/Extension/Service/Provider/RouterFactory.php
+++ b/libraries/src/Extension/Service/Provider/RouterFactory.php
@@ -41,8 +41,7 @@ public function __construct(
* @since 4.0.0
*/
private readonly string $namespace
- )
- {
+ ) {
}
/**
diff --git a/libraries/src/Factory.php b/libraries/src/Factory.php
index b7f8e048208b..49a2a297c45f 100644
--- a/libraries/src/Factory.php
+++ b/libraries/src/Factory.php
@@ -9,37 +9,37 @@
namespace Joomla\CMS;
+use Joomla\CMS\Application\CMSApplicationInterface;
+use Joomla\CMS\Cache\Cache;
+use Joomla\CMS\Cache\CacheControllerFactoryInterface;
+use Joomla\CMS\Client\ClientHelper;
+use Joomla\CMS\Date\Date;
+use Joomla\CMS\Document\Document;
+use Joomla\CMS\Document\FactoryInterface;
+use Joomla\CMS\Filesystem\Stream;
+use Joomla\CMS\Language\Language;
+use Joomla\CMS\Language\LanguageFactoryInterface;
+use Joomla\CMS\Mail\Mail;
+use Joomla\CMS\Mail\MailerFactoryInterface;
use Joomla\CMS\Service\Provider\Application;
use Joomla\CMS\Service\Provider\Authentication;
use Joomla\CMS\Service\Provider\CacheController;
use Joomla\CMS\Service\Provider\CaptchaRegistry;
use Joomla\CMS\Service\Provider\Config;
use Joomla\CMS\Service\Provider\Console;
-use Joomla\CMS\Service\Provider\EditorsRegistry;
use Joomla\CMS\Service\Provider\Database;
use Joomla\CMS\Service\Provider\Dispatcher;
+use Joomla\CMS\Service\Provider\EditorsRegistry;
use Joomla\CMS\Service\Provider\Form;
+use Joomla\CMS\Service\Provider\HTMLRegistry;
use Joomla\CMS\Service\Provider\Input;
use Joomla\CMS\Service\Provider\Logger;
use Joomla\CMS\Service\Provider\Mailer;
use Joomla\CMS\Service\Provider\Menu;
use Joomla\CMS\Service\Provider\Pathway;
-use Joomla\CMS\Service\Provider\HTMLRegistry;
+use Joomla\CMS\Service\Provider\Router;
use Joomla\CMS\Service\Provider\Toolbar;
use Joomla\CMS\Service\Provider\WebAssetRegistry;
-use Joomla\CMS\Service\Provider\Router;
-use Joomla\CMS\Application\CMSApplicationInterface;
-use Joomla\CMS\Cache\Cache;
-use Joomla\CMS\Cache\CacheControllerFactoryInterface;
-use Joomla\CMS\Client\ClientHelper;
-use Joomla\CMS\Date\Date;
-use Joomla\CMS\Document\Document;
-use Joomla\CMS\Document\FactoryInterface;
-use Joomla\CMS\Filesystem\Stream;
-use Joomla\CMS\Language\Language;
-use Joomla\CMS\Language\LanguageFactoryInterface;
-use Joomla\CMS\Mail\Mail;
-use Joomla\CMS\Mail\MailerFactoryInterface;
use Joomla\CMS\Session\Session;
use Joomla\CMS\User\User;
use Joomla\Database\DatabaseDriver;
diff --git a/libraries/src/Feed/FeedFactory.php b/libraries/src/Feed/FeedFactory.php
index 0f24ce3f2ef6..8f41bdd9b760 100644
--- a/libraries/src/Feed/FeedFactory.php
+++ b/libraries/src/Feed/FeedFactory.php
@@ -9,8 +9,8 @@
namespace Joomla\CMS\Feed;
-use Joomla\CMS\Feed\Parser\RssParser;
use Joomla\CMS\Feed\Parser\AtomParser;
+use Joomla\CMS\Feed\Parser\RssParser;
use Joomla\CMS\Http\HttpFactory;
use Joomla\Registry\Registry;
@@ -108,7 +108,7 @@ public function registerParser($tagName, $className, $overwrite = false)
}
// Validate that the tag name is valid.
- if (in_array(preg_match('/\A(?!XML)[a-z][\w0-9-]*/i', $tagName), [0, false], true)) {
+ if (\in_array(preg_match('/\A(?!XML)[a-z][\w0-9-]*/i', $tagName), [0, false], true)) {
throw new \InvalidArgumentException('The tag name ' . $tagName . ' is not valid.');
}
diff --git a/libraries/src/Feed/FeedLink.php b/libraries/src/Feed/FeedLink.php
index 0110675aa9c6..4fc436711375 100644
--- a/libraries/src/Feed/FeedLink.php
+++ b/libraries/src/Feed/FeedLink.php
@@ -78,28 +78,29 @@ public function __construct(/**
*
* @since 3.1.4
*/
- public $uri = null, /**
+ public $uri = null, /**
* The relationship between the feed and the linked resource.
*
* @since 3.1.4
*/
- public $relation = null, /**
+ public $relation = null, /**
* The resource type.
*
* @since 3.1.4
*/
- public $type = null, /**
+ public $type = null, /**
* The language of the resource found at the given URI.
*
* @since 3.1.4
*/
- public $language = null, /**
+ public $language = null, /**
* The title of the resource.
*
* @since 3.1.4
*/
- public $title = null, $length = null)
- {
+ public $title = null,
+ $length = null
+ ) {
// Validate the length input.
if (isset($length) && !is_numeric($length)) {
throw new \InvalidArgumentException('Length must be numeric.');
diff --git a/libraries/src/Feed/FeedPerson.php b/libraries/src/Feed/FeedPerson.php
index 9095cb7f2794..c0dedd28ad75 100644
--- a/libraries/src/Feed/FeedPerson.php
+++ b/libraries/src/Feed/FeedPerson.php
@@ -55,7 +55,6 @@ public function __construct(
* @since 3.1.4
*/
public $type = null
- )
- {
+ ) {
}
}
diff --git a/libraries/src/Filesystem/File.php b/libraries/src/Filesystem/File.php
index 53736aa70b45..af15bc4a0a5d 100644
--- a/libraries/src/Filesystem/File.php
+++ b/libraries/src/Filesystem/File.php
@@ -224,7 +224,7 @@ public static function canFlushFileCache()
if (
\ini_get('opcache.enable')
&& \function_exists('opcache_invalidate')
- && (in_array(\ini_get('opcache.restrict_api'), ['', '0'], true) || \ini_get('opcache.restrict_api') === false || stripos(realpath($_SERVER['SCRIPT_FILENAME']), \ini_get('opcache.restrict_api')) === 0)
+ && (\in_array(\ini_get('opcache.restrict_api'), ['', '0'], true) || \ini_get('opcache.restrict_api') === false || stripos(realpath($_SERVER['SCRIPT_FILENAME']), \ini_get('opcache.restrict_api')) === 0)
) {
static::$canFlushFileCache = true;
} else {
diff --git a/libraries/src/Filesystem/Folder.php b/libraries/src/Filesystem/Folder.php
index c2b929d4caa5..b3e189353c9c 100644
--- a/libraries/src/Filesystem/Folder.php
+++ b/libraries/src/Filesystem/Folder.php
@@ -557,7 +557,7 @@ protected static function _items($path, $filter, $recurse, $full, $exclude, $exc
while (($file = readdir($handle)) !== false) {
if (
$file !== '.' && $file !== '..' && !\in_array($file, $exclude)
- && (empty($excludeFilterString) || in_array(preg_match($excludeFilterString, $file), [0, false], true))
+ && (empty($excludeFilterString) || \in_array(preg_match($excludeFilterString, $file), [0, false], true))
) {
// Compute the fullpath
$fullpath = $path . '/' . $file;
@@ -565,7 +565,7 @@ protected static function _items($path, $filter, $recurse, $full, $exclude, $exc
// Compute the isDir flag
$isDir = is_dir($fullpath);
- if (($isDir xor $findFiles) && preg_match(sprintf('/%s/', $filter), $file)) {
+ if (($isDir xor $findFiles) && preg_match(\sprintf('/%s/', $filter), $file)) {
// (fullpath is dir and folders are searched or fullpath is not dir and files are searched) and file matches the filter
$arr[] = $full ? $fullpath : $file;
}
diff --git a/libraries/src/Filesystem/Patcher.php b/libraries/src/Filesystem/Patcher.php
index 659c553c947e..961b3557f74f 100644
--- a/libraries/src/Filesystem/Patcher.php
+++ b/libraries/src/Filesystem/Patcher.php
@@ -288,7 +288,7 @@ protected static function findHeader(&$lines, &$src, &$dst)
$line = current($lines);
// Search for the header
- while ($line !== false && in_array(preg_match(self::SRC_FILE, (string) $line, $m), [0, false], true)) {
+ while ($line !== false && \in_array(preg_match(self::SRC_FILE, (string) $line, $m), [0, false], true)) {
$line = next($lines);
}
@@ -308,7 +308,7 @@ protected static function findHeader(&$lines, &$src, &$dst)
}
// Search the destination file
- if (in_array(preg_match(self::DST_FILE, (string) $line, $m), [0, false], true)) {
+ if (\in_array(preg_match(self::DST_FILE, (string) $line, $m), [0, false], true)) {
throw new \RuntimeException('Invalid Diff file');
}
diff --git a/libraries/src/Filter/InputFilter.php b/libraries/src/Filter/InputFilter.php
index 76fbb0146971..11eca14b61ec 100644
--- a/libraries/src/Filter/InputFilter.php
+++ b/libraries/src/Filter/InputFilter.php
@@ -61,7 +61,7 @@ public function __construct($tagsArray = [], $attrArray = [], $tagsMethod = 0, $
*
* @since 3.5
*/
- private $stripUSC = 0)
+ private $stripUSC = 0)
{
parent::__construct($tagsArray, $attrArray, $tagsMethod, $attrMethod, $xssAuto);
}
@@ -434,14 +434,14 @@ protected function decode($source)
// Convert decimal
$source = preg_replace_callback(
'/(\d+);/m',
- fn($m) => mb_convert_encoding(\chr($m[1]), 'UTF-8', 'ISO-8859-1'),
+ fn ($m) => mb_convert_encoding(\chr($m[1]), 'UTF-8', 'ISO-8859-1'),
$source
);
// Convert hex
$source = preg_replace_callback(
'/([a-f0-9]+);/mi',
- fn($m) => mb_convert_encoding(\chr(hexdec($m[1])), 'UTF-8', 'ISO-8859-1'),
+ fn ($m) => mb_convert_encoding(\chr(hexdec($m[1])), 'UTF-8', 'ISO-8859-1'),
(string) $source
);
diff --git a/libraries/src/Filter/OutputFilter.php b/libraries/src/Filter/OutputFilter.php
index fa8c237a2c4e..f5b03ccfbd79 100644
--- a/libraries/src/Filter/OutputFilter.php
+++ b/libraries/src/Filter/OutputFilter.php
@@ -38,7 +38,7 @@ public static function linkXHTMLSafe($input)
{
$regex = 'href="([^"]*(&(amp;){0})[^"]*)*?"';
- return preg_replace_callback(sprintf('#%s#i', $regex), \Joomla\CMS\Filter\OutputFilter::ampReplaceCallback(...), $input);
+ return preg_replace_callback(\sprintf('#%s#i', $regex), \Joomla\CMS\Filter\OutputFilter::ampReplaceCallback(...), $input);
}
/**
diff --git a/libraries/src/Form/Field/AliastagField.php b/libraries/src/Form/Field/AliastagField.php
index 909ffaa2457e..fedfce8110f2 100644
--- a/libraries/src/Form/Field/AliastagField.php
+++ b/libraries/src/Form/Field/AliastagField.php
@@ -72,7 +72,7 @@ protected function getOptions()
// Sort by language value
usort(
$options,
- fn($a, $b) => strcmp($a->text, $b->text)
+ fn ($a, $b) => strcmp($a->text, $b->text)
);
return $options;
diff --git a/libraries/src/Form/Field/ColorField.php b/libraries/src/Form/Field/ColorField.php
index 723c47b6229e..7ffef83cf0db 100644
--- a/libraries/src/Form/Field/ColorField.php
+++ b/libraries/src/Form/Field/ColorField.php
@@ -251,7 +251,7 @@ protected function getLayoutData()
$controlModeData = match ($this->control) {
'simple' => $this->getSimpleModeLayoutData(),
'slider' => $this->getSliderModeLayoutData(),
- default => $this->getAdvancedModeLayoutData($lang),
+ default => $this->getAdvancedModeLayoutData($lang),
};
$extraData = [
diff --git a/libraries/src/Form/Field/LanguageField.php b/libraries/src/Form/Field/LanguageField.php
index d2cdffe28d96..a3db5fad8df0 100644
--- a/libraries/src/Form/Field/LanguageField.php
+++ b/libraries/src/Form/Field/LanguageField.php
@@ -56,7 +56,7 @@ protected function getOptions()
if (\count($languages) > 1) {
usort(
$languages,
- fn($a, $b) => strcmp((string) $a['value'], (string) $b['value'])
+ fn ($a, $b) => strcmp((string) $a['value'], (string) $b['value'])
);
}
diff --git a/libraries/src/Form/Field/ModalSelectField.php b/libraries/src/Form/Field/ModalSelectField.php
index 3e637bea0be6..d99eab240b9a 100644
--- a/libraries/src/Form/Field/ModalSelectField.php
+++ b/libraries/src/Form/Field/ModalSelectField.php
@@ -145,18 +145,18 @@ public function setup(\SimpleXMLElement $element, $value, $group = null)
public function __get($name)
{
return match ($name) {
- 'select' => $this->canDo['select'] ?? true,
- 'new' => $this->canDo['new'] ?? false,
- 'edit' => $this->canDo['edit'] ?? false,
- 'clear' => $this->canDo['clear'] ?? true,
- 'urlSelect' => $this->urls['select'] ?? '',
- 'urlNew' => $this->urls['new'] ?? '',
- 'urlEdit' => $this->urls['edit'] ?? '',
- 'urlCheckin' => $this->urls['checkin'] ?? '',
+ 'select' => $this->canDo['select'] ?? true,
+ 'new' => $this->canDo['new'] ?? false,
+ 'edit' => $this->canDo['edit'] ?? false,
+ 'clear' => $this->canDo['clear'] ?? true,
+ 'urlSelect' => $this->urls['select'] ?? '',
+ 'urlNew' => $this->urls['new'] ?? '',
+ 'urlEdit' => $this->urls['edit'] ?? '',
+ 'urlCheckin' => $this->urls['checkin'] ?? '',
'titleSelect' => $this->modalTitles['select'] ?? '',
- 'titleNew' => $this->modalTitles['new'] ?? '',
- 'titleEdit' => $this->modalTitles['edit'] ?? '',
- 'iconSelect' => $this->buttonIcons['select'] ?? '',
+ 'titleNew' => $this->modalTitles['new'] ?? '',
+ 'titleEdit' => $this->modalTitles['edit'] ?? '',
+ 'iconSelect' => $this->buttonIcons['select'] ?? '',
'sql_title_table', 'sql_title_column', 'sql_title_key' => $this->$name,
default => parent::__get($name),
};
diff --git a/libraries/src/Form/Field/SqlField.php b/libraries/src/Form/Field/SqlField.php
index aeaf83ac4738..57c2259c5980 100644
--- a/libraries/src/Form/Field/SqlField.php
+++ b/libraries/src/Form/Field/SqlField.php
@@ -238,15 +238,15 @@ protected function processQuery($conditions, $filters, $defaults)
if ($html_filters && !empty($html_filters[$value])) {
$escape = $db->quote($db->escape($html_filters[$value]), false);
- $query->where(sprintf('%s = %s', $value, $escape));
+ $query->where(\sprintf('%s = %s', $value, $escape));
} elseif ($filterFieldValue !== null) {
$escape = $db->quote($db->escape($filterFieldValue), false);
- $query->where(sprintf('%s = %s', $value, $escape));
+ $query->where(\sprintf('%s = %s', $value, $escape));
} elseif (!empty($defaults[$value])) {
$escape = $db->quote($db->escape($defaults[$value]), false);
- $query->where(sprintf('%s = %s', $value, $escape));
+ $query->where(\sprintf('%s = %s', $value, $escape));
}
}
}
diff --git a/libraries/src/Form/Field/TagField.php b/libraries/src/Form/Field/TagField.php
index d41d9136f609..4a1904a14386 100644
--- a/libraries/src/Form/Field/TagField.php
+++ b/libraries/src/Form/Field/TagField.php
@@ -9,12 +9,12 @@
namespace Joomla\CMS\Form\Field;
-use Joomla\Registry\Registry;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Helper\TagsHelper;
use Joomla\CMS\Language\Multilanguage;
use Joomla\Database\ParameterType;
+use Joomla\Registry\Registry;
use Joomla\Utilities\ArrayHelper;
// phpcs:disable PSR1.Files.SideEffects
diff --git a/libraries/src/Form/Field/TransitionField.php b/libraries/src/Form/Field/TransitionField.php
index b8a875832358..adfa406a8b74 100644
--- a/libraries/src/Form/Field/TransitionField.php
+++ b/libraries/src/Form/Field/TransitionField.php
@@ -131,7 +131,7 @@ protected function getGroups()
$items = array_filter(
$items,
- fn($item) => $user->authorise('core.execute.transition', $component . '.transition.' . $item->value)
+ fn ($item) => $user->authorise('core.execute.transition', $component . '.transition.' . $item->value)
);
foreach ($items as $item) {
diff --git a/libraries/src/Form/Form.php b/libraries/src/Form/Form.php
index 69eb48720410..509a76c09c73 100644
--- a/libraries/src/Form/Form.php
+++ b/libraries/src/Form/Form.php
@@ -114,8 +114,9 @@ public function __construct(/**
*
* @since 1.7.0
*/
- protected $name, array $options = [])
- {
+ protected $name,
+ array $options = []
+ ) {
// Initialise the Registry data.
$this->data = new Registry();
diff --git a/libraries/src/Form/FormField.php b/libraries/src/Form/FormField.php
index 3d695169fade..55b85fc69323 100644
--- a/libraries/src/Form/FormField.php
+++ b/libraries/src/Form/FormField.php
@@ -598,7 +598,7 @@ public function __set($name, $value)
if (str_starts_with($name, 'data-')) {
$this->dataAttributes[$name] = $value;
} elseif (property_exists(self::class, $name)) {
- Log::add(sprintf('Cannot access protected / private property %s of ', $name) . self::class);
+ Log::add(\sprintf('Cannot access protected / private property %s of ', $name) . self::class);
} else {
$this->$name = $value;
}
diff --git a/libraries/src/Form/FormHelper.php b/libraries/src/Form/FormHelper.php
index 25947943ea67..854892e917e4 100644
--- a/libraries/src/Form/FormHelper.php
+++ b/libraries/src/Form/FormHelper.php
@@ -213,7 +213,7 @@ protected static function loadClass($entity, $type)
$subPrefix = '';
if (strpos($name, '.')) {
- [$subPrefix, $name] = explode('.', $name);
+ [$subPrefix, $name] = explode('.', $name);
$subPrefix = ucfirst($subPrefix) . '\\';
}
diff --git a/libraries/src/Form/Rule/TimeRule.php b/libraries/src/Form/Rule/TimeRule.php
index dd84f6a79c36..8e19073f7023 100644
--- a/libraries/src/Form/Rule/TimeRule.php
+++ b/libraries/src/Form/Rule/TimeRule.php
@@ -76,7 +76,7 @@ public function test(\SimpleXMLElement $element, $value, $group = null, ?Registr
}
// If the are other symbols except of numbers and ':' return error message
- if (in_array(preg_match('#^[0-9:]+$#', $stringValue), [0, false], true)) {
+ if (\in_array(preg_match('#^[0-9:]+$#', $stringValue), [0, false], true)) {
Factory::getApplication()->enqueueMessage(
Text::_('JLIB_FORM_FIELD_INVALID_TIME_INPUT'),
'warning'
diff --git a/libraries/src/HTML/HTMLHelper.php b/libraries/src/HTML/HTMLHelper.php
index 9e6b788d459e..cbd3635cf5ce 100644
--- a/libraries/src/HTML/HTMLHelper.php
+++ b/libraries/src/HTML/HTMLHelper.php
@@ -421,13 +421,13 @@ protected static function includeRelativeFiles($folder, $file, $relative, $detec
*/
foreach ($files as $file) {
if (!empty($template->parent)) {
- $found = static::addFileToBuffer(sprintf('%s/%s/%s/%s', $templaPath, $template->template, $folder, $file), $ext, $debugMode);
+ $found = static::addFileToBuffer(\sprintf('%s/%s/%s/%s', $templaPath, $template->template, $folder, $file), $ext, $debugMode);
if (empty($found)) {
- $found = static::addFileToBuffer(sprintf('%s/%s/%s/%s', $templaPath, $template->parent, $folder, $file), $ext, $debugMode);
+ $found = static::addFileToBuffer(\sprintf('%s/%s/%s/%s', $templaPath, $template->parent, $folder, $file), $ext, $debugMode);
}
} else {
- $found = static::addFileToBuffer(sprintf('%s/%s/%s/%s', $templaPath, $template->template, $folder, $file), $ext, $debugMode);
+ $found = static::addFileToBuffer(\sprintf('%s/%s/%s/%s', $templaPath, $template->template, $folder, $file), $ext, $debugMode);
}
if (!empty($found)) {
@@ -447,7 +447,7 @@ protected static function includeRelativeFiles($folder, $file, $relative, $detec
[$element, $file] = explode('/', $file, 2);
// Try to deal with plugins group in the media folder
- $found = static::addFileToBuffer(JPATH_PUBLIC . sprintf('/media/%s/%s/%s/%s', $extension, $element, $folder, $file), $ext, $debugMode);
+ $found = static::addFileToBuffer(JPATH_PUBLIC . \sprintf('/media/%s/%s/%s/%s', $extension, $element, $folder, $file), $ext, $debugMode);
if (!empty($found)) {
$includes[] = $found;
@@ -456,7 +456,7 @@ protected static function includeRelativeFiles($folder, $file, $relative, $detec
}
// Try to deal with classical file in a media subfolder called element
- $found = static::addFileToBuffer(JPATH_PUBLIC . sprintf('/media/%s/%s/%s/%s', $extension, $folder, $element, $file), $ext, $debugMode);
+ $found = static::addFileToBuffer(JPATH_PUBLIC . \sprintf('/media/%s/%s/%s/%s', $extension, $folder, $element, $file), $ext, $debugMode);
if (!empty($found)) {
$includes[] = $found;
@@ -466,7 +466,7 @@ protected static function includeRelativeFiles($folder, $file, $relative, $detec
// Try to deal with system files in the template folder
if (!empty($template->parent)) {
- $found = static::addFileToBuffer(sprintf('%s/%s/%s/system/%s/%s', $templaPath, $template->template, $folder, $element, $file), $ext, $debugMode);
+ $found = static::addFileToBuffer(\sprintf('%s/%s/%s/system/%s/%s', $templaPath, $template->template, $folder, $element, $file), $ext, $debugMode);
if (!empty($found)) {
$includes[] = $found;
@@ -474,7 +474,7 @@ protected static function includeRelativeFiles($folder, $file, $relative, $detec
break;
}
- $found = static::addFileToBuffer(sprintf('%s/%s/%s/system/%s/%s', $templaPath, $template->parent, $folder, $element, $file), $ext, $debugMode);
+ $found = static::addFileToBuffer(\sprintf('%s/%s/%s/system/%s/%s', $templaPath, $template->parent, $folder, $element, $file), $ext, $debugMode);
if (!empty($found)) {
$includes[] = $found;
@@ -483,7 +483,7 @@ protected static function includeRelativeFiles($folder, $file, $relative, $detec
}
} else {
// Try to deal with system files in the media folder
- $found = static::addFileToBuffer(JPATH_PUBLIC . sprintf('/media/system/%s/%s/%s', $folder, $element, $file), $ext, $debugMode);
+ $found = static::addFileToBuffer(JPATH_PUBLIC . \sprintf('/media/system/%s/%s/%s', $folder, $element, $file), $ext, $debugMode);
if (!empty($found)) {
$includes[] = $found;
@@ -493,7 +493,7 @@ protected static function includeRelativeFiles($folder, $file, $relative, $detec
}
} else {
// Try to deal with files in the extension's media folder
- $found = static::addFileToBuffer(JPATH_PUBLIC . sprintf('/media/%s/%s/%s', $extension, $folder, $file), $ext, $debugMode);
+ $found = static::addFileToBuffer(JPATH_PUBLIC . \sprintf('/media/%s/%s/%s', $extension, $folder, $file), $ext, $debugMode);
if (!empty($found)) {
$includes[] = $found;
@@ -503,7 +503,7 @@ protected static function includeRelativeFiles($folder, $file, $relative, $detec
// Try to deal with system files in the template folder
if (!empty($template->parent)) {
- $found = static::addFileToBuffer(sprintf('%s/%s/%s/system/%s', $templaPath, $template->template, $folder, $file), $ext, $debugMode);
+ $found = static::addFileToBuffer(\sprintf('%s/%s/%s/system/%s', $templaPath, $template->template, $folder, $file), $ext, $debugMode);
if (!empty($found)) {
$includes[] = $found;
@@ -511,7 +511,7 @@ protected static function includeRelativeFiles($folder, $file, $relative, $detec
break;
}
- $found = static::addFileToBuffer(sprintf('%s/%s/%s/system/%s', $templaPath, $template->parent, $folder, $file), $ext, $debugMode);
+ $found = static::addFileToBuffer(\sprintf('%s/%s/%s/system/%s', $templaPath, $template->parent, $folder, $file), $ext, $debugMode);
if (!empty($found)) {
$includes[] = $found;
@@ -520,7 +520,7 @@ protected static function includeRelativeFiles($folder, $file, $relative, $detec
}
} else {
// Try to deal with system files in the template folder
- $found = static::addFileToBuffer(sprintf('%s/%s/%s/system/%s', $templaPath, $template->template, $folder, $file), $ext, $debugMode);
+ $found = static::addFileToBuffer(\sprintf('%s/%s/%s/system/%s', $templaPath, $template->template, $folder, $file), $ext, $debugMode);
if (!empty($found)) {
$includes[] = $found;
@@ -530,7 +530,7 @@ protected static function includeRelativeFiles($folder, $file, $relative, $detec
}
// Try to deal with system files in the media folder
- $found = static::addFileToBuffer(JPATH_PUBLIC . sprintf('/media/system/%s/%s', $folder, $file), $ext, $debugMode);
+ $found = static::addFileToBuffer(JPATH_PUBLIC . \sprintf('/media/system/%s/%s', $folder, $file), $ext, $debugMode);
if (!empty($found)) {
$includes[] = $found;
@@ -540,7 +540,7 @@ protected static function includeRelativeFiles($folder, $file, $relative, $detec
}
} else {
// Try to deal with system files in the media folder
- $found = static::addFileToBuffer(JPATH_PUBLIC . sprintf('/media/system/%s/%s', $folder, $file), $ext, $debugMode);
+ $found = static::addFileToBuffer(JPATH_PUBLIC . \sprintf('/media/system/%s/%s', $folder, $file), $ext, $debugMode);
if (!empty($found)) {
$includes[] = $found;
@@ -609,7 +609,7 @@ public static function cleanImageURL($url)
$url = '';
}
- if (in_array(strpos($url, '?'), [0, false], true)) {
+ if (\in_array(strpos($url, '?'), [0, false], true)) {
$obj->url = $url;
return $obj;
@@ -720,7 +720,7 @@ public static function image($file, $alt, $attribs = null, $relative = false, $r
}
// Set the attribute
- [$key, $value] = explode('=', $attribute);
+ [$key, $value] = explode('=', $attribute);
$attributes[$key] = trim($value, '"');
}
diff --git a/libraries/src/HTML/Helpers/Behavior.php b/libraries/src/HTML/Helpers/Behavior.php
index 6e32d9a02203..95d1f2ead99f 100644
--- a/libraries/src/HTML/Helpers/Behavior.php
+++ b/libraries/src/HTML/Helpers/Behavior.php
@@ -9,9 +9,9 @@
namespace Joomla\CMS\HTML\Helpers;
-use Joomla\CMS\WebAsset\WebAssetManager;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
+use Joomla\CMS\WebAsset\WebAssetManager;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/libraries/src/HTML/Helpers/Content.php b/libraries/src/HTML/Helpers/Content.php
index 5b3d3819cf5a..0561e63c87dd 100644
--- a/libraries/src/HTML/Helpers/Content.php
+++ b/libraries/src/HTML/Helpers/Content.php
@@ -9,13 +9,13 @@
namespace Joomla\CMS\HTML\Helpers;
-use Joomla\Component\Content\Administrator\Extension\ContentComponent;
-use Joomla\Component\Content\Site\Model\ArticlesModel;
use Joomla\CMS\Date\Date;
use Joomla\CMS\Event\Content\ContentPrepareEvent;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Plugin\PluginHelper;
+use Joomla\Component\Content\Administrator\Extension\ContentComponent;
+use Joomla\Component\Content\Site\Model\ArticlesModel;
use Joomla\Event\DispatcherInterface;
use Joomla\Registry\Registry;
diff --git a/libraries/src/HTML/Helpers/Dropdown.php b/libraries/src/HTML/Helpers/Dropdown.php
index e96cde33d5a0..86bbed143188 100644
--- a/libraries/src/HTML/Helpers/Dropdown.php
+++ b/libraries/src/HTML/Helpers/Dropdown.php
@@ -115,7 +115,7 @@ public static function render()
$dropDownList = static::$dropDownList;
$dropDownList .= '';
- static::$dropDownList = null;
+ static::$dropDownList = null;
static::$loaded[self::class . '::start'] = false;
return $dropDownList;
diff --git a/libraries/src/HTML/Helpers/FormBehavior.php b/libraries/src/HTML/Helpers/FormBehavior.php
index 9057e1321b4a..f8af3c1552c6 100644
--- a/libraries/src/HTML/Helpers/FormBehavior.php
+++ b/libraries/src/HTML/Helpers/FormBehavior.php
@@ -9,10 +9,10 @@
namespace Joomla\CMS\HTML\Helpers;
-use Joomla\CMS\WebAsset\WebAssetManager;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
+use Joomla\CMS\WebAsset\WebAssetManager;
use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
diff --git a/libraries/src/HTML/Helpers/ListHelper.php b/libraries/src/HTML/Helpers/ListHelper.php
index ef3df94e6917..5a359bf56bd2 100644
--- a/libraries/src/HTML/Helpers/ListHelper.php
+++ b/libraries/src/HTML/Helpers/ListHelper.php
@@ -47,7 +47,7 @@ public static function images($name, $active = null, $javascript = null, $direct
if (!$javascript) {
$javascript = 'onchange="if (document.forms.adminForm.' . $name
- . sprintf(".options[selectedIndex].value!='') {document.imagelib.src='..%s' + document.forms.adminForm.", $directory) . $name
+ . \sprintf(".options[selectedIndex].value!='') {document.imagelib.src='..%s' + document.forms.adminForm.", $directory) . $name
. ".options[selectedIndex].value} else {document.imagelib.src='media/system/images/blank.png'}\"";
}
diff --git a/libraries/src/HTML/Helpers/Select.php b/libraries/src/HTML/Helpers/Select.php
index 77355f716543..c255bda71e56 100644
--- a/libraries/src/HTML/Helpers/Select.php
+++ b/libraries/src/HTML/Helpers/Select.php
@@ -554,7 +554,7 @@ public static function options($arr, $optKey = 'value', $optText = 'text', $sele
$splitText = explode(' - ', (string) $text, 2);
$text = $splitText[0];
- if (isset($splitText[1]) && $splitText[1] !== '' && in_array(preg_match('/^[\s]+$/', $splitText[1]), [0, false], true)) {
+ if (isset($splitText[1]) && $splitText[1] !== '' && \in_array(preg_match('/^[\s]+$/', $splitText[1]), [0, false], true)) {
$text .= ' - ' . $splitText[1];
}
diff --git a/libraries/src/HTML/Registry.php b/libraries/src/HTML/Registry.php
index 8b894e21a5a9..31f5140114ea 100644
--- a/libraries/src/HTML/Registry.php
+++ b/libraries/src/HTML/Registry.php
@@ -108,7 +108,7 @@ final class Registry
public function getService(string $key)
{
if (!$this->hasService($key)) {
- throw new \InvalidArgumentException(sprintf("The '%s' service key is not registered.", $key));
+ throw new \InvalidArgumentException(\sprintf("The '%s' service key is not registered.", $key));
}
return $this->serviceMap[$key];
@@ -143,12 +143,12 @@ public function register(string $key, $handler, bool $replace = false)
{
// If the key exists already and we aren't instructed to replace existing services, bail early
if (isset($this->serviceMap[$key]) && !$replace) {
- throw new \RuntimeException(sprintf("The '%s' service key is already registered.", $key));
+ throw new \RuntimeException(\sprintf("The '%s' service key is already registered.", $key));
}
// If the handler is a string, it must be a class that exists
if (\is_string($handler) && !class_exists($handler)) {
- throw new \RuntimeException(sprintf("The '%s' class for service key '%s' does not exist.", $handler, $key));
+ throw new \RuntimeException(\sprintf("The '%s' class for service key '%s' does not exist.", $handler, $key));
}
// Otherwise the handler must be a class object
diff --git a/libraries/src/Help/Help.php b/libraries/src/Help/Help.php
index 0866255bda9a..563979bf6f5e 100644
--- a/libraries/src/Help/Help.php
+++ b/libraries/src/Help/Help.php
@@ -76,7 +76,7 @@ public static function createUrl($ref, $useComponent = false, $override = null,
}
// If the URL is local then make sure we have a valid file extension on the URL.
- if ($local && in_array(preg_match('#\.html$|\.xml$#i', $ref), [0, false], true)) {
+ if ($local && \in_array(preg_match('#\.html$|\.xml$#i', $ref), [0, false], true)) {
$url .= '.html';
}
diff --git a/libraries/src/Helper/HelperFactory.php b/libraries/src/Helper/HelperFactory.php
index b034226245db..4501248ba5c8 100644
--- a/libraries/src/Helper/HelperFactory.php
+++ b/libraries/src/Helper/HelperFactory.php
@@ -40,8 +40,7 @@ public function __construct(
* @since 4.0.0
*/
private string $namespace
- )
- {
+ ) {
}
/**
diff --git a/libraries/src/Helper/MediaHelper.php b/libraries/src/Helper/MediaHelper.php
index d303e5bde44a..ab1cecd2bcb8 100644
--- a/libraries/src/Helper/MediaHelper.php
+++ b/libraries/src/Helper/MediaHelper.php
@@ -56,7 +56,7 @@ public static function isImage($fileName)
{
static $imageTypes = 'xcf|odg|gif|jpg|jpeg|png|bmp|webp|avif';
- return preg_match(sprintf('/\.(?:%s)$/i', $imageTypes), $fileName);
+ return preg_match(\sprintf('/\.(?:%s)$/i', $imageTypes), $fileName);
}
/**
diff --git a/libraries/src/Helper/ModuleHelper.php b/libraries/src/Helper/ModuleHelper.php
index 60b925c57916..5e23a5e016b9 100644
--- a/libraries/src/Helper/ModuleHelper.php
+++ b/libraries/src/Helper/ModuleHelper.php
@@ -9,14 +9,14 @@
namespace Joomla\CMS\Helper;
-use Joomla\CMS\Event\Module\BeforeRenderModuleEvent;
-use Joomla\CMS\Event\Module\AfterRenderModuleEvent;
-use Joomla\CMS\Event\Module\PrepareModuleListEvent;
-use Joomla\CMS\Event\Module\AfterModuleListEvent;
-use Joomla\CMS\Event\Module\AfterCleanModuleListEvent;
use Joomla\CMS\Cache\CacheControllerFactoryInterface;
use Joomla\CMS\Cache\Controller\CallbackController;
use Joomla\CMS\Component\ComponentHelper;
+use Joomla\CMS\Event\Module\AfterCleanModuleListEvent;
+use Joomla\CMS\Event\Module\AfterModuleListEvent;
+use Joomla\CMS\Event\Module\AfterRenderModuleEvent;
+use Joomla\CMS\Event\Module\BeforeRenderModuleEvent;
+use Joomla\CMS\Event\Module\PrepareModuleListEvent;
use Joomla\CMS\Factory;
use Joomla\CMS\Filter\InputFilter;
use Joomla\CMS\Language\LanguageHelper;
diff --git a/libraries/src/Helper/PublicFolderGeneratorHelper.php b/libraries/src/Helper/PublicFolderGeneratorHelper.php
index f4df7ad7e6fa..ff2c5e766f0c 100644
--- a/libraries/src/Helper/PublicFolderGeneratorHelper.php
+++ b/libraries/src/Helper/PublicFolderGeneratorHelper.php
@@ -212,7 +212,7 @@ private function createSymlink(string $source, string $dest, string $base): void
*/
private function createFile(string $path, string $content): void
{
- if (in_array(file_put_contents($path, $content), [0, false], true)) {
+ if (\in_array(file_put_contents($path, $content), [0, false], true)) {
throw new \Exception('Unable to create the file: ' . $path);
}
}
diff --git a/libraries/src/Helper/TagsHelper.php b/libraries/src/Helper/TagsHelper.php
index 45b49f20f23a..fd0d4d686b04 100644
--- a/libraries/src/Helper/TagsHelper.php
+++ b/libraries/src/Helper/TagsHelper.php
@@ -9,7 +9,6 @@
namespace Joomla\CMS\Helper;
-use Joomla\Database\DatabaseQuery;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Table\CoreContent;
@@ -18,6 +17,7 @@
use Joomla\CMS\UCM\UCMContent;
use Joomla\CMS\UCM\UCMType;
use Joomla\Database\DatabaseInterface;
+use Joomla\Database\DatabaseQuery;
use Joomla\Database\ParameterType;
use Joomla\Utilities\ArrayHelper;
@@ -787,8 +787,8 @@ public static function getTypes($arrayType = 'objectList', $selectTypes = null,
return match ($arrayType) {
'assocList' => $db->loadAssocList(),
- 'rowList' => $db->loadRowList(),
- default => $db->loadObjectList(),
+ 'rowList' => $db->loadRowList(),
+ default => $db->loadObjectList(),
};
}
diff --git a/libraries/src/Http/HttpFactory.php b/libraries/src/Http/HttpFactory.php
index 466f274e3f6b..a99bad3de7f6 100644
--- a/libraries/src/Http/HttpFactory.php
+++ b/libraries/src/Http/HttpFactory.php
@@ -70,7 +70,7 @@ public static function getAvailableDriver($options = [], $default = null)
if (\is_null($default)) {
$availableAdapters = static::getHttpTransports();
} else {
- $default = (array) $default;
+ $default = (array) $default;
$availableAdapters = $default;
}
diff --git a/libraries/src/Http/Transport/CurlTransport.php b/libraries/src/Http/Transport/CurlTransport.php
index 403bb81c9276..96210ebeccb5 100644
--- a/libraries/src/Http/Transport/CurlTransport.php
+++ b/libraries/src/Http/Transport/CurlTransport.php
@@ -283,6 +283,6 @@ private function redirectsAllowed()
{
$curlVersion = curl_version();
// If open_basedir is enabled we also need to check if libcurl version is 7.19.4 or higher
- return in_array(\ini_get('open_basedir'), ['', '0'], true) || \ini_get('open_basedir') === false || version_compare($curlVersion['version'], '7.19.4', '>=');
+ return \in_array(\ini_get('open_basedir'), ['', '0'], true) || \ini_get('open_basedir') === false || version_compare($curlVersion['version'], '7.19.4', '>=');
}
}
diff --git a/libraries/src/Image/Image.php b/libraries/src/Image/Image.php
index 3d34568f5d55..7514f7d82480 100644
--- a/libraries/src/Image/Image.php
+++ b/libraries/src/Image/Image.php
@@ -229,7 +229,7 @@ private static function getOrientationString(int $width, int $height): string
return match (true) {
$width > $height => self::ORIENTATION_LANDSCAPE,
$width < $height => self::ORIENTATION_PORTRAIT,
- default => self::ORIENTATION_SQUARE,
+ default => self::ORIENTATION_SQUARE,
};
}
@@ -272,9 +272,9 @@ public function generateThumbs($thumbSizes, $creationMethod = self::SCALE_INSIDE
$thumbHeight = $size[1];
$thumb = match ($creationMethod) {
- self::CROP => $this->crop($thumbWidth, $thumbHeight, null, null, true),
+ self::CROP => $this->crop($thumbWidth, $thumbHeight, null, null, true),
self::CROP_RESIZE => $this->cropResize($thumbWidth, $thumbHeight, true),
- default => $this->resize($thumbWidth, $thumbHeight, true, $creationMethod),
+ default => $this->resize($thumbWidth, $thumbHeight, true, $creationMethod),
};
// Store the thumb in the results array
@@ -432,7 +432,7 @@ public function crop($width, $height, $left = null, $top = null, $createNew = tr
$ctot = 1;
}
if ($ict >= 0 && $ict < $ctot) {
- $rgba = imagecolorsforindex($this->getHandle(), $ict);
+ $rgba = imagecolorsforindex($this->getHandle(), $ict);
$color = imagecolorallocatealpha(
$handle,
$rgba['red'],
@@ -723,7 +723,7 @@ public function resize($width, $height, $createNew = true, $scaleMethod = self::
$ctot = 1;
}
if ($ict >= 0 && $ict < $ctot) {
- $rgba = imagecolorsforindex($this->getHandle(), $ict);
+ $rgba = imagecolorsforindex($this->getHandle(), $ict);
$color = imagecolorallocatealpha(
$handle,
$rgba['red'],
@@ -948,8 +948,8 @@ public function toFile($path, $type = IMAGETYPE_JPEG, array $options = [])
{
return match ($type) {
IMAGETYPE_AVIF => imageavif($this->getHandle(), $path, (\array_key_exists('quality', $options)) ? $options['quality'] : 100),
- IMAGETYPE_GIF => imagegif($this->getHandle(), $path),
- IMAGETYPE_PNG => imagepng($this->getHandle(), $path, (\array_key_exists('quality', $options)) ? $options['quality'] : 0),
+ IMAGETYPE_GIF => imagegif($this->getHandle(), $path),
+ IMAGETYPE_PNG => imagepng($this->getHandle(), $path, (\array_key_exists('quality', $options)) ? $options['quality'] : 0),
IMAGETYPE_WEBP => imagewebp($this->getHandle(), $path, (\array_key_exists('quality', $options)) ? $options['quality'] : 100),
// Case IMAGETYPE_JPEG & default
default => imagejpeg($this->getHandle(), $path, (\array_key_exists('quality', $options)) ? $options['quality'] : 100),
diff --git a/libraries/src/Input/Cookie.php b/libraries/src/Input/Cookie.php
index ebeed9a49412..58062f4a37d8 100644
--- a/libraries/src/Input/Cookie.php
+++ b/libraries/src/Input/Cookie.php
@@ -97,7 +97,7 @@ public function set($name, $value, $options = [])
// Set the cookie
if (\is_array($value)) {
foreach ($value as $key => $val) {
- setcookie($name . sprintf('[%s]', $key), (string) $val, $options);
+ setcookie($name . \sprintf('[%s]', $key), (string) $val, $options);
}
} else {
setcookie($name, (string) $value, $options);
diff --git a/libraries/src/Installer/Adapter/ComponentAdapter.php b/libraries/src/Installer/Adapter/ComponentAdapter.php
index 591f07b4975d..052d1b45c9a2 100644
--- a/libraries/src/Installer/Adapter/ComponentAdapter.php
+++ b/libraries/src/Installer/Adapter/ComponentAdapter.php
@@ -9,7 +9,6 @@
namespace Joomla\CMS\Installer\Adapter;
-use Joomla\CMS\Table\Menu;
use Joomla\CMS\Application\ApplicationHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Installer\Installer;
@@ -18,6 +17,7 @@
use Joomla\CMS\Log\Log;
use Joomla\CMS\Table\Asset;
use Joomla\CMS\Table\Extension;
+use Joomla\CMS\Table\Menu;
use Joomla\CMS\Table\Table;
use Joomla\CMS\Table\Update;
use Joomla\Database\ParameterType;
@@ -527,9 +527,9 @@ public function loadLanguage($path = null)
$source = $this->parent->getPath('source');
$client = match ($this->parent->extension->client_id) {
- 0 => JPATH_SITE,
- 1 => JPATH_ADMINISTRATOR,
- 3 => JPATH_API,
+ 0 => JPATH_SITE,
+ 1 => JPATH_ADMINISTRATOR,
+ 3 => JPATH_API,
default => throw new \InvalidArgumentException(
\sprintf(
'Unsupported client ID %d for component %s',
diff --git a/libraries/src/Installer/Adapter/LanguageAdapter.php b/libraries/src/Installer/Adapter/LanguageAdapter.php
index de15eb543c99..9fe383f3fbc4 100644
--- a/libraries/src/Installer/Adapter/LanguageAdapter.php
+++ b/libraries/src/Installer/Adapter/LanguageAdapter.php
@@ -9,7 +9,6 @@
namespace Joomla\CMS\Installer\Adapter;
-use Joomla\CMS\Table\Extension;
use Joomla\CMS\Application\ApplicationHelper;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
@@ -20,6 +19,7 @@
use Joomla\CMS\Language\LanguageHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Log\Log;
+use Joomla\CMS\Table\Extension;
use Joomla\CMS\Table\Table;
use Joomla\CMS\Table\Update;
use Joomla\Database\ParameterType;
diff --git a/libraries/src/Installer/Adapter/ModuleAdapter.php b/libraries/src/Installer/Adapter/ModuleAdapter.php
index fd4aded410ed..134e243b992f 100644
--- a/libraries/src/Installer/Adapter/ModuleAdapter.php
+++ b/libraries/src/Installer/Adapter/ModuleAdapter.php
@@ -9,12 +9,12 @@
namespace Joomla\CMS\Installer\Adapter;
-use Joomla\CMS\Table\Module;
use Joomla\CMS\Application\ApplicationHelper;
use Joomla\CMS\Installer\Installer;
use Joomla\CMS\Installer\InstallerAdapter;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Log\Log;
+use Joomla\CMS\Table\Module;
use Joomla\CMS\Table\Table;
use Joomla\Database\ParameterType;
use Joomla\Filesystem\Folder;
@@ -128,8 +128,8 @@ public function discover()
$admin_info = ApplicationHelper::getClientInfo('administrator', true);
foreach ($site_list as $module) {
- if (file_exists(JPATH_SITE . sprintf('/modules/%s/%s.xml', $module, $module))) {
- $manifest_details = Installer::parseXMLInstallFile(JPATH_SITE . sprintf('/modules/%s/%s.xml', $module, $module));
+ if (file_exists(JPATH_SITE . \sprintf('/modules/%s/%s.xml', $module, $module))) {
+ $manifest_details = Installer::parseXMLInstallFile(JPATH_SITE . \sprintf('/modules/%s/%s.xml', $module, $module));
$extension = Table::getInstance('extension');
$extension->type = 'module';
$extension->client_id = $site_info->id;
@@ -144,8 +144,8 @@ public function discover()
}
foreach ($admin_list as $module) {
- if (file_exists(JPATH_ADMINISTRATOR . sprintf('/modules/%s/%s.xml', $module, $module))) {
- $manifest_details = Installer::parseXMLInstallFile(JPATH_ADMINISTRATOR . sprintf('/modules/%s/%s.xml', $module, $module));
+ if (file_exists(JPATH_ADMINISTRATOR . \sprintf('/modules/%s/%s.xml', $module, $module))) {
+ $manifest_details = Installer::parseXMLInstallFile(JPATH_ADMINISTRATOR . \sprintf('/modules/%s/%s.xml', $module, $module));
$extension = Table::getInstance('extension');
$extension->type = 'module';
$extension->client_id = $admin_info->id;
diff --git a/libraries/src/Installer/Adapter/PluginAdapter.php b/libraries/src/Installer/Adapter/PluginAdapter.php
index c9d678592ba6..bd06f074f767 100644
--- a/libraries/src/Installer/Adapter/PluginAdapter.php
+++ b/libraries/src/Installer/Adapter/PluginAdapter.php
@@ -300,12 +300,12 @@ public function loadLanguage($path = null)
}
if ($name !== '' && $name !== '0') {
- $extension = sprintf('plg_%s_%s', $group, $name);
- $source = $path ?: JPATH_PLUGINS . sprintf('/%s/%s', $group, $name);
+ $extension = \sprintf('plg_%s_%s', $group, $name);
+ $source = $path ?: JPATH_PLUGINS . \sprintf('/%s/%s', $group, $name);
$folder = (string) $element->attributes()->folder;
- if ($folder && file_exists(sprintf('%s/%s', $path, $folder))) {
- $source = sprintf('%s/%s', $path, $folder);
+ if ($folder && file_exists(\sprintf('%s/%s', $path, $folder))) {
+ $source = \sprintf('%s/%s', $path, $folder);
}
$this->doLoadLanguage($extension, $source, JPATH_ADMINISTRATOR);
diff --git a/libraries/src/Installer/Adapter/TemplateAdapter.php b/libraries/src/Installer/Adapter/TemplateAdapter.php
index 2212ed3d0e36..0f8b9acccbbb 100644
--- a/libraries/src/Installer/Adapter/TemplateAdapter.php
+++ b/libraries/src/Installer/Adapter/TemplateAdapter.php
@@ -612,13 +612,13 @@ public function discover()
$admin_info = ApplicationHelper::getClientInfo('administrator', true);
foreach ($site_list as $template) {
- if (file_exists(JPATH_SITE . sprintf('/templates/%s/templateDetails.xml', $template))) {
+ if (file_exists(JPATH_SITE . \sprintf('/templates/%s/templateDetails.xml', $template))) {
if ($template === 'system') {
// Ignore special system template
continue;
}
- $manifest_details = Installer::parseXMLInstallFile(JPATH_SITE . sprintf('/templates/%s/templateDetails.xml', $template));
+ $manifest_details = Installer::parseXMLInstallFile(JPATH_SITE . \sprintf('/templates/%s/templateDetails.xml', $template));
$extension = Table::getInstance('extension');
$extension->type = 'template';
$extension->client_id = $site_info->id;
@@ -633,13 +633,13 @@ public function discover()
}
foreach ($admin_list as $template) {
- if (file_exists(JPATH_ADMINISTRATOR . sprintf('/templates/%s/templateDetails.xml', $template))) {
+ if (file_exists(JPATH_ADMINISTRATOR . \sprintf('/templates/%s/templateDetails.xml', $template))) {
if ($template === 'system') {
// Ignore special system template
continue;
}
- $manifest_details = Installer::parseXMLInstallFile(JPATH_ADMINISTRATOR . sprintf('/templates/%s/templateDetails.xml', $template));
+ $manifest_details = Installer::parseXMLInstallFile(JPATH_ADMINISTRATOR . \sprintf('/templates/%s/templateDetails.xml', $template));
$extension = Table::getInstance('extension');
$extension->type = 'template';
$extension->client_id = $admin_info->id;
diff --git a/libraries/src/Installer/InstallerAdapter.php b/libraries/src/Installer/InstallerAdapter.php
index da2007ad9537..d296d038050a 100644
--- a/libraries/src/Installer/InstallerAdapter.php
+++ b/libraries/src/Installer/InstallerAdapter.php
@@ -984,7 +984,7 @@ protected function setupScriptfile()
$container->set(
InstallerScriptInterface::class,
- fn(Container $container) => new LegacyInstallerScript(new $classname($this))
+ fn (Container $container) => new LegacyInstallerScript(new $classname($this))
);
}
diff --git a/libraries/src/Installer/LegacyInstallerScript.php b/libraries/src/Installer/LegacyInstallerScript.php
index cceca5e65f9f..5fb1d270a573 100644
--- a/libraries/src/Installer/LegacyInstallerScript.php
+++ b/libraries/src/Installer/LegacyInstallerScript.php
@@ -36,8 +36,7 @@ public function __construct(
* @since 4.2.0
*/
private $installerScript
- )
- {
+ ) {
}
/**
diff --git a/libraries/src/Language/Language.php b/libraries/src/Language/Language.php
index 77a28e5f8a87..dfda96a070a6 100644
--- a/libraries/src/Language/Language.php
+++ b/libraries/src/Language/Language.php
@@ -131,16 +131,16 @@ public function __construct($lang = null, $debug = false)
if (\defined('JPATH_SITE')) {
// Note: Manual indexing to enforce load order.
- $paths[0] = JPATH_SITE . sprintf('/language/overrides/%s.localise.php', $lang);
- $paths[2] = JPATH_SITE . sprintf('/language/%s/localise.php', $lang);
- $paths[4] = JPATH_SITE . sprintf('/language/%s/%s.localise.php', $lang, $lang);
+ $paths[0] = JPATH_SITE . \sprintf('/language/overrides/%s.localise.php', $lang);
+ $paths[2] = JPATH_SITE . \sprintf('/language/%s/localise.php', $lang);
+ $paths[4] = JPATH_SITE . \sprintf('/language/%s/%s.localise.php', $lang, $lang);
}
if (\defined('JPATH_ADMINISTRATOR')) {
// Note: Manual indexing to enforce load order.
- $paths[1] = JPATH_ADMINISTRATOR . sprintf('/language/overrides/%s.localise.php', $lang);
- $paths[3] = JPATH_ADMINISTRATOR . sprintf('/language/%s/localise.php', $lang);
- $paths[5] = JPATH_ADMINISTRATOR . sprintf('/language/%s/%s.localise.php', $lang, $lang);
+ $paths[1] = JPATH_ADMINISTRATOR . \sprintf('/language/overrides/%s.localise.php', $lang);
+ $paths[3] = JPATH_ADMINISTRATOR . \sprintf('/language/%s/localise.php', $lang);
+ $paths[5] = JPATH_ADMINISTRATOR . \sprintf('/language/%s/%s.localise.php', $lang, $lang);
}
ksort($paths);
@@ -262,7 +262,7 @@ public function _($string, $jsSafe = false, $interpretBackSlashes = true)
$this->orphans[$key] = [];
}
$this->orphans[$key][] = $info;
- $string = '??' . $string . '??';
+ $string = '??' . $string . '??';
}
if ($jsSafe) {
@@ -297,7 +297,7 @@ public function transliterate($string)
$string = \call_user_func($this->transliterator, $string);
// Check if all symbols were transliterated (contains only ASCII), otherwise continue
- if (in_array(preg_match('/[\\x80-\\xff]/', (string) $string), [0, false], true)) {
+ if (\in_array(preg_match('/[\\x80-\\xff]/', (string) $string), [0, false], true)) {
return $string;
}
}
@@ -629,11 +629,11 @@ public function load($extension = 'joomla', $basePath = JPATH_BASE, $lang = null
if ($internal) {
$filenames[] = $path . '/joomla.ini';
- $filenames[] = sprintf('%s/%s.ini', $path, $lang);
+ $filenames[] = \sprintf('%s/%s.ini', $path, $lang);
} else {
// Try first without a language-prefixed filename.
- $filenames[] = sprintf('%s/%s.ini', $path, $extension);
- $filenames[] = sprintf('%s/%s.%s.ini', $path, $lang, $extension);
+ $filenames[] = \sprintf('%s/%s.ini', $path, $extension);
+ $filenames[] = \sprintf('%s/%s.%s.ini', $path, $lang, $extension);
}
foreach ($filenames as $filename) {
@@ -770,7 +770,7 @@ public function debugFile(string $filename): int
}
// Check that the line passes the necessary format.
- if (in_array(preg_match('#^[A-Z][A-Z0-9_:\*\-\.]*\s*=\s*".*"(\s*;.*)?$#', $line), [0, false], true)) {
+ if (\in_array(preg_match('#^[A-Z][A-Z0-9_:\*\-\.]*\s*=\s*".*"(\s*;.*)?$#', $line), [0, false], true)) {
$errors[] = $realNumber;
continue;
}
diff --git a/libraries/src/Language/Text.php b/libraries/src/Language/Text.php
index aede20ab9689..70712f21bdc4 100644
--- a/libraries/src/Language/Text.php
+++ b/libraries/src/Language/Text.php
@@ -110,7 +110,7 @@ private static function passSprintf(&$string, $jsSafe = false, $interpretBackSla
$first_part = preg_replace('/\[\[%(\d+):[^\]]*\]\]/', '%\1$s', $first_part);
// Check if string contains sprintf placeholders
- if (in_array(preg_match('/%(\d+\$)?s/', (string) $first_part), [0, false], true)) {
+ if (\in_array(preg_match('/%(\d+\$)?s/', (string) $first_part), [0, false], true)) {
return false;
}
@@ -221,7 +221,7 @@ public static function plural($string, $n)
);
if (\array_key_exists('script', $args[$count - 1]) && $args[$count - 1]['script']) {
- static::$strings[$key] = sprintf(...$args);
+ static::$strings[$key] = \sprintf(...$args);
return $key;
}
@@ -229,7 +229,7 @@ public static function plural($string, $n)
$args[0] = $lang->_($key);
}
- return sprintf(...$args);
+ return \sprintf(...$args);
}
/**
@@ -267,7 +267,7 @@ public static function sprintf($string)
);
if (\array_key_exists('script', $args[$count - 1]) && $args[$count - 1]['script']) {
- static::$strings[$string] = sprintf(...$args);
+ static::$strings[$string] = \sprintf(...$args);
return $string;
}
@@ -278,7 +278,7 @@ public static function sprintf($string)
// Replace custom named placeholders with sprintf style placeholders
$args[0] = preg_replace('/\[\[%(\d+):[^\]]*\]\]/', '%\1$s', $args[0]);
- return sprintf(...$args);
+ return \sprintf(...$args);
}
/**
diff --git a/libraries/src/Log/DelegatingPsrLogger.php b/libraries/src/Log/DelegatingPsrLogger.php
index 745f412b87d1..60c847c247d6 100644
--- a/libraries/src/Log/DelegatingPsrLogger.php
+++ b/libraries/src/Log/DelegatingPsrLogger.php
@@ -56,8 +56,7 @@ public function __construct(
* @since 3.8.0
*/
private readonly Log $logger
- )
- {
+ ) {
}
/**
diff --git a/libraries/src/Log/LoggerRegistry.php b/libraries/src/Log/LoggerRegistry.php
index 0c1aafcc0aef..20bd342f00ba 100644
--- a/libraries/src/Log/LoggerRegistry.php
+++ b/libraries/src/Log/LoggerRegistry.php
@@ -13,10 +13,10 @@
use Joomla\CMS\Log\Logger\DatabaseLogger;
use Joomla\CMS\Log\Logger\EchoLogger;
use Joomla\CMS\Log\Logger\FormattedtextLogger;
+use Joomla\CMS\Log\Logger\InMemoryLogger;
use Joomla\CMS\Log\Logger\MessagequeueLogger;
use Joomla\CMS\Log\Logger\SyslogLogger;
use Joomla\CMS\Log\Logger\W3cLogger;
-use Joomla\CMS\Log\Logger\InMemoryLogger;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
@@ -59,7 +59,7 @@ final class LoggerRegistry
public function getLoggerClass(string $key): string
{
if (!$this->hasLogger($key)) {
- throw new \InvalidArgumentException(sprintf("The '%s' key is not registered.", $key));
+ throw new \InvalidArgumentException(\sprintf("The '%s' key is not registered.", $key));
}
return $this->loggerMap[$key];
@@ -94,12 +94,12 @@ public function register(string $key, string $class, bool $replace = false)
{
// If the key exists already and we aren't instructed to replace existing services, bail early
if (isset($this->loggerMap[$key]) && !$replace) {
- throw new \RuntimeException(sprintf("The '%s' key is already registered.", $key));
+ throw new \RuntimeException(\sprintf("The '%s' key is already registered.", $key));
}
// The class must exist
if (!class_exists($class)) {
- throw new \RuntimeException(sprintf("The '%s' class for key '%s' does not exist.", $class, $key));
+ throw new \RuntimeException(\sprintf("The '%s' class for key '%s' does not exist.", $class, $key));
}
$this->loggerMap[$key] = $class;
diff --git a/libraries/src/MVC/Controller/AdminController.php b/libraries/src/MVC/Controller/AdminController.php
index 499540119885..3bde4c7d91ad 100644
--- a/libraries/src/MVC/Controller/AdminController.php
+++ b/libraries/src/MVC/Controller/AdminController.php
@@ -116,7 +116,7 @@ public function __construct($config = [], ?MVCFactoryInterface $factory = null,
if ($reflect->getNamespaceName() !== '' && $reflect->getNamespaceName() !== '0') {
$r[2] = str_replace('Controller', '', $r[2]);
- } elseif (in_array(preg_match('/(.*)Controller(.*)/i', $reflect->getShortName(), $r), [0, false], true)) {
+ } elseif (\in_array(preg_match('/(.*)Controller(.*)/i', $reflect->getShortName(), $r), [0, false], true)) {
throw new \Exception(Text::sprintf('JLIB_APPLICATION_ERROR_GET_NAME', __METHOD__), 500);
}
diff --git a/libraries/src/MVC/Controller/ApiController.php b/libraries/src/MVC/Controller/ApiController.php
index 94a171520e7b..b8641ad615d4 100644
--- a/libraries/src/MVC/Controller/ApiController.php
+++ b/libraries/src/MVC/Controller/ApiController.php
@@ -9,21 +9,21 @@
namespace Joomla\CMS\MVC\Controller;
-use Joomla\CMS\MVC\Controller\Exception\ResourceNotFound;
-use Joomla\CMS\MVC\Controller\Exception\CheckinCheckout;
-use Joomla\CMS\MVC\Controller\Exception\Save;
-use Joomla\Registry\Registry;
-use Joomla\CMS\MVC\Model\AdminModel;
use Joomla\CMS\Access\Exception\NotAllowed;
use Joomla\CMS\Application\CMSWebApplicationInterface;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
+use Joomla\CMS\MVC\Controller\Exception\CheckinCheckout;
+use Joomla\CMS\MVC\Controller\Exception\ResourceNotFound;
+use Joomla\CMS\MVC\Controller\Exception\Save;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
+use Joomla\CMS\MVC\Model\AdminModel;
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\CMS\MVC\View\JsonApiView;
use Joomla\CMS\Object\CMSObject;
use Joomla\Input\Input;
+use Joomla\Registry\Registry;
use Joomla\String\Inflector;
use Tobscure\JsonApi\Exception\InvalidParameterException;
@@ -129,7 +129,7 @@ public function __construct($config = [], ?MVCFactoryInterface $factory = null,
if (empty($this->context)) {
$r = null;
- if (in_array(preg_match('/(.*)Controller(.*)/i', static::class, $r), [0, false], true)) {
+ if (\in_array(preg_match('/(.*)Controller(.*)/i', static::class, $r), [0, false], true)) {
throw new \Exception(Text::sprintf('JLIB_APPLICATION_ERROR_GET_NAME', __METHOD__), 500);
}
diff --git a/libraries/src/MVC/Controller/BaseController.php b/libraries/src/MVC/Controller/BaseController.php
index 5ec71f0a5ab6..b24dd4fb4119 100644
--- a/libraries/src/MVC/Controller/BaseController.php
+++ b/libraries/src/MVC/Controller/BaseController.php
@@ -9,10 +9,10 @@
namespace Joomla\CMS\MVC\Controller;
-use Joomla\CMS\Cache\Controller\ViewController;
use Joomla\Application\AbstractApplication;
use Joomla\CMS\Application\CMSApplicationInterface;
use Joomla\CMS\Application\CMSWebApplicationInterface;
+use Joomla\CMS\Cache\Controller\ViewController;
use Joomla\CMS\Cache\Exception\CacheExceptionInterface;
use Joomla\CMS\Document\DocumentAwareInterface;
use Joomla\CMS\Factory;
@@ -777,7 +777,7 @@ public function getName()
if (empty($this->name)) {
$r = null;
- if (in_array(preg_match('/(.*)Controller/i', static::class, $r), [0, false], true)) {
+ if (\in_array(preg_match('/(.*)Controller/i', static::class, $r), [0, false], true)) {
throw new \Exception(Text::sprintf('JLIB_APPLICATION_ERROR_GET_NAME', __METHOD__), 500);
}
diff --git a/libraries/src/MVC/Controller/FormController.php b/libraries/src/MVC/Controller/FormController.php
index 20276c8e9f6c..8dd9a080db27 100644
--- a/libraries/src/MVC/Controller/FormController.php
+++ b/libraries/src/MVC/Controller/FormController.php
@@ -9,11 +9,11 @@
namespace Joomla\CMS\MVC\Controller;
-use Joomla\CMS\Event\Model\NormaliseRequestDataEvent;
-use Joomla\CMS\Form\Form;
use Doctrine\Inflector\InflectorFactory;
use Joomla\CMS\Application\CMSWebApplicationInterface;
use Joomla\CMS\Component\ComponentHelper;
+use Joomla\CMS\Event\Model\NormaliseRequestDataEvent;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Form\FormFactoryAwareInterface;
use Joomla\CMS\Form\FormFactoryAwareTrait;
use Joomla\CMS\Form\FormFactoryInterface;
@@ -36,8 +36,8 @@
*/
class FormController extends BaseController implements FormFactoryAwareInterface
{
- public $extension;
use FormFactoryAwareTrait;
+ public $extension;
/**
* The Application. Redeclared to show this class requires a web application.
@@ -131,7 +131,7 @@ public function __construct(
$match .= '\\\\';
}
- if (in_array(preg_match('/(.*)' . $match . '(.*)/i', static::class, $r), [0, false], true)) {
+ if (\in_array(preg_match('/(.*)' . $match . '(.*)/i', static::class, $r), [0, false], true)) {
throw new \Exception(Text::sprintf('JLIB_APPLICATION_ERROR_GET_NAME', __METHOD__), 500);
}
@@ -168,7 +168,7 @@ public function __construct(
*/
public function add()
{
- $context = sprintf('%s.edit.%s', $this->option, $this->context);
+ $context = \sprintf('%s.edit.%s', $this->option, $this->context);
// Access check.
if (!$this->allowAdd()) {
@@ -315,7 +315,7 @@ public function cancel($key = null)
$model = $this->getModel();
$table = $model->getTable();
- $context = sprintf('%s.edit.%s', $this->option, $this->context);
+ $context = \sprintf('%s.edit.%s', $this->option, $this->context);
if (empty($key)) {
$key = $table->getKeyName();
@@ -378,7 +378,7 @@ public function edit($key = null, $urlVar = null)
$model = $this->getModel();
$table = $model->getTable();
$cid = (array) $this->input->post->get('cid', [], 'int');
- $context = sprintf('%s.edit.%s', $this->option, $this->context);
+ $context = \sprintf('%s.edit.%s', $this->option, $this->context);
// Determine the name of the primary key for the data.
if (empty($key)) {
@@ -557,7 +557,7 @@ public function save($key = null, $urlVar = null)
$table = $model->getTable();
$data = $this->input->post->get('jform', [], 'array');
$checkin = $table->hasField('checked_out');
- $context = sprintf('%s.edit.%s', $this->option, $this->context);
+ $context = \sprintf('%s.edit.%s', $this->option, $this->context);
$task = $this->getTask();
// Determine the name of the primary key for the data.
diff --git a/libraries/src/MVC/Factory/LegacyFactory.php b/libraries/src/MVC/Factory/LegacyFactory.php
index 984a9bcc9d23..c397faccab1c 100644
--- a/libraries/src/MVC/Factory/LegacyFactory.php
+++ b/libraries/src/MVC/Factory/LegacyFactory.php
@@ -9,13 +9,13 @@
namespace Joomla\CMS\MVC\Factory;
-use Joomla\CMS\MVC\Controller\ControllerInterface;
-use Joomla\CMS\MVC\View\ViewInterface;
use Joomla\CMS\Application\CMSApplicationInterface;
use Joomla\CMS\Language\Text;
use Joomla\CMS\MVC\Controller\BaseController;
+use Joomla\CMS\MVC\Controller\ControllerInterface;
use Joomla\CMS\MVC\Model\BaseDatabaseModel;
use Joomla\CMS\MVC\Model\ModelInterface;
+use Joomla\CMS\MVC\View\ViewInterface;
use Joomla\CMS\Table\Table;
use Joomla\Filesystem\Path;
use Joomla\Input\Input;
diff --git a/libraries/src/MVC/Factory/MVCFactory.php b/libraries/src/MVC/Factory/MVCFactory.php
index 82a98e10dddb..0d526576f14a 100644
--- a/libraries/src/MVC/Factory/MVCFactory.php
+++ b/libraries/src/MVC/Factory/MVCFactory.php
@@ -9,9 +9,6 @@
namespace Joomla\CMS\MVC\Factory;
-use Joomla\CMS\MVC\Controller\ControllerInterface;
-use Joomla\CMS\MVC\View\ViewInterface;
-use Joomla\CMS\Table\Table;
use Joomla\CMS\Application\CMSApplicationInterface;
use Joomla\CMS\Cache\CacheControllerFactoryAwareInterface;
use Joomla\CMS\Cache\CacheControllerFactoryAwareTrait;
@@ -20,9 +17,12 @@
use Joomla\CMS\Form\FormFactoryAwareTrait;
use Joomla\CMS\Mail\MailerFactoryAwareInterface;
use Joomla\CMS\Mail\MailerFactoryAwareTrait;
+use Joomla\CMS\MVC\Controller\ControllerInterface;
use Joomla\CMS\MVC\Model\ModelInterface;
+use Joomla\CMS\MVC\View\ViewInterface;
use Joomla\CMS\Router\SiteRouterAwareInterface;
use Joomla\CMS\Router\SiteRouterAwareTrait;
+use Joomla\CMS\Table\Table;
use Joomla\CMS\User\UserFactoryAwareInterface;
use Joomla\CMS\User\UserFactoryAwareTrait;
use Joomla\Database\DatabaseAwareInterface;
@@ -76,8 +76,7 @@ public function __construct(
* @since 4.0.0
*/
private ?LoggerInterface $logger = null
- )
- {
+ ) {
}
/**
diff --git a/libraries/src/MVC/Factory/MVCFactoryInterface.php b/libraries/src/MVC/Factory/MVCFactoryInterface.php
index 5f83ce774a43..e87436c7b821 100644
--- a/libraries/src/MVC/Factory/MVCFactoryInterface.php
+++ b/libraries/src/MVC/Factory/MVCFactoryInterface.php
@@ -9,11 +9,11 @@
namespace Joomla\CMS\MVC\Factory;
+use Joomla\CMS\Application\CMSApplicationInterface;
use Joomla\CMS\MVC\Controller\ControllerInterface;
+use Joomla\CMS\MVC\Model\ModelInterface;
use Joomla\CMS\MVC\View\ViewInterface;
use Joomla\CMS\Table\Table;
-use Joomla\CMS\Application\CMSApplicationInterface;
-use Joomla\CMS\MVC\Model\ModelInterface;
use Joomla\Input\Input;
// phpcs:disable PSR1.Files.SideEffects
diff --git a/libraries/src/MVC/Model/AdminModel.php b/libraries/src/MVC/Model/AdminModel.php
index b88cc43144b4..2d2b316487d2 100644
--- a/libraries/src/MVC/Model/AdminModel.php
+++ b/libraries/src/MVC/Model/AdminModel.php
@@ -9,15 +9,15 @@
namespace Joomla\CMS\MVC\Model;
-use Joomla\CMS\Event\Model\BeforeBatchEvent;
+use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Event\AbstractEvent;
-use Joomla\CMS\Event\Model\BeforeDeleteEvent;
+use Joomla\CMS\Event\Model\AfterChangeStateEvent;
use Joomla\CMS\Event\Model\AfterDeleteEvent;
+use Joomla\CMS\Event\Model\AfterSaveEvent;
+use Joomla\CMS\Event\Model\BeforeBatchEvent;
use Joomla\CMS\Event\Model\BeforeChangeStateEvent;
-use Joomla\CMS\Event\Model\AfterChangeStateEvent;
+use Joomla\CMS\Event\Model\BeforeDeleteEvent;
use Joomla\CMS\Event\Model\BeforeSaveEvent;
-use Joomla\CMS\Event\Model\AfterSaveEvent;
-use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\FormFactoryInterface;
use Joomla\CMS\Language\Associations;
diff --git a/libraries/src/MVC/Model/BaseDatabaseModel.php b/libraries/src/MVC/Model/BaseDatabaseModel.php
index fec0401ae5fa..95b3918c04ab 100644
--- a/libraries/src/MVC/Model/BaseDatabaseModel.php
+++ b/libraries/src/MVC/Model/BaseDatabaseModel.php
@@ -90,7 +90,7 @@ public function __construct($config = [], ?MVCFactoryInterface $factory = null)
if (empty($this->option)) {
$r = null;
- if (in_array(preg_match('/(.*)Model/i', static::class, $r), [0, false], true)) {
+ if (\in_array(preg_match('/(.*)Model/i', static::class, $r), [0, false], true)) {
throw new \Exception(Text::sprintf('JLIB_APPLICATION_ERROR_GET_NAME', __METHOD__), 500);
}
diff --git a/libraries/src/MVC/Model/BaseModel.php b/libraries/src/MVC/Model/BaseModel.php
index 5b0bebb9b193..f1be39d01f8c 100644
--- a/libraries/src/MVC/Model/BaseModel.php
+++ b/libraries/src/MVC/Model/BaseModel.php
@@ -135,7 +135,7 @@ public function getName()
if (empty($this->name)) {
$r = null;
- if (in_array(preg_match('/Model(.*)/i', static::class, $r), [0, false], true)) {
+ if (\in_array(preg_match('/Model(.*)/i', static::class, $r), [0, false], true)) {
throw new \Exception(Text::sprintf('JLIB_APPLICATION_ERROR_GET_NAME', __METHOD__), 500);
}
diff --git a/libraries/src/MVC/View/CategoryView.php b/libraries/src/MVC/View/CategoryView.php
index b05ec560455c..fda646463b66 100644
--- a/libraries/src/MVC/View/CategoryView.php
+++ b/libraries/src/MVC/View/CategoryView.php
@@ -9,14 +9,14 @@
namespace Joomla\CMS\MVC\View;
-use Joomla\Registry\Registry;
-use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Categories\CategoryNode;
use Joomla\CMS\Factory;
use Joomla\CMS\Helper\TagsHelper;
use Joomla\CMS\Language\Text;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Router\Route;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/libraries/src/MVC/View/Event/OnGetApiFields.php b/libraries/src/MVC/View/Event/OnGetApiFields.php
index 76cc36ca838b..8342238225e2 100644
--- a/libraries/src/MVC/View/Event/OnGetApiFields.php
+++ b/libraries/src/MVC/View/Event/OnGetApiFields.php
@@ -93,7 +93,7 @@ public function __construct($name, array $arguments = [])
protected function setType($value)
{
if (!\in_array($value, [self::ITEM, self::LIST])) {
- throw new \BadMethodCallException(sprintf("Argument 'type' of event %s must be a valid value", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'type' of event %s must be a valid value", $this->name));
}
return $value;
@@ -111,7 +111,7 @@ protected function setType($value)
protected function setFields($value)
{
if (!\is_array($value) || $value === []) {
- throw new \BadMethodCallException(sprintf("Argument 'fields' of event %s must be be an array and not empty", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'fields' of event %s must be be an array and not empty", $this->name));
}
return $value;
@@ -129,7 +129,7 @@ protected function setFields($value)
protected function setRelations($value)
{
if (!\is_array($value)) {
- throw new \BadMethodCallException(sprintf("Argument 'relations' of event %s must be be an array", $this->name));
+ throw new \BadMethodCallException(\sprintf("Argument 'relations' of event %s must be be an array", $this->name));
}
return $value;
diff --git a/libraries/src/MVC/View/FormView.php b/libraries/src/MVC/View/FormView.php
index 60ea647c0e70..87a61a3cd999 100644
--- a/libraries/src/MVC/View/FormView.php
+++ b/libraries/src/MVC/View/FormView.php
@@ -9,13 +9,13 @@
namespace Joomla\CMS\MVC\View;
-use Joomla\Registry\Registry;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Table\TableInterface;
use Joomla\CMS\Toolbar\ToolbarHelper;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/libraries/src/MVC/View/HtmlView.php b/libraries/src/MVC/View/HtmlView.php
index eaf639152394..08d34329b6f7 100644
--- a/libraries/src/MVC/View/HtmlView.php
+++ b/libraries/src/MVC/View/HtmlView.php
@@ -32,13 +32,13 @@
*/
class HtmlView extends AbstractView implements CurrentUserInterface
{
+ use CurrentUserTrait;
/**
* @var string
*/
public $baseurl;
public $this;
public $form;
- use CurrentUserTrait;
/**
* The base path of the view
@@ -533,7 +533,7 @@ protected function _createFileName($type, $parts = [])
{
return match ($type) {
'template' => strtolower((string) $parts['name']) . '.' . $this->_layoutExt,
- default => strtolower((string) $parts['name']) . '.php',
+ default => strtolower((string) $parts['name']) . '.php',
};
}
diff --git a/libraries/src/MVC/View/JsonApiView.php b/libraries/src/MVC/View/JsonApiView.php
index 9ddf91818bab..67cf0fcf6050 100644
--- a/libraries/src/MVC/View/JsonApiView.php
+++ b/libraries/src/MVC/View/JsonApiView.php
@@ -9,10 +9,10 @@
namespace Joomla\CMS\MVC\View;
-use Joomla\CMS\MVC\Model\ListModel;
-use Joomla\CMS\MVC\Model\AdminModel;
use Joomla\CMS\Document\JsonapiDocument;
use Joomla\CMS\Factory;
+use Joomla\CMS\MVC\Model\AdminModel;
+use Joomla\CMS\MVC\Model\ListModel;
use Joomla\CMS\MVC\View\Event\OnGetApiFields;
use Joomla\CMS\Router\Exception\RouteNotFoundException;
use Joomla\CMS\Serializer\JoomlaSerializer;
diff --git a/libraries/src/MVC/View/ListView.php b/libraries/src/MVC/View/ListView.php
index db746a63a542..a3e922670def 100644
--- a/libraries/src/MVC/View/ListView.php
+++ b/libraries/src/MVC/View/ListView.php
@@ -9,12 +9,12 @@
namespace Joomla\CMS\MVC\View;
-use Joomla\CMS\Pagination\Pagination;
-use Joomla\CMS\Form\Form;
use Doctrine\Inflector\InflectorFactory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
+use Joomla\CMS\Pagination\Pagination;
use Joomla\CMS\Toolbar\ToolbarHelper;
use Joomla\Registry\Registry;
diff --git a/libraries/src/Mail/Exception/MailDisabledException.php b/libraries/src/Mail/Exception/MailDisabledException.php
index 86311a7d3923..ffd9821e45ae 100644
--- a/libraries/src/Mail/Exception/MailDisabledException.php
+++ b/libraries/src/Mail/Exception/MailDisabledException.php
@@ -51,8 +51,11 @@ public function __construct(/**
*
* @since 4.0.0
*/
- private readonly string $reason, string $message = '', int $code = 0, ?\Throwable $previous = null)
- {
+ private readonly string $reason,
+ string $message = '',
+ int $code = 0,
+ ?\Throwable $previous = null
+ ) {
parent::__construct($message, $code, $previous);
}
diff --git a/libraries/src/Mail/MailHelper.php b/libraries/src/Mail/MailHelper.php
index 3e8438b1b77f..0f4b7ad29ac8 100644
--- a/libraries/src/Mail/MailHelper.php
+++ b/libraries/src/Mail/MailHelper.php
@@ -134,9 +134,9 @@ public static function isEmailAddress($email)
* Also, period should not appear 2 or more times consecutively
*/
$allowed = "a-zA-Z0-9.!#$%&'*+\/=?^_`{|}~-";
- $regex = sprintf('/^[%s][\.%s]{0,63}$/', $allowed, $allowed);
+ $regex = \sprintf('/^[%s][\.%s]{0,63}$/', $allowed, $allowed);
- if (in_array(preg_match($regex, $local), [0, false], true) || str_ends_with($local, '.') || $local[0] === '.' || preg_match('/\.\./', $local)) {
+ if (\in_array(preg_match($regex, $local), [0, false], true) || str_ends_with($local, '.') || $local[0] === '.' || preg_match('/\.\./', $local)) {
return false;
}
@@ -168,7 +168,7 @@ public static function isEmailAddress($email)
}
// Check for invalid characters
- if (in_array(preg_match($regex, $domain), [0, false], true)) {
+ if (\in_array(preg_match($regex, $domain), [0, false], true)) {
return false;
}
@@ -261,8 +261,8 @@ private static function checkContent($content)
$message = match (preg_last_error()) {
PREG_BACKTRACK_LIMIT_ERROR => 'PHP regular expression limit reached (pcre.backtrack_limit)',
PREG_RECURSION_LIMIT_ERROR => 'PHP regular expression limit reached (pcre.recursion_limit)',
- PREG_BAD_UTF8_ERROR => 'Bad UTF8 passed to PCRE function',
- default => 'Unknown PCRE error calling PCRE function',
+ PREG_BAD_UTF8_ERROR => 'Bad UTF8 passed to PCRE function',
+ default => 'Unknown PCRE error calling PCRE function',
};
throw new \RuntimeException($message);
diff --git a/libraries/src/Mail/MailTemplate.php b/libraries/src/Mail/MailTemplate.php
index c7d75a1f8181..927ab4deec35 100644
--- a/libraries/src/Mail/MailTemplate.php
+++ b/libraries/src/Mail/MailTemplate.php
@@ -107,11 +107,12 @@ public function __construct(/**
*
* @since 4.0.0
*/
- protected $template_id, /**
+ protected $template_id, /**
* Language of the mail template.
*/
- protected $language, ?Mail $mailer = null)
- {
+ protected $language,
+ ?Mail $mailer = null
+ ) {
$this->mailer = $mailer instanceof Mail ? $mailer : Factory::getMailer();
}
@@ -376,8 +377,8 @@ public function send()
foreach ($this->recipients as $recipient) {
match ($recipient->type) {
- 'cc' => $this->mailer->addCc($recipient->mail, $recipient->name),
- 'bcc' => $this->mailer->addBcc($recipient->mail, $recipient->name),
+ 'cc' => $this->mailer->addCc($recipient->mail, $recipient->name),
+ 'bcc' => $this->mailer->addBcc($recipient->mail, $recipient->name),
default => $this->mailer->addAddress($recipient->mail, $recipient->name),
};
}
diff --git a/libraries/src/Mail/MailerFactory.php b/libraries/src/Mail/MailerFactory.php
index e2dac47d6585..3d8737add583 100644
--- a/libraries/src/Mail/MailerFactory.php
+++ b/libraries/src/Mail/MailerFactory.php
@@ -35,8 +35,7 @@ public function __construct(
* @since 4.4.0
*/
private readonly Registry $defaultConfiguration
- )
- {
+ ) {
}
/**
@@ -87,9 +86,9 @@ public function createMailer(?Registry $settings = null): MailerInterface
// Default mailer is to use PHP's mail function
match ($mailType) {
- 'smtp' => $mailer->useSmtp($smtpauth, $smtphost, $smtpuser, $smtppass, $smtpsecure, $smtpport),
+ 'smtp' => $mailer->useSmtp($smtpauth, $smtphost, $smtpuser, $smtppass, $smtpsecure, $smtpport),
'sendmail' => $mailer->isSendmail(),
- default => $mailer->isMail(),
+ default => $mailer->isMail(),
};
return $mailer;
diff --git a/libraries/src/Microdata/Microdata.php b/libraries/src/Microdata/Microdata.php
index 18002fd17eaa..93acd78df20d 100644
--- a/libraries/src/Microdata/Microdata.php
+++ b/libraries/src/Microdata/Microdata.php
@@ -795,7 +795,7 @@ public static function htmlTag($tag, $content, $property = '', $scope = '', $inv
// Control if it is an empty element without a closing tag
if ($tag === 'meta') {
- return sprintf("", $tmp, $content);
+ return \sprintf("", $tmp, $content);
}
return '<' . $tag . $tmp . '>' . $content . '' . $tag . '>';
@@ -826,6 +826,6 @@ public static function htmlScope($scope)
*/
public static function htmlProperty($property)
{
- return sprintf("itemprop='%s'", $property);
+ return \sprintf("itemprop='%s'", $property);
}
}
diff --git a/libraries/src/Pagination/Pagination.php b/libraries/src/Pagination/Pagination.php
index af5232d8a414..499d48b0577f 100644
--- a/libraries/src/Pagination/Pagination.php
+++ b/libraries/src/Pagination/Pagination.php
@@ -9,13 +9,13 @@
namespace Joomla\CMS\Pagination;
-use Joomla\CMS\Router\Router;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;
+use Joomla\CMS\Router\Router;
use Joomla\Filter\InputFilter;
// phpcs:disable PSR1.Files.SideEffects
@@ -145,7 +145,7 @@ class Pagination
public function __construct($total, $limitstart, $limit, /**
* @since 1.6
*/
- public $prefix = '', ?CMSApplication $app = null)
+ public $prefix = '', ?CMSApplication $app = null)
{
// Value/type checking.
$this->total = (int) $total;
diff --git a/libraries/src/Pagination/PaginationObject.php b/libraries/src/Pagination/PaginationObject.php
index 2fca6b17ebe5..46fbb333fd9c 100644
--- a/libraries/src/Pagination/PaginationObject.php
+++ b/libraries/src/Pagination/PaginationObject.php
@@ -52,7 +52,6 @@ public function __construct(
* @since 3.0
*/
public $active = false
- )
- {
+ ) {
}
}
diff --git a/libraries/src/Profiler/Profiler.php b/libraries/src/Profiler/Profiler.php
index 605372872f5a..c618f0a37939 100644
--- a/libraries/src/Profiler/Profiler.php
+++ b/libraries/src/Profiler/Profiler.php
@@ -67,8 +67,8 @@ class Profiler
public function __construct(/**
* @since 3.0.0
*/
- protected $prefix = '')
- {
+ protected $prefix = ''
+ ) {
$this->start = microtime(1);
}
diff --git a/libraries/src/Response/JsonResponse.php b/libraries/src/Response/JsonResponse.php
index 3914a72349a4..02fd88f20668 100644
--- a/libraries/src/Response/JsonResponse.php
+++ b/libraries/src/Response/JsonResponse.php
@@ -68,7 +68,7 @@ public function __construct($response = null, /**
*
* @since 3.1
*/
- public $message = null, $error = false, $ignoreMessages = false)
+ public $message = null, $error = false, $ignoreMessages = false)
{
// Get the message queue if requested and available
$app = Factory::getApplication();
diff --git a/libraries/src/Router/ApiRouter.php b/libraries/src/Router/ApiRouter.php
index 7e7f61f8e6a0..e33352aaa393 100644
--- a/libraries/src/Router/ApiRouter.php
+++ b/libraries/src/Router/ApiRouter.php
@@ -194,7 +194,7 @@ public function getMatchingRoutes()
// Extract routes matching $routePath from all known routes.
return array_filter(
$this->routes,
- fn($route) => preg_match($route->getRegex(), ltrim($routePath, '/')) === 1
+ fn ($route) => preg_match($route->getRegex(), ltrim($routePath, '/')) === 1
);
}
}
diff --git a/libraries/src/Schema/ChangeItem.php b/libraries/src/Schema/ChangeItem.php
index 798b29d2ebc0..73e41e1a3488 100644
--- a/libraries/src/Schema/ChangeItem.php
+++ b/libraries/src/Schema/ChangeItem.php
@@ -105,18 +105,18 @@ public function __construct(/**
*
* @since 2.5
*/
- public $db, /**
+ public $db, /**
* Update file: full path file name where query was found
*
* @since 2.5
*/
- public $file, /**
+ public $file, /**
* Update query: query used to change the db schema (one line from the file)
*
* @since 2.5
*/
- public $updateQuery)
- {
+ public $updateQuery
+ ) {
$this->buildCheckQuery();
}
diff --git a/libraries/src/Schema/ChangeItem/PostgresqlChangeItem.php b/libraries/src/Schema/ChangeItem/PostgresqlChangeItem.php
index 5997700ae28e..f04f2410c473 100644
--- a/libraries/src/Schema/ChangeItem/PostgresqlChangeItem.php
+++ b/libraries/src/Schema/ChangeItem/PostgresqlChangeItem.php
@@ -128,7 +128,7 @@ protected function buildCheckQuery()
$type = substr($type, 0, $pos);
}
$datatype = strpos($type, '(') ? substr($type, 0, $pos) : $type;
- $pos = strpos($type, '(') ? substr($type, 0, $pos) : $type;
+ $pos = strpos($type, '(') ? substr($type, 0, $pos) : $type;
if ($datatype === 'varchar') {
$datatype = 'character varying';
@@ -260,7 +260,7 @@ protected function buildCheckQuery()
}
// Set fields based on results
$this->checkStatus = $result !== null && $result !== '' && $result !== '0' ? 0 : -1;
- $this->checkQuery = $result !== null && $result !== '' && $result !== '0' ? 0 : -1;
+ $this->checkQuery = $result !== null && $result !== '' && $result !== '0' ? 0 : -1;
}
/**
diff --git a/libraries/src/Schema/ChangeSet.php b/libraries/src/Schema/ChangeSet.php
index 0a79566f2f8a..c0a344f0708a 100644
--- a/libraries/src/Schema/ChangeSet.php
+++ b/libraries/src/Schema/ChangeSet.php
@@ -56,13 +56,13 @@ public function __construct(/**
*
* @since 2.5
*/
- protected $db, /**
+ protected $db, /**
* Folder where SQL update files will be found
*
* @since 2.5
*/
- protected $folder = null)
- {
+ protected $folder = null
+ ) {
$updateFiles = $this->getUpdateFiles();
// If no files were found nothing more we can do - continue
diff --git a/libraries/src/Schemaorg/SchemaorgPluginTrait.php b/libraries/src/Schemaorg/SchemaorgPluginTrait.php
index 37a4eaf0827c..780ea4e22423 100644
--- a/libraries/src/Schemaorg/SchemaorgPluginTrait.php
+++ b/libraries/src/Schemaorg/SchemaorgPluginTrait.php
@@ -174,8 +174,8 @@ protected function checkAllowedAndForbiddenlist($context)
$allowedlist = array_filter((array) $this->params->get('allowedlist', []));
$forbiddenlist = array_filter((array) $this->params->get('forbiddenlist', []));
if ($allowedlist !== []) {
- return in_array($context, $allowedlist, true);
+ return \in_array($context, $allowedlist, true);
}
- return !in_array($context, $forbiddenlist, true);
+ return !\in_array($context, $forbiddenlist, true);
}
}
diff --git a/libraries/src/Serializer/JoomlaSerializer.php b/libraries/src/Serializer/JoomlaSerializer.php
index 475d9d777063..3954db6b8fb4 100644
--- a/libraries/src/Serializer/JoomlaSerializer.php
+++ b/libraries/src/Serializer/JoomlaSerializer.php
@@ -9,10 +9,10 @@
namespace Joomla\CMS\Serializer;
-use Joomla\CMS\Serializer\Events\OnGetApiAttributes;
-use Joomla\CMS\Serializer\Events\OnGetApiRelation;
use Joomla\CMS\Factory;
use Joomla\CMS\Object\CMSObject;
+use Joomla\CMS\Serializer\Events\OnGetApiAttributes;
+use Joomla\CMS\Serializer\Events\OnGetApiRelation;
use Tobscure\JsonApi\AbstractSerializer;
use Tobscure\JsonApi\Relationship;
diff --git a/libraries/src/Service/Provider/Authentication.php b/libraries/src/Service/Provider/Authentication.php
index 0fe262dc0f5c..a2e224989c80 100644
--- a/libraries/src/Service/Provider/Authentication.php
+++ b/libraries/src/Service/Provider/Authentication.php
@@ -47,7 +47,7 @@ public function register(Container $container)
->alias(BaseArgon2iHandler::class, Argon2iHandler::class)
->share(
Argon2iHandler::class,
- fn(Container $container) => new Argon2iHandler(),
+ fn (Container $container) => new Argon2iHandler(),
true
);
@@ -55,7 +55,7 @@ public function register(Container $container)
->alias(BaseArgon2idHandler::class, Argon2idHandler::class)
->share(
Argon2idHandler::class,
- fn(Container $container) => new Argon2idHandler(),
+ fn (Container $container) => new Argon2idHandler(),
true
);
@@ -90,7 +90,7 @@ function (Container $container) {
->alias('password.handler.bcrypt', BCryptHandler::class)
->share(
BCryptHandler::class,
- fn(Container $container) => new BCryptHandler(),
+ fn (Container $container) => new BCryptHandler(),
true
);
diff --git a/libraries/src/Service/Provider/CacheController.php b/libraries/src/Service/Provider/CacheController.php
index c5a8bc867dc1..7d301fe43fe6 100644
--- a/libraries/src/Service/Provider/CacheController.php
+++ b/libraries/src/Service/Provider/CacheController.php
@@ -40,7 +40,7 @@ public function register(Container $container)
->alias(CacheControllerFactory::class, CacheControllerFactoryInterface::class)
->share(
CacheControllerFactoryInterface::class,
- fn(Container $container) => new CacheControllerFactory(),
+ fn (Container $container) => new CacheControllerFactory(),
true
);
}
diff --git a/libraries/src/Service/Provider/Console.php b/libraries/src/Service/Provider/Console.php
index 3d630f876b3a..5940c5e6c73f 100644
--- a/libraries/src/Service/Provider/Console.php
+++ b/libraries/src/Service/Provider/Console.php
@@ -76,91 +76,91 @@ function (Container $container) {
$container->share(
SessionMetadataGcCommand::class,
- fn(Container $container) => new SessionMetadataGcCommand($container->get('session'), $container->get(MetadataManager::class)),
+ fn (Container $container) => new SessionMetadataGcCommand($container->get('session'), $container->get(MetadataManager::class)),
true
);
$container->share(
ExportCommand::class,
- fn(Container $container) => new ExportCommand($container->get(DatabaseInterface::class)),
+ fn (Container $container) => new ExportCommand($container->get(DatabaseInterface::class)),
true
);
$container->share(
ImportCommand::class,
- fn(Container $container) => new ImportCommand($container->get(DatabaseInterface::class)),
+ fn (Container $container) => new ImportCommand($container->get(DatabaseInterface::class)),
true
);
$container->share(
SiteDownCommand::class,
- fn(Container $container) => new SiteDownCommand(),
+ fn (Container $container) => new SiteDownCommand(),
true
);
$container->share(
SiteUpCommand::class,
- fn(Container $container) => new SiteUpCommand(),
+ fn (Container $container) => new SiteUpCommand(),
true
);
$container->share(
SetConfigurationCommand::class,
- fn(Container $container) => new SetConfigurationCommand(),
+ fn (Container $container) => new SetConfigurationCommand(),
true
);
$container->share(
GetConfigurationCommand::class,
- fn(Container $container) => new GetConfigurationCommand(),
+ fn (Container $container) => new GetConfigurationCommand(),
true
);
$container->share(
ExtensionsListCommand::class,
- fn(Container $container) => new ExtensionsListCommand($container->get(DatabaseInterface::class)),
+ fn (Container $container) => new ExtensionsListCommand($container->get(DatabaseInterface::class)),
true
);
$container->share(
CheckJoomlaUpdatesCommand::class,
- fn(Container $container) => new CheckJoomlaUpdatesCommand(),
+ fn (Container $container) => new CheckJoomlaUpdatesCommand(),
true
);
$container->share(
ExtensionRemoveCommand::class,
- fn(Container $container) => new ExtensionRemoveCommand($container->get(DatabaseInterface::class)),
+ fn (Container $container) => new ExtensionRemoveCommand($container->get(DatabaseInterface::class)),
true
);
$container->share(
ExtensionInstallCommand::class,
- fn(Container $container) => new ExtensionInstallCommand(),
+ fn (Container $container) => new ExtensionInstallCommand(),
true
);
$container->share(
ExtensionDiscoverCommand::class,
- fn(Container $container) => new ExtensionDiscoverCommand(),
+ fn (Container $container) => new ExtensionDiscoverCommand(),
true
);
$container->share(
ExtensionDiscoverInstallCommand::class,
- fn(Container $container) => new ExtensionDiscoverInstallCommand($container->get(DatabaseInterface::class)),
+ fn (Container $container) => new ExtensionDiscoverInstallCommand($container->get(DatabaseInterface::class)),
true
);
$container->share(
ExtensionDiscoverListCommand::class,
- fn(Container $container) => new ExtensionDiscoverListCommand($container->get(DatabaseInterface::class)),
+ fn (Container $container) => new ExtensionDiscoverListCommand($container->get(DatabaseInterface::class)),
true
);
$container->share(
UpdateCoreCommand::class,
- fn(Container $container) => new UpdateCoreCommand($container->get(DatabaseInterface::class)),
+ fn (Container $container) => new UpdateCoreCommand($container->get(DatabaseInterface::class)),
true
);
@@ -180,29 +180,29 @@ function (Container $container) {
$container->share(
TasksListCommand::class,
- fn(Container $container) => new TasksListCommand(),
+ fn (Container $container) => new TasksListCommand(),
true
);
$container->share(
TasksRunCommand::class,
- fn(Container $container) => new TasksRunCommand()
+ fn (Container $container) => new TasksRunCommand()
);
$container->share(
TasksStateCommand::class,
- fn(Container $container) => new TasksStateCommand()
+ fn (Container $container) => new TasksStateCommand()
);
$container->share(
MaintenanceDatabaseCommand::class,
- fn(Container $container) => new MaintenanceDatabaseCommand(),
+ fn (Container $container) => new MaintenanceDatabaseCommand(),
true
);
$container->share(
CoreUpdateChannelCommand::class,
- fn(Container $container) => new CoreUpdateChannelCommand($container->get(DatabaseInterface::class))
+ fn (Container $container) => new CoreUpdateChannelCommand($container->get(DatabaseInterface::class))
);
}
}
diff --git a/libraries/src/Service/Provider/Database.php b/libraries/src/Service/Provider/Database.php
index 20bc693dea1f..e73e13ddc61d 100644
--- a/libraries/src/Service/Provider/Database.php
+++ b/libraries/src/Service/Provider/Database.php
@@ -9,9 +9,9 @@
namespace Joomla\CMS\Service\Provider;
-use Joomla\Database\Monitor\DebugMonitor;
use Joomla\Database\DatabaseDriver;
use Joomla\Database\DatabaseInterface;
+use Joomla\Database\Monitor\DebugMonitor;
use Joomla\Database\Mysql\MysqlDriver;
use Joomla\DI\Container;
use Joomla\DI\ServiceProviderInterface;
diff --git a/libraries/src/Service/Provider/Dispatcher.php b/libraries/src/Service/Provider/Dispatcher.php
index 07c7c87b7bdb..069729057a73 100644
--- a/libraries/src/Service/Provider/Dispatcher.php
+++ b/libraries/src/Service/Provider/Dispatcher.php
@@ -40,7 +40,7 @@ public function register(Container $container)
->alias(EventDispatcher::class, EventDispatcherInterface::class)
->share(
EventDispatcherInterface::class,
- fn(Container $container) => new EventDispatcher(),
+ fn (Container $container) => new EventDispatcher(),
true
);
}
diff --git a/libraries/src/Service/Provider/HTMLRegistry.php b/libraries/src/Service/Provider/HTMLRegistry.php
index 3e7163ccc824..147167f9fbec 100644
--- a/libraries/src/Service/Provider/HTMLRegistry.php
+++ b/libraries/src/Service/Provider/HTMLRegistry.php
@@ -37,7 +37,7 @@ public function register(Container $container)
{
$container->share(
Registry::class,
- fn(Container $container) => new Registry(),
+ fn (Container $container) => new Registry(),
true
);
}
diff --git a/libraries/src/Service/Provider/Input.php b/libraries/src/Service/Provider/Input.php
index 06a323b63a45..0026d9fb5af7 100644
--- a/libraries/src/Service/Provider/Input.php
+++ b/libraries/src/Service/Provider/Input.php
@@ -41,7 +41,7 @@ public function register(Container $container)
{
$container->share(
CMSInput::class,
- fn() => new CMSInput(),
+ fn () => new CMSInput(),
true
);
}
diff --git a/libraries/src/Service/Provider/Language.php b/libraries/src/Service/Provider/Language.php
index 02192c6b97cf..1c02f63d250d 100644
--- a/libraries/src/Service/Provider/Language.php
+++ b/libraries/src/Service/Provider/Language.php
@@ -40,7 +40,7 @@ public function register(Container $container)
->alias(CachingLanguageFactory::class, LanguageFactoryInterface::class)
->share(
LanguageFactoryInterface::class,
- fn(Container $container) => new CachingLanguageFactory(),
+ fn (Container $container) => new CachingLanguageFactory(),
true
);
}
diff --git a/libraries/src/Service/Provider/Logger.php b/libraries/src/Service/Provider/Logger.php
index 1fc102dc69c0..baf499f442fd 100644
--- a/libraries/src/Service/Provider/Logger.php
+++ b/libraries/src/Service/Provider/Logger.php
@@ -39,7 +39,7 @@ public function register(Container $container)
$container->alias('logger', LoggerInterface::class)
->share(
LoggerInterface::class,
- fn(Container $container) => Log::createDelegatedLogger(),
+ fn (Container $container) => Log::createDelegatedLogger(),
true
);
}
diff --git a/libraries/src/Service/Provider/Mailer.php b/libraries/src/Service/Provider/Mailer.php
index 90d1c9214742..73a9d600f6ef 100644
--- a/libraries/src/Service/Provider/Mailer.php
+++ b/libraries/src/Service/Provider/Mailer.php
@@ -38,7 +38,7 @@ public function register(Container $container)
{
$container->share(
MailerFactoryInterface::class,
- fn(Container $container) => new MailerFactory($container->get('config')),
+ fn (Container $container) => new MailerFactory($container->get('config')),
true
);
}
diff --git a/libraries/src/Service/Provider/Pathway.php b/libraries/src/Service/Provider/Pathway.php
index e1384512e146..a4e524dd434d 100644
--- a/libraries/src/Service/Provider/Pathway.php
+++ b/libraries/src/Service/Provider/Pathway.php
@@ -41,7 +41,7 @@ public function register(Container $container)
->alias('pathway.site', SitePathway::class)
->share(
SitePathway::class,
- fn(Container $container) => new SitePathway($container->get(SiteApplication::class)),
+ fn (Container $container) => new SitePathway($container->get(SiteApplication::class)),
true
);
@@ -50,7 +50,7 @@ public function register(Container $container)
->alias('pathway', \Joomla\CMS\Pathway\Pathway::class)
->share(
\Joomla\CMS\Pathway\Pathway::class,
- fn(Container $container) => new \Joomla\CMS\Pathway\Pathway(),
+ fn (Container $container) => new \Joomla\CMS\Pathway\Pathway(),
true
);
}
diff --git a/libraries/src/Service/Provider/Router.php b/libraries/src/Service/Provider/Router.php
index ca2829b97351..565d1f248cc1 100644
--- a/libraries/src/Service/Provider/Router.php
+++ b/libraries/src/Service/Provider/Router.php
@@ -43,7 +43,7 @@ public function register(Container $container)
->alias('JRouterSite', SiteRouter::class)
->share(
SiteRouter::class,
- fn(Container $container) => new SiteRouter($container->get(SiteApplication::class)),
+ fn (Container $container) => new SiteRouter($container->get(SiteApplication::class)),
true
);
@@ -51,14 +51,14 @@ public function register(Container $container)
->alias('JRouterAdministrator', AdministratorRouter::class)
->share(
AdministratorRouter::class,
- fn(Container $container) => new AdministratorRouter(),
+ fn (Container $container) => new AdministratorRouter(),
true
);
$container->alias('ApiRouter', ApiRouter::class)
->share(
ApiRouter::class,
- fn(Container $container) => new ApiRouter($container->get(ApiApplication::class)),
+ fn (Container $container) => new ApiRouter($container->get(ApiApplication::class)),
true
);
}
diff --git a/libraries/src/Service/Provider/Session.php b/libraries/src/Service/Provider/Session.php
index 12dd07d722d4..fd8c8c7ff14a 100644
--- a/libraries/src/Service/Provider/Session.php
+++ b/libraries/src/Service/Provider/Session.php
@@ -273,7 +273,7 @@ function (Container $container) {
$container->alias(MetadataManagerListener::class, 'session.event_listener.metadata_manager')
->share(
'session.event_listener.metadata_manager',
- fn(Container $container) => new MetadataManagerListener($container->get(MetadataManager::class), $container->get('config')),
+ fn (Container $container) => new MetadataManagerListener($container->get(MetadataManager::class), $container->get('config')),
true
);
diff --git a/libraries/src/Service/Provider/User.php b/libraries/src/Service/Provider/User.php
index 339a712f513c..8b5a69b88f7f 100644
--- a/libraries/src/Service/Provider/User.php
+++ b/libraries/src/Service/Provider/User.php
@@ -41,7 +41,7 @@ public function register(Container $container)
->alias(UserFactory::class, UserFactoryInterface::class)
->share(
UserFactoryInterface::class,
- fn(Container $container) => new UserFactory($container->get(DatabaseInterface::class)),
+ fn (Container $container) => new UserFactory($container->get(DatabaseInterface::class)),
true
);
}
diff --git a/libraries/src/Session/EventListener/MetadataManagerListener.php b/libraries/src/Session/EventListener/MetadataManagerListener.php
index c9af7efa0a1e..6ddb0eafc2e1 100644
--- a/libraries/src/Session/EventListener/MetadataManagerListener.php
+++ b/libraries/src/Session/EventListener/MetadataManagerListener.php
@@ -45,8 +45,7 @@ public function __construct(
* @since 4.0.0
*/
private readonly Registry $config
- )
- {
+ ) {
}
/**
diff --git a/libraries/src/Session/MetadataManager.php b/libraries/src/Session/MetadataManager.php
index 3a8e5f6547bc..59de770e6935 100644
--- a/libraries/src/Session/MetadataManager.php
+++ b/libraries/src/Session/MetadataManager.php
@@ -77,8 +77,7 @@ public function __construct(
* @since 3.8.6
*/
private readonly DatabaseInterface $db
- )
- {
+ ) {
}
/**
diff --git a/libraries/src/Session/SessionFactory.php b/libraries/src/Session/SessionFactory.php
index 005fe0c36555..9a0a355960ae 100644
--- a/libraries/src/Session/SessionFactory.php
+++ b/libraries/src/Session/SessionFactory.php
@@ -9,15 +9,15 @@
namespace Joomla\CMS\Session;
+use Joomla\Database\DatabaseInterface;
+use Joomla\DI\ContainerAwareInterface;
+use Joomla\DI\ContainerAwareTrait;
+use Joomla\Registry\Registry;
use Joomla\Session\Handler\ApcuHandler;
use Joomla\Session\Handler\DatabaseHandler;
use Joomla\Session\Handler\FilesystemHandler;
use Joomla\Session\Handler\MemcachedHandler;
use Joomla\Session\Handler\RedisHandler;
-use Joomla\Database\DatabaseInterface;
-use Joomla\DI\ContainerAwareInterface;
-use Joomla\DI\ContainerAwareTrait;
-use Joomla\Registry\Registry;
use Joomla\Session\HandlerInterface;
use Symfony\Component\OptionsResolver\OptionsResolver;
@@ -89,7 +89,7 @@ public function createSessionHandler(array $options): HandlerInterface
$memcached = new \Memcached($config->get('session_memcached_server_id', 'joomla_cms'));
$memcached->addServer($host, $port);
- ini_set('session.save_path', sprintf('%s:%s', $host, $port));
+ ini_set('session.save_path', \sprintf('%s:%s', $host, $port));
ini_set('session.save_handler', 'memcached');
return new MemcachedHandler($memcached, ['ttl' => $options['expire']]);
diff --git a/libraries/src/Session/SessionManager.php b/libraries/src/Session/SessionManager.php
index c60c471547b5..564517230c20 100644
--- a/libraries/src/Session/SessionManager.php
+++ b/libraries/src/Session/SessionManager.php
@@ -34,8 +34,7 @@ public function __construct(
* @since 4.0.0
*/
private readonly \SessionHandlerInterface $sessionHandler
- )
- {
+ ) {
}
/**
diff --git a/libraries/src/Session/Storage/JoomlaStorage.php b/libraries/src/Session/Storage/JoomlaStorage.php
index d1533ceddb77..8196239ce5ab 100644
--- a/libraries/src/Session/Storage/JoomlaStorage.php
+++ b/libraries/src/Session/Storage/JoomlaStorage.php
@@ -70,8 +70,10 @@ public function __construct(/**
*
* @since 4.0.0
*/
- private readonly Input $input, ?\SessionHandlerInterface $handler = null, array $options = [])
- {
+ private readonly Input $input,
+ ?\SessionHandlerInterface $handler = null,
+ array $options = []
+ ) {
// Disable transparent sid support and default use cookies
$options += [
'use_cookies' => 1,
diff --git a/libraries/src/TUF/TufFetcher.php b/libraries/src/TUF/TufFetcher.php
index 71f1bbf45138..be2559dc9579 100644
--- a/libraries/src/TUF/TufFetcher.php
+++ b/libraries/src/TUF/TufFetcher.php
@@ -65,8 +65,7 @@ public function __construct(
* The web application object
*/
protected CMSApplicationInterface $app
- )
- {
+ ) {
}
/**
diff --git a/libraries/src/Table/ContentType.php b/libraries/src/Table/ContentType.php
index b2dd2a4d40e7..8ff35aebe739 100644
--- a/libraries/src/Table/ContentType.php
+++ b/libraries/src/Table/ContentType.php
@@ -144,7 +144,7 @@ public function getContentTable()
if (\is_object($tableInfo) && isset($tableInfo->special) && (\is_object($tableInfo->special) && isset($tableInfo->special->type) && isset($tableInfo->special->prefix))) {
$class = $tableInfo->special->class ?? Table::class;
- if (in_array(class_implements($class, TableInterface::class), [[], false], true)) {
+ if (\in_array(class_implements($class, TableInterface::class), [[], false], true)) {
// This isn't an instance of TableInterface. Stop.
throw new \RuntimeException('Class must be an instance of Joomla\\CMS\\Table\\TableInterface');
}
diff --git a/libraries/src/Table/Nested.php b/libraries/src/Table/Nested.php
index a98515039935..60d2c730d18e 100644
--- a/libraries/src/Table/Nested.php
+++ b/libraries/src/Table/Nested.php
@@ -1408,7 +1408,7 @@ protected function recursiveUpdatePublishedColumn($pk, $newState = null)
if ($newState !== null) {
// Use a new published state in changed row.
- $newState = sprintf('(CASE WHEN p2.%s = ', $key) . (int) $pk . " THEN " . (int) $newState . sprintf(' ELSE p2.%s END)', $published);
+ $newState = \sprintf('(CASE WHEN p2.%s = ', $key) . (int) $pk . " THEN " . (int) $newState . \sprintf(' ELSE p2.%s END)', $published);
} else {
$newState = 'p2.' . $published;
}
@@ -1445,23 +1445,23 @@ protected function recursiveUpdatePublishedColumn($pk, $newState = null)
$query->select('c.' . $key)
->from($table . ' AS node')
->leftJoin($table . ' AS c ON node.lft <= c.lft AND c.rgt <= node.rgt')
- ->where(sprintf('node.%s = ', $key) . (int) $pk);
+ ->where(\sprintf('node.%s = ', $key) . (int) $pk);
$pks = $this->_db->setQuery($query)->loadColumn();
// Prepare a list of correct published states.
$subquery = (string) $query->clear()
- ->select(sprintf('c2.%s AS newId', $key))
- ->select(sprintf('CASE WHEN MIN(%s) > 0 THEN MAX(%s) ELSE MIN(%s) END AS newPublished', $newState, $newState, $newState))
+ ->select(\sprintf('c2.%s AS newId', $key))
+ ->select(\sprintf('CASE WHEN MIN(%s) > 0 THEN MAX(%s) ELSE MIN(%s) END AS newPublished', $newState, $newState, $newState))
->from($table . ' AS c2')
->innerJoin($table . ' AS p2 ON p2.lft <= c2.lft AND c2.rgt <= p2.rgt')
- ->where(sprintf('c2.%s IN (', $key) . implode(',', $pks) . ")")
+ ->where(\sprintf('c2.%s IN (', $key) . implode(',', $pks) . ")")
->group('c2.' . $key);
// Update and cascade the publishing state.
$query->clear()
->update($table)
- ->innerJoin(sprintf('(%s) AS c2', $subquery))
+ ->innerJoin(\sprintf('(%s) AS c2', $subquery))
->set($published . ' = ' . $this->_db->quoteName("c2.newpublished"))
->where($key . ' = c2.newId')
->where($key . ' IN (' . implode(',', $pks) . ")");
@@ -1488,9 +1488,9 @@ protected function _getNode($id, $key = null)
// Determine which key to get the node base on.
$k = match ($key) {
'parent' => 'parent_id',
- 'left' => 'lft',
- 'right' => 'rgt',
- default => $this->_tbl_key,
+ 'left' => 'lft',
+ 'right' => 'rgt',
+ default => $this->_tbl_key,
};
// Get the node data.
diff --git a/libraries/src/Table/Table.php b/libraries/src/Table/Table.php
index bb906ae0dd71..766524499d59 100644
--- a/libraries/src/Table/Table.php
+++ b/libraries/src/Table/Table.php
@@ -164,8 +164,11 @@ public function __construct(/**
*
* @since 1.7.0
*/
- protected $_tbl, $key, DatabaseDriver $db, ?DispatcherInterface $dispatcher = null)
- {
+ protected $_tbl,
+ $key,
+ DatabaseDriver $db,
+ ?DispatcherInterface $dispatcher = null
+ ) {
// Set the key to be an array.
if (\is_string($key)) {
$key = [$key];
diff --git a/libraries/src/Table/Usergroup.php b/libraries/src/Table/Usergroup.php
index 1183d49ee906..efe0b94b8d10 100644
--- a/libraries/src/Table/Usergroup.php
+++ b/libraries/src/Table/Usergroup.php
@@ -276,10 +276,10 @@ public function delete($oid = null)
$replace = [];
foreach ($ids as $id) {
- $replace[] = ',' . $db->quote(sprintf('[%s,', $id)) . ',' . $db->quote('[');
- $replace[] = ',' . $db->quote(sprintf(',%s,', $id)) . ',' . $db->quote(',');
- $replace[] = ',' . $db->quote(sprintf(',%s]', $id)) . ',' . $db->quote(']');
- $replace[] = ',' . $db->quote(sprintf('[%s]', $id)) . ',' . $db->quote('[]');
+ $replace[] = ',' . $db->quote(\sprintf('[%s,', $id)) . ',' . $db->quote('[');
+ $replace[] = ',' . $db->quote(\sprintf(',%s,', $id)) . ',' . $db->quote(',');
+ $replace[] = ',' . $db->quote(\sprintf(',%s]', $id)) . ',' . $db->quote(']');
+ $replace[] = ',' . $db->quote(\sprintf('[%s]', $id)) . ',' . $db->quote('[]');
}
$query->clear()
diff --git a/libraries/src/Toolbar/Toolbar.php b/libraries/src/Toolbar/Toolbar.php
index 5fd5605db815..aee35e327618 100644
--- a/libraries/src/Toolbar/Toolbar.php
+++ b/libraries/src/Toolbar/Toolbar.php
@@ -9,7 +9,6 @@
namespace Joomla\CMS\Toolbar;
-use Joomla\DI\Exception\KeyNotFoundException;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
@@ -24,6 +23,7 @@
use Joomla\CMS\Toolbar\Button\PopupButton;
use Joomla\CMS\Toolbar\Button\SeparatorButton;
use Joomla\CMS\Toolbar\Button\StandardButton;
+use Joomla\DI\Exception\KeyNotFoundException;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
@@ -98,8 +98,9 @@ public function __construct(/**
*
* @since 1.5
*/
- protected $_name = 'toolbar', ?ToolbarFactoryInterface $factory = null)
- {
+ protected $_name = 'toolbar',
+ ?ToolbarFactoryInterface $factory = null
+ ) {
// At 5.0, require the factory to be injected
if (!$factory instanceof ToolbarFactoryInterface) {
@trigger_error(
diff --git a/libraries/src/Toolbar/ToolbarHelper.php b/libraries/src/Toolbar/ToolbarHelper.php
index 5ad350dcd321..5507c414b8a5 100644
--- a/libraries/src/Toolbar/ToolbarHelper.php
+++ b/libraries/src/Toolbar/ToolbarHelper.php
@@ -9,10 +9,10 @@
namespace Joomla\CMS\Toolbar;
-use Joomla\CMS\Table\ContentType;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\FileLayout;
+use Joomla\CMS\Table\ContentType;
use Joomla\CMS\Table\Table;
use Joomla\CMS\Uri\Uri;
diff --git a/libraries/src/Updater/Adapter/TufAdapter.php b/libraries/src/Updater/Adapter/TufAdapter.php
index 5b683bb90fdd..bb9b0171f68c 100644
--- a/libraries/src/Updater/Adapter/TufAdapter.php
+++ b/libraries/src/Updater/Adapter/TufAdapter.php
@@ -102,7 +102,7 @@ public function getUpdateTargets($options)
}
// We only want the latest version we support
- usort($versions, fn($a, $b) => version_compare($b['version'], $a['version']));
+ usort($versions, fn ($a, $b) => version_compare($b['version'], $a['version']));
$constraintChecker = new ConstraintChecker();
@@ -134,7 +134,7 @@ protected function processTufTarget(string $filename, array $target): bool|array
$values = [];
if (!isset($target["hashes"])) {
- throw new MetadataException(sprintf("No trusted hashes are available for '%s'", $filename));
+ throw new MetadataException(\sprintf("No trusted hashes are available for '%s'", $filename));
}
foreach ($customKeys as $key) {
diff --git a/libraries/src/Updater/UpdateAdapter.php b/libraries/src/Updater/UpdateAdapter.php
index 44f81049a061..5856dda214ee 100644
--- a/libraries/src/Updater/UpdateAdapter.php
+++ b/libraries/src/Updater/UpdateAdapter.php
@@ -9,10 +9,10 @@
namespace Joomla\CMS\Updater;
-use Joomla\CMS\Http\Response;
use Joomla\CMS\Adapter\AdapterInstance;
use Joomla\CMS\Factory;
use Joomla\CMS\Http\HttpFactory;
+use Joomla\CMS\Http\Response;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Log\Log;
use Joomla\CMS\Version;
@@ -261,8 +261,8 @@ protected function getUpdateSiteResponse($options = [])
$endTime = microtime(true);
$timeToLoad = \sprintf('%0.2f', $endTime - $startTime);
Log::add(
- sprintf('Loading information from update site #%d with name ', $this->updateSiteId) .
- sprintf('"%s" and URL %s took %s seconds', $this->updateSiteName, $url, $timeToLoad),
+ \sprintf('Loading information from update site #%d with name ', $this->updateSiteId) .
+ \sprintf('"%s" and URL %s took %s seconds', $this->updateSiteName, $url, $timeToLoad),
Log::INFO,
'updater'
);
diff --git a/libraries/src/Updater/Updater.php b/libraries/src/Updater/Updater.php
index a493075e5caf..cf57694865a0 100644
--- a/libraries/src/Updater/Updater.php
+++ b/libraries/src/Updater/Updater.php
@@ -9,10 +9,10 @@
namespace Joomla\CMS\Updater;
-use Joomla\CMS\Table\Update;
-use Joomla\CMS\Table\Extension;
use Joomla\CMS\Adapter\Adapter;
+use Joomla\CMS\Table\Extension;
use Joomla\CMS\Table\Table;
+use Joomla\CMS\Table\Update;
use Joomla\Database\ParameterType;
// phpcs:disable PSR1.Files.SideEffects
diff --git a/libraries/src/Uri/Uri.php b/libraries/src/Uri/Uri.php
index d2b44efff6ac..03a710f3e880 100644
--- a/libraries/src/Uri/Uri.php
+++ b/libraries/src/Uri/Uri.php
@@ -148,7 +148,7 @@ public static function base($pathonly = false)
} else {
static::$base['prefix'] = $uri->toString(['scheme', 'host', 'port']);
- if (str_contains(PHP_SAPI, 'cgi') && (in_array(\ini_get('cgi.fix_pathinfo'), ['', '0'], true) || \ini_get('cgi.fix_pathinfo') === false) && !empty($_SERVER['REQUEST_URI'])) {
+ if (str_contains(PHP_SAPI, 'cgi') && (\in_array(\ini_get('cgi.fix_pathinfo'), ['', '0'], true) || \ini_get('cgi.fix_pathinfo') === false) && !empty($_SERVER['REQUEST_URI'])) {
// PHP-CGI on Apache with "cgi.fix_pathinfo = 0"
// We shouldn't have user-supplied PATH_INFO in PHP_SELF in this case
diff --git a/libraries/src/User/UserFactory.php b/libraries/src/User/UserFactory.php
index ae744bef4d0c..a99e4ff0203e 100644
--- a/libraries/src/User/UserFactory.php
+++ b/libraries/src/User/UserFactory.php
@@ -32,8 +32,7 @@ public function __construct(
* The database.
*/
private readonly DatabaseInterface $db
- )
- {
+ ) {
}
/**
diff --git a/libraries/src/Utility/BufferStreamHandler.php b/libraries/src/Utility/BufferStreamHandler.php
index 6503a1c29ead..5259e0edca03 100644
--- a/libraries/src/Utility/BufferStreamHandler.php
+++ b/libraries/src/Utility/BufferStreamHandler.php
@@ -187,7 +187,7 @@ public function stream_seek($offset, $whence)
SEEK_SET => $this->seek_set($offset),
SEEK_CUR => $this->seek_cur($offset),
SEEK_END => $this->seek_end($offset),
- default => false,
+ default => false,
};
}
diff --git a/libraries/src/WebAsset/WebAssetManager.php b/libraries/src/WebAsset/WebAssetManager.php
index 31c3b907d5f4..f8611a26a771 100644
--- a/libraries/src/WebAsset/WebAssetManager.php
+++ b/libraries/src/WebAsset/WebAssetManager.php
@@ -786,7 +786,7 @@ protected function enableDependencies(?string $type = null, ?WebAssetItem $asset
foreach ($this->activeAssets as $type => $activeAsset) {
$this->activeAssets[$type] = array_filter(
$activeAsset,
- fn($state) => $state === WebAssetManager::ASSET_STATE_ACTIVE
+ fn ($state) => $state === WebAssetManager::ASSET_STATE_ACTIVE
);
}
@@ -834,7 +834,7 @@ protected function calculateOrderOfActiveAssets($type): array
$emptyIncoming = array_keys(
array_filter(
$graphIncoming,
- fn($el) => !$el
+ fn ($el) => !$el
)
);
diff --git a/libraries/src/WebAuthn/Server.php b/libraries/src/WebAuthn/Server.php
index 54254b3c5b1c..b9928b96d0c0 100644
--- a/libraries/src/WebAuthn/Server.php
+++ b/libraries/src/WebAuthn/Server.php
@@ -9,18 +9,18 @@
namespace Joomla\CMS\WebAuthn;
-use Cose\Algorithm\Signature\RSA\RS1;
-use Cose\Algorithm\Signature\RSA\RS256;
-use Cose\Algorithm\Signature\RSA\RS384;
-use Cose\Algorithm\Signature\RSA\RS512;
-use Cose\Algorithm\Signature\RSA\PS256;
-use Cose\Algorithm\Signature\RSA\PS384;
-use Cose\Algorithm\Signature\RSA\PS512;
use Cose\Algorithm\Signature\ECDSA\ES256;
use Cose\Algorithm\Signature\ECDSA\ES256K;
use Cose\Algorithm\Signature\ECDSA\ES384;
use Cose\Algorithm\Signature\ECDSA\ES512;
use Cose\Algorithm\Signature\EdDSA\Ed25519;
+use Cose\Algorithm\Signature\RSA\PS256;
+use Cose\Algorithm\Signature\RSA\PS384;
+use Cose\Algorithm\Signature\RSA\PS512;
+use Cose\Algorithm\Signature\RSA\RS1;
+use Cose\Algorithm\Signature\RSA\RS256;
+use Cose\Algorithm\Signature\RSA\RS384;
+use Cose\Algorithm\Signature\RSA\RS512;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
@@ -126,18 +126,18 @@ public function __construct(/**
*
* @since 5.0.0
*/
- private readonly PublicKeyCredentialRpEntity $rpEntity, /**
+ private readonly PublicKeyCredentialRpEntity $rpEntity, /**
* Public Key credential source respoitory instance
*
* @since 5.0.0
*/
- private readonly PublicKeyCredentialSourceRepository $publicKeyCredentialSourceRepository, /**
+ private readonly PublicKeyCredentialSourceRepository $publicKeyCredentialSourceRepository, /**
* Metadata statement repository service
*
* @since 5.0.0
*/
- private readonly ?MetadataStatementRepository $metadataStatementRepository)
- {
+ private readonly ?MetadataStatementRepository $metadataStatementRepository
+ ) {
$this->coseAlgorithmManagerFactory = new ManagerFactory();
$this->coseAlgorithmManagerFactory->add('RS1', new RS1());
$this->coseAlgorithmManagerFactory->add('RS256', new RS256());
diff --git a/libraries/src/Workflow/WorkflowPluginTrait.php b/libraries/src/Workflow/WorkflowPluginTrait.php
index fd80bdd95ab5..9d715657123c 100644
--- a/libraries/src/Workflow/WorkflowPluginTrait.php
+++ b/libraries/src/Workflow/WorkflowPluginTrait.php
@@ -106,9 +106,9 @@ protected function checkAllowedAndForbiddenlist($context)
$allowedlist = array_filter((array) $this->params->get('allowedlist', []));
$forbiddenlist = array_filter((array) $this->params->get('forbiddenlist', []));
if ($allowedlist !== []) {
- return in_array($context, $allowedlist, true);
+ return \in_array($context, $allowedlist, true);
}
- return !in_array($context, $forbiddenlist, true);
+ return !\in_array($context, $forbiddenlist, true);
}
/**
diff --git a/libraries/src/Workflow/WorkflowServiceTrait.php b/libraries/src/Workflow/WorkflowServiceTrait.php
index 9d872577746c..4142c4840c1d 100644
--- a/libraries/src/Workflow/WorkflowServiceTrait.php
+++ b/libraries/src/Workflow/WorkflowServiceTrait.php
@@ -9,9 +9,9 @@
namespace Joomla\CMS\Workflow;
-use Joomla\CMS\Event\Workflow\WorkflowFunctionalityUsedEvent;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Event\AbstractEvent;
+use Joomla\CMS\Event\Workflow\WorkflowFunctionalityUsedEvent;
use Joomla\CMS\Factory;
use Joomla\CMS\MVC\Factory\MVCFactoryInterface;
use Joomla\CMS\MVC\Model\WorkflowModelInterface;
diff --git a/modules/mod_articles/src/Helper/ArticlesHelper.php b/modules/mod_articles/src/Helper/ArticlesHelper.php
index 057715b80150..50ea0c958a4d 100644
--- a/modules/mod_articles/src/Helper/ArticlesHelper.php
+++ b/modules/mod_articles/src/Helper/ArticlesHelper.php
@@ -10,13 +10,13 @@
namespace Joomla\Module\Articles\Site\Helper;
-use Joomla\CMS\Event\Content\AfterTitleEvent;
-use Joomla\CMS\Event\Content\BeforeDisplayEvent;
-use Joomla\CMS\Event\Content\AfterDisplayEvent;
use Joomla\CMS\Access\Access;
use Joomla\CMS\Application\SiteApplication;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Date\Date;
+use Joomla\CMS\Event\Content\AfterDisplayEvent;
+use Joomla\CMS\Event\Content\AfterTitleEvent;
+use Joomla\CMS\Event\Content\BeforeDisplayEvent;
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Plugin\PluginHelper;
diff --git a/modules/mod_articles_news/src/Helper/ArticlesNewsHelper.php b/modules/mod_articles_news/src/Helper/ArticlesNewsHelper.php
index 19bfe5989c6d..4afe5fcbe9bc 100644
--- a/modules/mod_articles_news/src/Helper/ArticlesNewsHelper.php
+++ b/modules/mod_articles_news/src/Helper/ArticlesNewsHelper.php
@@ -10,7 +10,6 @@
namespace Joomla\Module\ArticlesNews\Site\Helper;
-use Joomla\Component\Content\Site\Model\ArticlesModel;
use Joomla\CMS\Access\Access;
use Joomla\CMS\Application\SiteApplication;
use Joomla\CMS\Component\ComponentHelper;
@@ -20,6 +19,7 @@
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Content\Site\Helper\RouteHelper;
+use Joomla\Component\Content\Site\Model\ArticlesModel;
use Joomla\Database\DatabaseAwareInterface;
use Joomla\Database\DatabaseAwareTrait;
use Joomla\Registry\Registry;
diff --git a/modules/mod_feed/src/Helper/FeedHelper.php b/modules/mod_feed/src/Helper/FeedHelper.php
index 09b84e256808..47cc37569996 100644
--- a/modules/mod_feed/src/Helper/FeedHelper.php
+++ b/modules/mod_feed/src/Helper/FeedHelper.php
@@ -10,10 +10,10 @@
namespace Joomla\Module\Feed\Site\Helper;
-use Joomla\Registry\Registry;
use Joomla\CMS\Feed\Feed;
use Joomla\CMS\Feed\FeedFactory;
use Joomla\CMS\Language\Text;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/modules/mod_finder/src/Helper/FinderHelper.php b/modules/mod_finder/src/Helper/FinderHelper.php
index c2f6d3f169a5..e709f02eb11d 100644
--- a/modules/mod_finder/src/Helper/FinderHelper.php
+++ b/modules/mod_finder/src/Helper/FinderHelper.php
@@ -10,13 +10,13 @@
namespace Joomla\Module\Finder\Site\Helper;
-use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
use Joomla\CMS\Filter\InputFilter;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Finder\Administrator\Indexer\Query;
use Joomla\Database\DatabaseInterface;
+use Joomla\Registry\Registry;
use Joomla\Utilities\ArrayHelper;
// phpcs:disable PSR1.Files.SideEffects
diff --git a/modules/mod_languages/src/Helper/LanguagesHelper.php b/modules/mod_languages/src/Helper/LanguagesHelper.php
index 25a0972ad261..520498fae8f6 100644
--- a/modules/mod_languages/src/Helper/LanguagesHelper.php
+++ b/modules/mod_languages/src/Helper/LanguagesHelper.php
@@ -10,7 +10,6 @@
namespace Joomla\Module\Languages\Site\Helper;
-use Joomla\Registry\Registry;
use Joomla\CMS\Association\AssociationServiceInterface;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Associations;
@@ -19,6 +18,7 @@
use Joomla\CMS\Router\Route;
use Joomla\CMS\Uri\Uri;
use Joomla\Component\Menus\Administrator\Helper\MenusHelper;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/modules/mod_login/src/Helper/LoginHelper.php b/modules/mod_login/src/Helper/LoginHelper.php
index 53b518fbaa04..cbc21a17fc94 100644
--- a/modules/mod_login/src/Helper/LoginHelper.php
+++ b/modules/mod_login/src/Helper/LoginHelper.php
@@ -10,10 +10,10 @@
namespace Joomla\Module\Login\Site\Helper;
-use Joomla\Registry\Registry;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Uri\Uri;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/modules/mod_menu/src/Helper/MenuHelper.php b/modules/mod_menu/src/Helper/MenuHelper.php
index 0ed621091390..d0cd0fc9f076 100644
--- a/modules/mod_menu/src/Helper/MenuHelper.php
+++ b/modules/mod_menu/src/Helper/MenuHelper.php
@@ -10,12 +10,12 @@
namespace Joomla\Module\Menu\Site\Helper;
-use Joomla\Registry\Registry;
use Joomla\CMS\Cache\CacheControllerFactoryInterface;
use Joomla\CMS\Cache\Controller\OutputController;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Router\Route;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/modules/mod_random_image/src/Helper/RandomImageHelper.php b/modules/mod_random_image/src/Helper/RandomImageHelper.php
index 3d6ee4396189..6e3b13131324 100644
--- a/modules/mod_random_image/src/Helper/RandomImageHelper.php
+++ b/modules/mod_random_image/src/Helper/RandomImageHelper.php
@@ -10,8 +10,8 @@
namespace Joomla\Module\RandomImage\Site\Helper;
-use Joomla\Registry\Registry;
use Joomla\CMS\Uri\Uri;
+use Joomla\Registry\Registry;
use Joomla\String\StringHelper;
// phpcs:disable PSR1.Files.SideEffects
diff --git a/modules/mod_tags_popular/src/Helper/TagsPopularHelper.php b/modules/mod_tags_popular/src/Helper/TagsPopularHelper.php
index 77aadd655977..001a09fe078d 100644
--- a/modules/mod_tags_popular/src/Helper/TagsPopularHelper.php
+++ b/modules/mod_tags_popular/src/Helper/TagsPopularHelper.php
@@ -10,13 +10,13 @@
namespace Joomla\Module\TagsPopular\Site\Helper;
-use Joomla\Registry\Registry;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
use Joomla\CMS\Helper\ContentHelper;
use Joomla\Database\DatabaseAwareInterface;
use Joomla\Database\DatabaseAwareTrait;
use Joomla\Database\ParameterType;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/plugins/actionlog/joomla/src/Extension/Joomla.php b/plugins/actionlog/joomla/src/Extension/Joomla.php
index 6aef9b25beeb..b4069f0adfd6 100644
--- a/plugins/actionlog/joomla/src/Extension/Joomla.php
+++ b/plugins/actionlog/joomla/src/Extension/Joomla.php
@@ -10,30 +10,30 @@
namespace Joomla\Plugin\Actionlog\Joomla\Extension;
-use Joomla\CMS\Event\Model\AfterSaveEvent;
-use Joomla\CMS\Event\Model\AfterDeleteEvent;
-use Joomla\CMS\Event\Model\AfterChangeStateEvent;
-use Joomla\CMS\Event\Application\AfterSaveConfigurationEvent;
-use Joomla\CMS\Event\Extension\AfterInstallEvent;
-use Joomla\CMS\Event\Extension\AfterUninstallEvent;
-use Joomla\CMS\Event\Extension\AfterUpdateEvent;
-use Joomla\CMS\Event\User\AfterLoginEvent;
-use Joomla\CMS\Event\User\LoginFailureEvent;
-use Joomla\CMS\Event\User\LogoutEvent;
-use Joomla\CMS\Event\User\AfterRemindEvent;
-use Joomla\CMS\Event\Checkin\AfterCheckinEvent;
-use Joomla\CMS\Event\Cache\AfterPurgeEvent;
-use Joomla\CMS\Event\User\AfterResetRequestEvent;
-use Joomla\CMS\Event\User\AfterResetCompleteEvent;
-use Joomla\CMS\Event\User\BeforeSaveEvent;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Event\AbstractEvent;
use Joomla\CMS\Event\Application;
+use Joomla\CMS\Event\Application\AfterSaveConfigurationEvent;
use Joomla\CMS\Event\Cache;
+use Joomla\CMS\Event\Cache\AfterPurgeEvent;
use Joomla\CMS\Event\Checkin;
+use Joomla\CMS\Event\Checkin\AfterCheckinEvent;
use Joomla\CMS\Event\Extension;
+use Joomla\CMS\Event\Extension\AfterInstallEvent;
+use Joomla\CMS\Event\Extension\AfterUninstallEvent;
+use Joomla\CMS\Event\Extension\AfterUpdateEvent;
use Joomla\CMS\Event\Model;
+use Joomla\CMS\Event\Model\AfterChangeStateEvent;
+use Joomla\CMS\Event\Model\AfterDeleteEvent;
+use Joomla\CMS\Event\Model\AfterSaveEvent;
use Joomla\CMS\Event\User;
+use Joomla\CMS\Event\User\AfterLoginEvent;
+use Joomla\CMS\Event\User\AfterRemindEvent;
+use Joomla\CMS\Event\User\AfterResetCompleteEvent;
+use Joomla\CMS\Event\User\AfterResetRequestEvent;
+use Joomla\CMS\Event\User\BeforeSaveEvent;
+use Joomla\CMS\Event\User\LoginFailureEvent;
+use Joomla\CMS\Event\User\LogoutEvent;
use Joomla\CMS\MVC\Factory\MVCFactoryServiceInterface;
use Joomla\CMS\User\UserFactoryAwareTrait;
use Joomla\Component\Actionlogs\Administrator\Helper\ActionlogsHelper;
@@ -1101,7 +1101,7 @@ public function onAfterLogExport(): void
*/
public function onAfterPurge(AfterPurgeEvent $event): void
{
- $group = in_array($event->getGroup(), ['', '0'], true) ? 'all' : $event->getGroup();
+ $group = \in_array($event->getGroup(), ['', '0'], true) ? 'all' : $event->getGroup();
$context = $this->getApplication()->getInput()->get('option');
$user = $this->getApplication()->getIdentity();
@@ -1338,9 +1338,9 @@ public function onBeforeTourSaveUserState(AbstractEvent $event): void
$stepNumber = $event->getArgument('stepNumber');
$messageLanguageKey = match ($state) {
- 'skipped' => 'PLG_ACTIONLOG_JOOMLA_GUIDEDTOURS_TOURSKIPPED',
+ 'skipped' => 'PLG_ACTIONLOG_JOOMLA_GUIDEDTOURS_TOURSKIPPED',
'completed' => 'PLG_ACTIONLOG_JOOMLA_GUIDEDTOURS_TOURCOMPLETED',
- default => 'PLG_ACTIONLOG_JOOMLA_GUIDEDTOURS_TOURDELAYED',
+ default => 'PLG_ACTIONLOG_JOOMLA_GUIDEDTOURS_TOURDELAYED',
};
// Get the tour from the model to fetch the translated title of the tour
diff --git a/plugins/api-authentication/token/src/Extension/Token.php b/plugins/api-authentication/token/src/Extension/Token.php
index 3916e4ffca2a..e4fee149dad6 100644
--- a/plugins/api-authentication/token/src/Extension/Token.php
+++ b/plugins/api-authentication/token/src/Extension/Token.php
@@ -10,12 +10,12 @@
namespace Joomla\Plugin\ApiAuthentication\Token\Extension;
-use Joomla\Component\Plugins\Administrator\Model\PluginModel;
use Joomla\CMS\Authentication\Authentication;
use Joomla\CMS\Crypt\Crypt;
use Joomla\CMS\Event\User\AuthenticationEvent;
use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\CMS\User\UserFactoryAwareTrait;
+use Joomla\Component\Plugins\Administrator\Model\PluginModel;
use Joomla\Database\DatabaseAwareTrait;
use Joomla\Database\ParameterType;
use Joomla\Event\DispatcherInterface;
@@ -78,7 +78,7 @@ public function __construct(DispatcherInterface $dispatcher, array $config, /**
*
* @since 4.2.0
*/
- private InputFilter $filter)
+ private InputFilter $filter)
{
parent::__construct($dispatcher, $config);
}
@@ -237,7 +237,7 @@ public function onUserAuthenticate(AuthenticationEvent $event): void
$user = $this->getUserFactory()->loadUserById($userId);
// Disallow login for blocked, inactive or password reset required users
- if ($user->block || !in_array(trim($user->activation), ['', '0'], true) || $user->requireReset) {
+ if ($user->block || !\in_array(trim($user->activation), ['', '0'], true) || $user->requireReset) {
$response->status = Authentication::STATUS_DENIED;
return;
diff --git a/plugins/authentication/ldap/src/Extension/Ldap.php b/plugins/authentication/ldap/src/Extension/Ldap.php
index c5bf78996eb0..5b942b26cd44 100644
--- a/plugins/authentication/ldap/src/Extension/Ldap.php
+++ b/plugins/authentication/ldap/src/Extension/Ldap.php
@@ -49,8 +49,10 @@ public function __construct(/**
*
* @since 4.3.0
*/
- private readonly LdapFactoryInterface $factory, DispatcherInterface $dispatcher, array $config = [])
- {
+ private readonly LdapFactoryInterface $factory,
+ DispatcherInterface $dispatcher,
+ array $config = []
+ ) {
parent::__construct($dispatcher, $config);
}
diff --git a/plugins/behaviour/compat/src/classmap/classmap.php b/plugins/behaviour/compat/src/classmap/classmap.php
index a95ec1ce6481..941627436bd2 100644
--- a/plugins/behaviour/compat/src/classmap/classmap.php
+++ b/plugins/behaviour/compat/src/classmap/classmap.php
@@ -1,67 +1,51 @@
set(
PluginInterface::class,
- fn(Container $container) => new Taggable(
+ fn (Container $container) => new Taggable(
$container->get(DispatcherInterface::class),
(array) PluginHelper::getPlugin('behaviour', 'taggable')
)
diff --git a/plugins/behaviour/versionable/src/Extension/Versionable.php b/plugins/behaviour/versionable/src/Extension/Versionable.php
index 10628c29f910..1f4fff4975c9 100644
--- a/plugins/behaviour/versionable/src/Extension/Versionable.php
+++ b/plugins/behaviour/versionable/src/Extension/Versionable.php
@@ -64,12 +64,12 @@ public function __construct(DispatcherInterface $dispatcher, array $config, /**
*
* @since 4.2.0
*/
- private readonly InputFilter $filter, /**
+ private readonly InputFilter $filter, /**
* The CMS helper
*
* @since 4.2.0
*/
- private readonly CMSHelper $helper)
+ private readonly CMSHelper $helper)
{
parent::__construct($dispatcher, $config);
}
diff --git a/plugins/content/fields/services/provider.php b/plugins/content/fields/services/provider.php
index d1e8f69897e4..25b97c58fa65 100644
--- a/plugins/content/fields/services/provider.php
+++ b/plugins/content/fields/services/provider.php
@@ -31,7 +31,7 @@ public function register(Container $container)
{
$container->set(
PluginInterface::class,
- fn(Container $container) => new Fields(
+ fn (Container $container) => new Fields(
$container->get(DispatcherInterface::class),
(array) PluginHelper::getPlugin('content', 'fields')
)
diff --git a/plugins/content/fields/src/Extension/Fields.php b/plugins/content/fields/src/Extension/Fields.php
index b91193d9ee9d..e7bd4f0cd3ff 100644
--- a/plugins/content/fields/src/Extension/Fields.php
+++ b/plugins/content/fields/src/Extension/Fields.php
@@ -152,7 +152,7 @@ private function prepare($string, $context, $item)
}
}
- $string = preg_replace(sprintf('|%s|', $match[0]), addcslashes((string) $output, '\\$'), (string) $string, 1);
+ $string = preg_replace(\sprintf('|%s|', $match[0]), addcslashes((string) $output, '\\$'), (string) $string, 1);
}
return $string;
diff --git a/plugins/content/joomla/src/Extension/Joomla.php b/plugins/content/joomla/src/Extension/Joomla.php
index dbaf1e3efbba..b7bde1370f72 100644
--- a/plugins/content/joomla/src/Extension/Joomla.php
+++ b/plugins/content/joomla/src/Extension/Joomla.php
@@ -10,7 +10,6 @@
namespace Joomla\Plugin\Content\Joomla\Extension;
-use Joomla\Component\Workflow\Administrator\Model\StagesModel;
use Joomla\CMS\Cache\CacheControllerFactory;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Event\Plugin\System\Schemaorg\BeforeCompileHeadEvent;
@@ -23,6 +22,7 @@
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\UserFactoryAwareTrait;
use Joomla\CMS\Workflow\WorkflowServiceInterface;
+use Joomla\Component\Workflow\Administrator\Model\StagesModel;
use Joomla\Component\Workflow\Administrator\Table\StageTable;
use Joomla\Component\Workflow\Administrator\Table\WorkflowTable;
use Joomla\Database\DatabaseAwareTrait;
@@ -172,9 +172,9 @@ public function onContentBeforeDelete($context, $data)
}
return match ($context) {
'com_categories.category' => $this->canDeleteCategories($data),
- 'com_workflow.workflow' => $this->workflowNotUsed($data->id),
- 'com_workflow.stage' => $this->stageNotUsed($data->id),
- default => true,
+ 'com_workflow.workflow' => $this->workflowNotUsed($data->id),
+ 'com_workflow.stage' => $this->stageNotUsed($data->id),
+ default => true,
};
}
diff --git a/plugins/content/pagenavigation/src/Extension/PageNavigation.php b/plugins/content/pagenavigation/src/Extension/PageNavigation.php
index 89404974cbf2..10da8e5db094 100644
--- a/plugins/content/pagenavigation/src/Extension/PageNavigation.php
+++ b/plugins/content/pagenavigation/src/Extension/PageNavigation.php
@@ -102,11 +102,11 @@ public function onContentBeforeDisplay($context, &$row, &$params, $page = 0)
} else {
// Determine sort order.
$orderby = match ($order_method) {
- 'alpha' => $db->quoteName('a.title'),
- 'ralpha' => $db->quoteName('a.title') . ' DESC',
- 'hits' => $db->quoteName('a.hits'),
- 'rhits' => $db->quoteName('a.hits') . ' DESC',
- 'author' => $db->quoteName(['a.created_by_alias', 'u.name']),
+ 'alpha' => $db->quoteName('a.title'),
+ 'ralpha' => $db->quoteName('a.title') . ' DESC',
+ 'hits' => $db->quoteName('a.hits'),
+ 'rhits' => $db->quoteName('a.hits') . ' DESC',
+ 'author' => $db->quoteName(['a.created_by_alias', 'u.name']),
'rauthor' => $db->quoteName('a.created_by_alias') . ' DESC, ' .
$db->quoteName('u.name') . ' DESC',
'front' => $db->quoteName('f.ordering'),
diff --git a/plugins/editors-xtd/image/src/Extension/Image.php b/plugins/editors-xtd/image/src/Extension/Image.php
index 9ce034b5a743..c9ab2ca9e7d3 100644
--- a/plugins/editors-xtd/image/src/Extension/Image.php
+++ b/plugins/editors-xtd/image/src/Extension/Image.php
@@ -10,13 +10,13 @@
namespace Joomla\Plugin\EditorsXtd\Image\Extension;
-use Joomla\CMS\WebAsset\WebAssetManager;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Editor\Button\Button;
use Joomla\CMS\Event\Editor\EditorButtonsSetupEvent;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\CMS\Uri\Uri;
+use Joomla\CMS\WebAsset\WebAssetManager;
use Joomla\Event\SubscriberInterface;
// phpcs:disable PSR1.Files.SideEffects
diff --git a/plugins/editors-xtd/readmore/src/Extension/ReadMore.php b/plugins/editors-xtd/readmore/src/Extension/ReadMore.php
index c901ffa5690c..8692e37e4d99 100644
--- a/plugins/editors-xtd/readmore/src/Extension/ReadMore.php
+++ b/plugins/editors-xtd/readmore/src/Extension/ReadMore.php
@@ -10,11 +10,11 @@
namespace Joomla\Plugin\EditorsXtd\ReadMore\Extension;
-use Joomla\CMS\WebAsset\WebAssetManager;
use Joomla\CMS\Editor\Button\Button;
use Joomla\CMS\Event\Editor\EditorButtonsSetupEvent;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Plugin\CMSPlugin;
+use Joomla\CMS\WebAsset\WebAssetManager;
use Joomla\Event\SubscriberInterface;
// phpcs:disable PSR1.Files.SideEffects
diff --git a/plugins/editors/codemirror/src/Provider/CodeMirrorProvider.php b/plugins/editors/codemirror/src/Provider/CodeMirrorProvider.php
index 12ab9a7e3df3..7b1b0887870c 100644
--- a/plugins/editors/codemirror/src/Provider/CodeMirrorProvider.php
+++ b/plugins/editors/codemirror/src/Provider/CodeMirrorProvider.php
@@ -34,8 +34,9 @@ public function __construct(/**
*
* @since 5.0.0
*/
- private readonly Registry $params, DispatcherInterface $dispatcher)
- {
+ private readonly Registry $params,
+ DispatcherInterface $dispatcher
+ ) {
$this->setDispatcher($dispatcher);
}
diff --git a/plugins/editors/none/src/Provider/EditorNoneProvider.php b/plugins/editors/none/src/Provider/EditorNoneProvider.php
index 4889f2f02ba6..774ba1c68d1e 100644
--- a/plugins/editors/none/src/Provider/EditorNoneProvider.php
+++ b/plugins/editors/none/src/Provider/EditorNoneProvider.php
@@ -9,9 +9,9 @@
namespace Joomla\Plugin\Editors\None\Provider;
-use Joomla\CMS\WebAsset\WebAssetManager;
use Joomla\CMS\Application\CMSApplicationInterface;
use Joomla\CMS\Editor\AbstractEditorProvider;
+use Joomla\CMS\WebAsset\WebAssetManager;
use Joomla\Event\DispatcherInterface;
/**
@@ -34,8 +34,9 @@ public function __construct(/**
*
* @since 5.2.0
*/
- private readonly CMSApplicationInterface $application, DispatcherInterface $dispatcher)
- {
+ private readonly CMSApplicationInterface $application,
+ DispatcherInterface $dispatcher
+ ) {
$this->setDispatcher($dispatcher);
}
diff --git a/plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php b/plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php
index 25e7f7d637f8..dc63ce431bb4 100644
--- a/plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php
+++ b/plugins/editors/tinymce/src/PluginTraits/DisplayTrait.php
@@ -276,8 +276,8 @@ public function display(string $name, string $content = '', array $attributes =
*/
$preset = match (true) {
isset($ugroups[4]) || isset($ugroups[7]) || isset($ugroups[8]) => $presets['advanced'],
- isset($ugroups[2]) || isset($ugroups[6]) => $presets['medium'],
- default => $presets['simple'],
+ isset($ugroups[2]) || isset($ugroups[6]) => $presets['medium'],
+ default => $presets['simple'],
};
$levelParams->loadArray($preset);
diff --git a/plugins/editors/tinymce/src/PluginTraits/ResolveFiles.php b/plugins/editors/tinymce/src/PluginTraits/ResolveFiles.php
index f292247a860d..3f50913e4eb5 100644
--- a/plugins/editors/tinymce/src/PluginTraits/ResolveFiles.php
+++ b/plugins/editors/tinymce/src/PluginTraits/ResolveFiles.php
@@ -52,13 +52,13 @@ protected function includeRelativeFiles($folder, $file)
: JPATH_ROOT . '/templates';
if (isset($template->parent) && $template->parent !== '') {
- $found = static::resolveFileUrl(sprintf('%s/%s/%s/%s', $templaPath, $template->template, $folder, $file));
+ $found = static::resolveFileUrl(\sprintf('%s/%s/%s/%s', $templaPath, $template->template, $folder, $file));
if (empty($found)) {
- $found = static::resolveFileUrl(sprintf('%s/%s/%s/%s', $templaPath, $template->parent, $folder, $file));
+ $found = static::resolveFileUrl(\sprintf('%s/%s/%s/%s', $templaPath, $template->parent, $folder, $file));
}
} else {
- $found = static::resolveFileUrl(sprintf('%s/%s/%s/%s', $templaPath, $template->template, $folder, $file));
+ $found = static::resolveFileUrl(\sprintf('%s/%s/%s/%s', $templaPath, $template->template, $folder, $file));
}
if (empty($found)) {
diff --git a/plugins/editors/tinymce/src/PluginTraits/XTDButtons.php b/plugins/editors/tinymce/src/PluginTraits/XTDButtons.php
index d3f3799b1419..cfb935bd91f2 100644
--- a/plugins/editors/tinymce/src/PluginTraits/XTDButtons.php
+++ b/plugins/editors/tinymce/src/PluginTraits/XTDButtons.php
@@ -10,10 +10,10 @@
namespace Joomla\Plugin\Editors\TinyMCE\PluginTraits;
-use Joomla\CMS\WebAsset\WebAssetManager;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Uri\Uri;
+use Joomla\CMS\WebAsset\WebAssetManager;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/plugins/extension/namespacemap/services/provider.php b/plugins/extension/namespacemap/services/provider.php
index 0ac9025e41e7..7d464ddcaf64 100644
--- a/plugins/extension/namespacemap/services/provider.php
+++ b/plugins/extension/namespacemap/services/provider.php
@@ -31,7 +31,7 @@ public function register(Container $container)
{
$container->set(
PluginInterface::class,
- fn(Container $container) => new NamespaceMap(
+ fn (Container $container) => new NamespaceMap(
$container->get(DispatcherInterface::class),
new JNamespacePsr4Map(),
(array) PluginHelper::getPlugin('extension', 'namespacemap')
diff --git a/plugins/extension/namespacemap/src/Extension/NamespaceMap.php b/plugins/extension/namespacemap/src/Extension/NamespaceMap.php
index 0e5d2aa63036..e36554ca2d71 100644
--- a/plugins/extension/namespacemap/src/Extension/NamespaceMap.php
+++ b/plugins/extension/namespacemap/src/Extension/NamespaceMap.php
@@ -42,7 +42,7 @@ final class NamespaceMap extends CMSPlugin implements SubscriberInterface
public function __construct(DispatcherInterface $dispatcher, /**
* The namespace map file creator
*/
- private readonly \JNamespacePsr4Map $fileCreator, array $config = [])
+ private readonly \JNamespacePsr4Map $fileCreator, array $config = [])
{
parent::__construct($dispatcher, $config);
}
diff --git a/plugins/fields/subform/src/Extension/Subform.php b/plugins/fields/subform/src/Extension/Subform.php
index 90b2ee240d97..d16c9045ab5f 100644
--- a/plugins/fields/subform/src/Extension/Subform.php
+++ b/plugins/fields/subform/src/Extension/Subform.php
@@ -10,12 +10,12 @@
namespace Joomla\Plugin\Fields\Subform\Extension;
-use Joomla\Registry\Registry;
use Joomla\CMS\Event\CustomFields\BeforePrepareFieldEvent;
use Joomla\CMS\Form\Form;
use Joomla\Component\Fields\Administrator\Helper\FieldsHelper;
use Joomla\Component\Fields\Administrator\Plugin\FieldsPlugin;
use Joomla\Event\SubscriberInterface;
+use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
@@ -199,7 +199,7 @@ public function onCustomFieldsPrepareField($context, $item, $field)
foreach ($this->getSubfieldsFromField($field) as $subfield) {
// Fill value (and rawvalue) if we have data for this subfield in the current row, otherwise set them to empty
$subfield->rawvalue = $row[$subfield->name] ?? '';
- $subfield->value = $row[$subfield->name] ?? '';
+ $subfield->value = $row[$subfield->name] ?? '';
// Do we want to render the value of this field, and is the value non-empty?
if ($subfield->value !== '' && $subfield->render_values == '1') {
/**
diff --git a/plugins/filesystem/local/src/Adapter/LocalAdapter.php b/plugins/filesystem/local/src/Adapter/LocalAdapter.php
index 4bcbd748b9bc..aa38aa35db28 100644
--- a/plugins/filesystem/local/src/Adapter/LocalAdapter.php
+++ b/plugins/filesystem/local/src/Adapter/LocalAdapter.php
@@ -66,19 +66,19 @@ public function __construct(string $rootPath, /**
*
* @since 4.0.0
*/
- private string $filePath, /**
+ private string $filePath, /**
* Should the adapter create a thumbnail for the image?
*
*
* @since 4.3.0
*/
- private bool $thumbnails = false, /**
+ private bool $thumbnails = false, /**
* Thumbnail dimensions in pixels, [0] = width, [1] = height
*
*
* @since 4.3.0
*/
- private array $thumbnailSize = [200, 200])
+ private array $thumbnailSize = [200, 200])
{
if (!file_exists($rootPath)) {
throw new \InvalidArgumentException(Text::_('COM_MEDIA_ERROR_MISSING_DIR'));
diff --git a/plugins/filesystem/local/src/Extension/Local.php b/plugins/filesystem/local/src/Extension/Local.php
index fbba54b19fa3..17a0a1bad475 100644
--- a/plugins/filesystem/local/src/Extension/Local.php
+++ b/plugins/filesystem/local/src/Extension/Local.php
@@ -10,8 +10,8 @@
namespace Joomla\Plugin\Filesystem\Local\Extension;
-use Joomla\Component\Media\Administrator\Adapter\AdapterInterface;
use Joomla\CMS\Plugin\CMSPlugin;
+use Joomla\Component\Media\Administrator\Adapter\AdapterInterface;
use Joomla\Component\Media\Administrator\Event\MediaProviderEvent;
use Joomla\Component\Media\Administrator\Provider\ProviderInterface;
use Joomla\Event\DispatcherInterface;
@@ -52,7 +52,7 @@ public function __construct(DispatcherInterface $dispatcher, array $config, /**
*
* @since 4.3.0
*/
- private readonly string $rootDirectory)
+ private readonly string $rootDirectory)
{
parent::__construct($dispatcher, $config);
}
diff --git a/plugins/installer/override/src/Extension/Override.php b/plugins/installer/override/src/Extension/Override.php
index 087732bbfbac..672781c3f75f 100644
--- a/plugins/installer/override/src/Extension/Override.php
+++ b/plugins/installer/override/src/Extension/Override.php
@@ -10,14 +10,14 @@
namespace Joomla\Plugin\Installer\Override\Extension;
-use Joomla\Component\Templates\Administrator\Model\TemplateModel;
-use Joomla\Component\Templates\Administrator\Extension\TemplatesComponent;
-use Joomla\Database\Exception\ExecutionFailureException;
-use Joomla\Database\Exception\ConnectionFailureException;
use Joomla\CMS\Date\Date;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Plugin\CMSPlugin;
+use Joomla\Component\Templates\Administrator\Extension\TemplatesComponent;
+use Joomla\Component\Templates\Administrator\Model\TemplateModel;
use Joomla\Database\DatabaseAwareTrait;
+use Joomla\Database\Exception\ConnectionFailureException;
+use Joomla\Database\Exception\ExecutionFailureException;
use Joomla\Database\ParameterType;
use Joomla\Event\SubscriberInterface;
diff --git a/plugins/media-action/resize/src/Extension/Resize.php b/plugins/media-action/resize/src/Extension/Resize.php
index 1a533607984a..65ea16684d92 100644
--- a/plugins/media-action/resize/src/Extension/Resize.php
+++ b/plugins/media-action/resize/src/Extension/Resize.php
@@ -84,10 +84,10 @@ public function onContentBeforeSave(BeforeSaveEvent $event): void
);
$type = match (strtolower($item->extension)) {
- 'gif' => IMAGETYPE_GIF,
- 'png' => IMAGETYPE_PNG,
- 'avif' => IMAGETYPE_AVIF,
- 'webp' => IMAGETYPE_WEBP,
+ 'gif' => IMAGETYPE_GIF,
+ 'png' => IMAGETYPE_PNG,
+ 'avif' => IMAGETYPE_AVIF,
+ 'webp' => IMAGETYPE_WEBP,
default => IMAGETYPE_JPEG,
};
diff --git a/plugins/multifactorauth/email/src/Extension/Email.php b/plugins/multifactorauth/email/src/Extension/Email.php
index a52871f7d94a..026fa1b1e287 100644
--- a/plugins/multifactorauth/email/src/Extension/Email.php
+++ b/plugins/multifactorauth/email/src/Extension/Email.php
@@ -445,7 +445,7 @@ public function onUserMultifactorBeforeDisplayMethods(BeforeDisplayMethods $even
// If I already have the email Method go back
$emailRecords = array_filter(
$userMfaRecords,
- fn(MfaTable $record) => $record->method == 'email'
+ fn (MfaTable $record) => $record->method == 'email'
);
if ($emailRecords !== []) {
diff --git a/plugins/multifactorauth/fixed/services/provider.php b/plugins/multifactorauth/fixed/services/provider.php
index fcb0ad7196ea..982b563f6a1c 100644
--- a/plugins/multifactorauth/fixed/services/provider.php
+++ b/plugins/multifactorauth/fixed/services/provider.php
@@ -31,7 +31,7 @@ public function register(Container $container)
{
$container->set(
PluginInterface::class,
- fn(Container $container) => new Fixed($container->get(DispatcherInterface::class), (array) PluginHelper::getPlugin('multifactorauth', 'fixed'))
+ fn (Container $container) => new Fixed($container->get(DispatcherInterface::class), (array) PluginHelper::getPlugin('multifactorauth', 'fixed'))
);
}
};
diff --git a/plugins/multifactorauth/yubikey/src/Extension/Yubikey.php b/plugins/multifactorauth/yubikey/src/Extension/Yubikey.php
index bc0557f9194b..65fd9da06d68 100644
--- a/plugins/multifactorauth/yubikey/src/Extension/Yubikey.php
+++ b/plugins/multifactorauth/yubikey/src/Extension/Yubikey.php
@@ -315,7 +315,7 @@ public function onUserMultifactorValidate(Validate $event): void
$records = MfaHelper::getUserMfaRecords($record->user_id);
$records = array_filter(
$records,
- fn($rec) => $rec->method === $record->method
+ fn ($rec) => $rec->method === $record->method
);
} catch (\Exception) {
$records = [];
@@ -324,7 +324,7 @@ public function onUserMultifactorValidate(Validate $event): void
// Loop all records, stop if at least one matches
$result = array_reduce(
$records,
- fn(bool $carry, $aRecord) => $carry || $this->validateAgainstRecord($aRecord, $code),
+ fn (bool $carry, $aRecord) => $carry || $this->validateAgainstRecord($aRecord, $code),
false
);
diff --git a/plugins/privacy/actionlogs/src/Extension/Actionlogs.php b/plugins/privacy/actionlogs/src/Extension/Actionlogs.php
index a8b094164309..a1f27b351486 100644
--- a/plugins/privacy/actionlogs/src/Extension/Actionlogs.php
+++ b/plugins/privacy/actionlogs/src/Extension/Actionlogs.php
@@ -10,8 +10,8 @@
namespace Joomla\Plugin\Privacy\Actionlogs\Extension;
-use Joomla\CMS\User\User;
use Joomla\CMS\Event\Privacy\ExportRequestEvent;
+use Joomla\CMS\User\User;
use Joomla\Component\Actionlogs\Administrator\Helper\ActionlogsHelper;
use Joomla\Component\Privacy\Administrator\Plugin\PrivacyPlugin;
use Joomla\Database\ParameterType;
diff --git a/plugins/privacy/consents/src/Extension/Consents.php b/plugins/privacy/consents/src/Extension/Consents.php
index fdd524bbf250..85ba75c849b9 100644
--- a/plugins/privacy/consents/src/Extension/Consents.php
+++ b/plugins/privacy/consents/src/Extension/Consents.php
@@ -10,8 +10,8 @@
namespace Joomla\Plugin\Privacy\Consents\Extension;
-use Joomla\Component\Privacy\Administrator\Export\Domain;
use Joomla\CMS\User\User;
+use Joomla\Component\Privacy\Administrator\Export\Domain;
use Joomla\Component\Privacy\Administrator\Plugin\PrivacyPlugin;
use Joomla\Component\Privacy\Administrator\Table\RequestTable;
use Joomla\Database\ParameterType;
diff --git a/plugins/privacy/contact/src/Extension/Contact.php b/plugins/privacy/contact/src/Extension/Contact.php
index fef8e6b4c38f..d89959b6a14a 100644
--- a/plugins/privacy/contact/src/Extension/Contact.php
+++ b/plugins/privacy/contact/src/Extension/Contact.php
@@ -10,8 +10,8 @@
namespace Joomla\Plugin\Privacy\Contact\Extension;
-use Joomla\Component\Privacy\Administrator\Export\Domain;
use Joomla\CMS\User\User;
+use Joomla\Component\Privacy\Administrator\Export\Domain;
use Joomla\Component\Privacy\Administrator\Plugin\PrivacyPlugin;
use Joomla\Component\Privacy\Administrator\Table\RequestTable;
use Joomla\Database\ParameterType;
diff --git a/plugins/privacy/content/src/Extension/Content.php b/plugins/privacy/content/src/Extension/Content.php
index 9a0d8f20e23a..6c02cb0652c0 100644
--- a/plugins/privacy/content/src/Extension/Content.php
+++ b/plugins/privacy/content/src/Extension/Content.php
@@ -10,8 +10,8 @@
namespace Joomla\Plugin\Privacy\Content\Extension;
-use Joomla\Component\Privacy\Administrator\Export\Domain;
use Joomla\CMS\User\User;
+use Joomla\Component\Privacy\Administrator\Export\Domain;
use Joomla\Component\Privacy\Administrator\Plugin\PrivacyPlugin;
use Joomla\Component\Privacy\Administrator\Table\RequestTable;
diff --git a/plugins/privacy/message/src/Extension/Message.php b/plugins/privacy/message/src/Extension/Message.php
index 33c7cd8eb6ff..554c105fea43 100644
--- a/plugins/privacy/message/src/Extension/Message.php
+++ b/plugins/privacy/message/src/Extension/Message.php
@@ -10,8 +10,8 @@
namespace Joomla\Plugin\Privacy\Message\Extension;
-use Joomla\Component\Privacy\Administrator\Export\Domain;
use Joomla\CMS\User\User;
+use Joomla\Component\Privacy\Administrator\Export\Domain;
use Joomla\Component\Privacy\Administrator\Plugin\PrivacyPlugin;
use Joomla\Component\Privacy\Administrator\Table\RequestTable;
use Joomla\Database\ParameterType;
diff --git a/plugins/privacy/user/src/Extension/UserPlugin.php b/plugins/privacy/user/src/Extension/UserPlugin.php
index 647125a8b5c0..245a80335408 100644
--- a/plugins/privacy/user/src/Extension/UserPlugin.php
+++ b/plugins/privacy/user/src/Extension/UserPlugin.php
@@ -10,8 +10,6 @@
namespace Joomla\Plugin\Privacy\User\Extension;
-use Joomla\Component\Privacy\Administrator\Export\Domain;
-use Joomla\Component\Privacy\Administrator\Export\Item;
use Joomla\CMS\Event\Privacy\CanRemoveDataEvent;
use Joomla\CMS\Event\Privacy\ExportRequestEvent;
use Joomla\CMS\Event\Privacy\RemoveDataEvent;
@@ -19,6 +17,8 @@
use Joomla\CMS\Table\User as TableUser;
use Joomla\CMS\User\User;
use Joomla\CMS\User\UserHelper;
+use Joomla\Component\Privacy\Administrator\Export\Domain;
+use Joomla\Component\Privacy\Administrator\Export\Item;
use Joomla\Component\Privacy\Administrator\Plugin\PrivacyPlugin;
use Joomla\Component\Privacy\Administrator\Removal\Status;
use Joomla\Database\ParameterType;
diff --git a/plugins/quickicon/joomlaupdate/src/Extension/Joomlaupdate.php b/plugins/quickicon/joomlaupdate/src/Extension/Joomlaupdate.php
index 5f3567f328ec..616f97d51432 100644
--- a/plugins/quickicon/joomlaupdate/src/Extension/Joomlaupdate.php
+++ b/plugins/quickicon/joomlaupdate/src/Extension/Joomlaupdate.php
@@ -69,7 +69,7 @@ public function __construct($dispatcher, /**
*
* @since 4.0.0
*/
- private readonly Document $document, array $config = [])
+ private readonly Document $document, array $config = [])
{
parent::__construct($dispatcher, $config);
}
diff --git a/plugins/sampledata/blog/src/Extension/Blog.php b/plugins/sampledata/blog/src/Extension/Blog.php
index 4daf4c724289..9a60afa61fc5 100644
--- a/plugins/sampledata/blog/src/Extension/Blog.php
+++ b/plugins/sampledata/blog/src/Extension/Blog.php
@@ -10,12 +10,6 @@
namespace Joomla\Plugin\SampleData\Blog\Extension;
-use Joomla\Component\Workflow\Administrator\Table\WorkflowTable;
-use Joomla\Component\Workflow\Administrator\Table\StageTable;
-use Joomla\Component\Workflow\Administrator\Table\TransitionTable;
-use Joomla\Component\Menus\Administrator\Table\MenuTypeTable;
-use Joomla\Component\Menus\Administrator\Model\ItemModel;
-use Joomla\Component\Modules\Administrator\Model\ModuleModel;
use Joomla\CMS\Application\ApplicationHelper;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Extension\ExtensionHelper;
@@ -25,6 +19,12 @@
use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Session\Session;
+use Joomla\Component\Menus\Administrator\Model\ItemModel;
+use Joomla\Component\Menus\Administrator\Table\MenuTypeTable;
+use Joomla\Component\Modules\Administrator\Model\ModuleModel;
+use Joomla\Component\Workflow\Administrator\Table\StageTable;
+use Joomla\Component\Workflow\Administrator\Table\TransitionTable;
+use Joomla\Component\Workflow\Administrator\Table\WorkflowTable;
use Joomla\Database\DatabaseAwareTrait;
use Joomla\Database\ParameterType;
diff --git a/plugins/sampledata/testing/src/Extension/Testing.php b/plugins/sampledata/testing/src/Extension/Testing.php
index 3acf91889d41..6d1a00de150a 100644
--- a/plugins/sampledata/testing/src/Extension/Testing.php
+++ b/plugins/sampledata/testing/src/Extension/Testing.php
@@ -10,18 +10,18 @@
namespace Joomla\Plugin\SampleData\Testing\Extension;
-use Joomla\Component\Menus\Administrator\Model\ItemModel;
-use Joomla\Component\Tags\Administrator\Model\TagModel;
-use Joomla\Component\Banners\Administrator\Model\ClientModel;
-use Joomla\Component\Banners\Administrator\Model\BannerModel;
-use Joomla\Component\Newsfeeds\Administrator\Model\NewsfeedModel;
-use Joomla\Component\Menus\Administrator\Model\MenuModel;
-use Joomla\Component\Content\Administrator\Model\ArticleModel;
use Joomla\CMS\Application\ApplicationHelper;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Plugin\CMSPlugin;
+use Joomla\Component\Banners\Administrator\Model\BannerModel;
+use Joomla\Component\Banners\Administrator\Model\ClientModel;
use Joomla\Component\Categories\Administrator\Model\CategoryModel;
+use Joomla\Component\Content\Administrator\Model\ArticleModel;
+use Joomla\Component\Menus\Administrator\Model\ItemModel;
+use Joomla\Component\Menus\Administrator\Model\MenuModel;
+use Joomla\Component\Newsfeeds\Administrator\Model\NewsfeedModel;
+use Joomla\Component\Tags\Administrator\Model\TagModel;
use Joomla\Database\DatabaseAwareTrait;
// phpcs:disable PSR1.Files.SideEffects
diff --git a/plugins/schemaorg/custom/src/Extension/Custom.php b/plugins/schemaorg/custom/src/Extension/Custom.php
index c209034303ab..e2a35091a478 100644
--- a/plugins/schemaorg/custom/src/Extension/Custom.php
+++ b/plugins/schemaorg/custom/src/Extension/Custom.php
@@ -81,7 +81,7 @@ public function onSchemaPrepareSave(PrepareSaveEvent $event): void
return;
}
- if (!isset($json['@context']) || in_array(preg_match('#^https://schema.org/?$#', (string) $json['@context']), [0, false], true) || !isset($json['@type'])) {
+ if (!isset($json['@context']) || \in_array(preg_match('#^https://schema.org/?$#', (string) $json['@context']), [0, false], true) || !isset($json['@type'])) {
$this->getApplication()->enqueueMessage(Text::_('PLG_SCHEMAORG_CUSTOM_JSON_ERROR'), 'error');
return;
}
diff --git a/plugins/system/actionlogs/src/Extension/ActionLogs.php b/plugins/system/actionlogs/src/Extension/ActionLogs.php
index 9ddbb6e5c2f6..b3e9290c7964 100644
--- a/plugins/system/actionlogs/src/Extension/ActionLogs.php
+++ b/plugins/system/actionlogs/src/Extension/ActionLogs.php
@@ -10,13 +10,13 @@
namespace Joomla\Plugin\System\ActionLogs\Extension;
-use Joomla\CMS\Table\Table;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Form\Form;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\CMS\Plugin\PluginHelper;
+use Joomla\CMS\Table\Table;
use Joomla\CMS\User\UserFactoryAwareTrait;
use Joomla\Component\Actionlogs\Administrator\Helper\ActionlogsHelper;
use Joomla\Database\DatabaseAwareTrait;
diff --git a/plugins/system/cache/src/Extension/Cache.php b/plugins/system/cache/src/Extension/Cache.php
index d3975a215815..a6a99989dc60 100644
--- a/plugins/system/cache/src/Extension/Cache.php
+++ b/plugins/system/cache/src/Extension/Cache.php
@@ -317,7 +317,7 @@ private function isExcluded(): bool
$exclusions = str_replace(["\r\n", "\r"], "\n", $exclusions);
$exclusions = explode("\n", $exclusions);
$exclusions = array_map('trim', $exclusions);
- $filterExpression = (fn($x) => $x !== '');
+ $filterExpression = (fn ($x) => $x !== '');
$exclusions = array_filter($exclusions, $filterExpression);
// Gets the internal (non-SEF) and the external (possibly SEF) URIs.
diff --git a/plugins/system/debug/services/provider.php b/plugins/system/debug/services/provider.php
index a7e0880e768f..39101f3c406d 100644
--- a/plugins/system/debug/services/provider.php
+++ b/plugins/system/debug/services/provider.php
@@ -33,7 +33,7 @@ public function register(Container $container): void
{
$container->set(
PluginInterface::class,
- fn(Container $container) => new Debug(
+ fn (Container $container) => new Debug(
$container->get(DispatcherInterface::class),
(array) PluginHelper::getPlugin('system', 'debug'),
Factory::getApplication(),
diff --git a/plugins/system/debug/src/DataCollector/InfoCollector.php b/plugins/system/debug/src/DataCollector/InfoCollector.php
index db36419152e4..71921a5df24b 100644
--- a/plugins/system/debug/src/DataCollector/InfoCollector.php
+++ b/plugins/system/debug/src/DataCollector/InfoCollector.php
@@ -50,7 +50,7 @@ public function __construct(Registry $params, /**
*
* @since 4.0.0
*/
- private $requestId)
+ private $requestId)
{
parent::__construct($params);
}
diff --git a/plugins/system/debug/src/DataCollector/LanguageStringsCollector.php b/plugins/system/debug/src/DataCollector/LanguageStringsCollector.php
index c4b677a96fbe..2b81960d97b5 100644
--- a/plugins/system/debug/src/DataCollector/LanguageStringsCollector.php
+++ b/plugins/system/debug/src/DataCollector/LanguageStringsCollector.php
@@ -140,11 +140,11 @@ private function getData(): array
$line = $stack['line'] ?? '';
$caller = $this->formatCallerInfo($stack);
- $location = $file && $line ? sprintf('%s:%s', $file, $line) : 'same';
+ $location = $file && $line ? \sprintf('%s:%s', $file, $line) : 'same';
$isCaller = 0;
- if (($callerLocation === '' || $callerLocation === '0') && $class !== Language::class && in_array(strpos((string) $file, 'Text.php'), [0, false], true)) {
+ if (($callerLocation === '' || $callerLocation === '0') && $class !== Language::class && \in_array(strpos((string) $file, 'Text.php'), [0, false], true)) {
$callerLocation = $location;
$isCaller = 1;
}
diff --git a/plugins/system/debug/src/DataCollector/ProfileCollector.php b/plugins/system/debug/src/DataCollector/ProfileCollector.php
index 7e29fff7f41b..13bd46da0e8c 100644
--- a/plugins/system/debug/src/DataCollector/ProfileCollector.php
+++ b/plugins/system/debug/src/DataCollector/ProfileCollector.php
@@ -126,7 +126,7 @@ public function stopMeasure($name, array $params = [])
$end = microtime(true);
if (!$this->hasStartedMeasure($name)) {
- throw new DebugBarException(sprintf("Failed stopping measure '%s' because it hasn't been started", $name));
+ throw new DebugBarException(\sprintf("Failed stopping measure '%s' because it hasn't been started", $name));
}
$this->addMeasure($this->startedMeasures[$name]['label'], $this->startedMeasures[$name]['start'], $end, $params, $this->startedMeasures[$name]['collector']);
@@ -267,7 +267,7 @@ public function collect(): array
foreach ($marks as $mark) {
$mem = $this->getDataFormatter()->formatBytes(abs($mark->memory) * 1048576);
- $label = $mark->label . sprintf(' (%s)', $mem);
+ $label = $mark->label . \sprintf(' (%s)', $mem);
$end = $start + $mark->time / 1000;
$this->addMeasure($label, $start, $end);
$start = $end;
@@ -279,7 +279,7 @@ public function collect(): array
usort(
$this->measures,
- fn($a, $b) => $a['start'] <=> $b['start']
+ fn ($a, $b) => $a['start'] <=> $b['start']
);
return [
diff --git a/plugins/system/debug/src/DataCollector/QueryCollector.php b/plugins/system/debug/src/DataCollector/QueryCollector.php
index b8d02505211e..67673a3b1794 100644
--- a/plugins/system/debug/src/DataCollector/QueryCollector.php
+++ b/plugins/system/debug/src/DataCollector/QueryCollector.php
@@ -10,9 +10,9 @@
namespace Joomla\Plugin\System\Debug\DataCollector;
-use Joomla\Database\DatabaseDriver;
use DebugBar\DataCollector\AssetProvider;
use Joomla\CMS\Uri\Uri;
+use Joomla\Database\DatabaseDriver;
use Joomla\Database\Monitor\DebugMonitor;
use Joomla\Plugin\System\Debug\AbstractDataCollector;
use Joomla\Registry\Registry;
@@ -67,17 +67,17 @@ public function __construct(Registry $params, /**
*
* @since 4.0.0
*/
- private readonly DebugMonitor $queryMonitor, /**
+ private readonly DebugMonitor $queryMonitor, /**
* Profile data.
*
* @since 4.0.0
*/
- private array $profiles, /**
+ private array $profiles, /**
* Explain data.
*
* @since 4.0.0
*/
- private array $explains)
+ private array $explains)
{
parent::__construct($params);
}
@@ -202,7 +202,7 @@ private function getStatements(): array
$line = $stack['line'] ?? '';
$caller = $this->formatCallerInfo($stack);
- $location = $file && $line ? sprintf('%s:%s', $file, $line) : 'same';
+ $location = $file && $line ? \sprintf('%s:%s', $file, $line) : 'same';
$isCaller = 0;
diff --git a/plugins/system/debug/src/DataCollector/RequestDataCollector.php b/plugins/system/debug/src/DataCollector/RequestDataCollector.php
index c51ba3fe019e..c84a775aacbb 100644
--- a/plugins/system/debug/src/DataCollector/RequestDataCollector.php
+++ b/plugins/system/debug/src/DataCollector/RequestDataCollector.php
@@ -47,7 +47,7 @@ public function collect()
}
array_walk_recursive($data, static function (&$value, $key) {
- if (in_array(preg_match(Debug::PROTECTED_COLLECTOR_KEYS, (string) $key), [0, false], true)) {
+ if (\in_array(preg_match(Debug::PROTECTED_COLLECTOR_KEYS, (string) $key), [0, false], true)) {
return;
}
diff --git a/plugins/system/debug/src/DataCollector/SessionCollector.php b/plugins/system/debug/src/DataCollector/SessionCollector.php
index f03091cb7924..41c515db9eca 100644
--- a/plugins/system/debug/src/DataCollector/SessionCollector.php
+++ b/plugins/system/debug/src/DataCollector/SessionCollector.php
@@ -76,7 +76,7 @@ public function collect($overwrite = false)
// redact value of potentially secret keys
array_walk_recursive($data, static function (&$value, $key) {
- if (in_array(preg_match(Debug::PROTECTED_COLLECTOR_KEYS, $key), [0, false], true)) {
+ if (\in_array(preg_match(Debug::PROTECTED_COLLECTOR_KEYS, $key), [0, false], true)) {
return;
}
diff --git a/plugins/system/debug/src/Extension/Debug.php b/plugins/system/debug/src/Extension/Debug.php
index 58f49d10b972..646230066d5c 100644
--- a/plugins/system/debug/src/Extension/Debug.php
+++ b/plugins/system/debug/src/Extension/Debug.php
@@ -10,7 +10,6 @@
namespace Joomla\Plugin\System\Debug\Extension;
-use Joomla\Database\Monitor\DebugMonitor;
use DebugBar\DataCollector\MessagesCollector;
use DebugBar\DebugBar;
use DebugBar\OpenHandler;
@@ -28,6 +27,7 @@
use Joomla\Database\DatabaseAwareTrait;
use Joomla\Database\DatabaseInterface;
use Joomla\Database\Event\ConnectionEvent;
+use Joomla\Database\Monitor\DebugMonitor;
use Joomla\Event\DispatcherInterface;
use Joomla\Event\Priority;
use Joomla\Event\SubscriberInterface;
@@ -635,7 +635,7 @@ private function collectLogs()
$level = match ($entry->priority) {
Log::EMERGENCY, Log::ALERT, Log::CRITICAL, Log::ERROR => 'error',
Log::WARNING => 'warning',
- default => 'info',
+ default => 'info',
};
$this->debugBar['log']->addMessage($entry->category . ' - ' . $entry->message, $level);
diff --git a/plugins/system/debug/src/JavascriptRenderer.php b/plugins/system/debug/src/JavascriptRenderer.php
index 2c5b02a66bf4..39372235e648 100644
--- a/plugins/system/debug/src/JavascriptRenderer.php
+++ b/plugins/system/debug/src/JavascriptRenderer.php
@@ -55,7 +55,7 @@ public function __construct(DebugBar $debugBar, $baseUrl = null, $basePath = nul
*/
public function renderHead()
{
- [$cssFiles, $jsFiles, $inlineCss, $inlineJs, $inlineHead] = $this->getAssets(null, self::RELATIVE_URL);
+ [$cssFiles, $jsFiles, $inlineCss, $inlineJs, $inlineHead] = $this->getAssets(null, self::RELATIVE_URL);
$html = '';
$doc = Factory::getApplication()->getDocument();
diff --git a/plugins/system/debug/src/JoomlaHttpDriver.php b/plugins/system/debug/src/JoomlaHttpDriver.php
index 8511cc4b2fb0..732a5fc8766a 100644
--- a/plugins/system/debug/src/JoomlaHttpDriver.php
+++ b/plugins/system/debug/src/JoomlaHttpDriver.php
@@ -44,8 +44,7 @@ public function __construct(
* @since 4.1.5
*/
private readonly CMSApplicationInterface $app
- )
- {
+ ) {
}
/**
diff --git a/plugins/system/debug/src/Storage/FileStorage.php b/plugins/system/debug/src/Storage/FileStorage.php
index 29c7e5608ddd..12df9e052280 100644
--- a/plugins/system/debug/src/Storage/FileStorage.php
+++ b/plugins/system/debug/src/Storage/FileStorage.php
@@ -10,8 +10,8 @@
namespace Joomla\Plugin\System\Debug\Storage;
-use Joomla\CMS\User\User;
use Joomla\CMS\Factory;
+use Joomla\CMS\User\User;
use Joomla\CMS\User\UserFactoryInterface;
use Joomla\Filesystem\File;
use Joomla\Filesystem\Folder;
@@ -93,7 +93,7 @@ public function find(array $filters = [], $max = 20, $offset = 0)
// Sort the files, newest first
usort(
$files,
- fn($a, $b) => $b['time'] <=> $a['time']
+ fn ($a, $b) => $b['time'] <=> $a['time']
);
// Load the metadata and filter the results.
diff --git a/plugins/system/fields/src/Extension/Fields.php b/plugins/system/fields/src/Extension/Fields.php
index 0079a64bd7f4..8aa3730a9836 100644
--- a/plugins/system/fields/src/Extension/Fields.php
+++ b/plugins/system/fields/src/Extension/Fields.php
@@ -10,20 +10,20 @@
namespace Joomla\Plugin\System\Fields\Extension;
-use Joomla\CMS\Event\Model\NormaliseRequestDataEvent;
-use Joomla\CMS\Event\Model\PrepareFormEvent;
+use Joomla\CMS\Event\Content;
+use Joomla\CMS\Event\Content\AfterDisplayEvent;
use Joomla\CMS\Event\Content\AfterTitleEvent;
use Joomla\CMS\Event\Content\BeforeDisplayEvent;
-use Joomla\CMS\Event\Content\AfterDisplayEvent;
use Joomla\CMS\Event\Content\ContentPrepareEvent;
-use Joomla\CMS\Table\Table;
-use Joomla\Component\Fields\Administrator\Model\FieldModel;
-use Joomla\CMS\Event\Content;
use Joomla\CMS\Event\Model;
+use Joomla\CMS\Event\Model\NormaliseRequestDataEvent;
+use Joomla\CMS\Event\Model\PrepareFormEvent;
use Joomla\CMS\Language\Multilanguage;
use Joomla\CMS\Plugin\CMSPlugin;
+use Joomla\CMS\Table\Table;
use Joomla\CMS\User\UserFactoryAwareTrait;
use Joomla\Component\Fields\Administrator\Helper\FieldsHelper;
+use Joomla\Component\Fields\Administrator\Model\FieldModel;
use Joomla\Registry\Registry;
// phpcs:disable PSR1.Files.SideEffects
diff --git a/plugins/system/highlight/src/Extension/Highlight.php b/plugins/system/highlight/src/Extension/Highlight.php
index 889c52754bf2..5e269aae51f3 100644
--- a/plugins/system/highlight/src/Extension/Highlight.php
+++ b/plugins/system/highlight/src/Extension/Highlight.php
@@ -10,8 +10,8 @@
namespace Joomla\Plugin\System\Highlight\Extension;
-use Joomla\CMS\Document\HtmlDocument;
use Joomla\CMS\Component\ComponentHelper;
+use Joomla\CMS\Document\HtmlDocument;
use Joomla\CMS\Filter\InputFilter;
use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\CMS\Uri\Uri;
diff --git a/plugins/system/httpheaders/postinstall/introduction.php b/plugins/system/httpheaders/postinstall/introduction.php
index 58103e4d9d7b..b529864e53b6 100644
--- a/plugins/system/httpheaders/postinstall/introduction.php
+++ b/plugins/system/httpheaders/postinstall/introduction.php
@@ -7,8 +7,8 @@
* @copyright (C) 2018 Open Source Matters, Inc.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
-use Joomla\CMS\Plugin\PluginHelper;
use Joomla\CMS\Factory;
+use Joomla\CMS\Plugin\PluginHelper;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/plugins/system/jooa11y/src/Extension/Jooa11y.php b/plugins/system/jooa11y/src/Extension/Jooa11y.php
index 2140dd8e1a3d..12f3ccfc4470 100644
--- a/plugins/system/jooa11y/src/Extension/Jooa11y.php
+++ b/plugins/system/jooa11y/src/Extension/Jooa11y.php
@@ -10,8 +10,8 @@
namespace Joomla\Plugin\System\Jooa11y\Extension;
-use Joomla\CMS\WebAsset\WebAssetManager;
use Joomla\CMS\Plugin\CMSPlugin;
+use Joomla\CMS\WebAsset\WebAssetManager;
use Joomla\Event\SubscriberInterface;
// phpcs:disable PSR1.Files.SideEffects
@@ -173,7 +173,7 @@ public function initJooa11y()
// Process extra props
$extraProps = [];
foreach ($getExtraProps as $prop) {
- $decodedValue = json_decode($prop->value);
+ $decodedValue = json_decode($prop->value);
$extraProps[$prop->key] = is_numeric($decodedValue) || \is_bool($decodedValue) ? $decodedValue : $prop->value;
}
diff --git a/plugins/system/languagefilter/src/Extension/LanguageFilter.php b/plugins/system/languagefilter/src/Extension/LanguageFilter.php
index 6a9363b412f9..2f916f06b8c8 100644
--- a/plugins/system/languagefilter/src/Extension/LanguageFilter.php
+++ b/plugins/system/languagefilter/src/Extension/LanguageFilter.php
@@ -632,7 +632,7 @@ public function onUserLogin(LoginEvent $event)
$lang_code = $this->current_lang;
}
// Try to get association from the current active menu item
- $active = $menu->getActive();
+ $active = $menu->getActive();
$foundAssociation = false;
/**
* Looking for associations.
diff --git a/plugins/system/logout/services/provider.php b/plugins/system/logout/services/provider.php
index 8221bbdbdc5c..184a9f7394af 100644
--- a/plugins/system/logout/services/provider.php
+++ b/plugins/system/logout/services/provider.php
@@ -32,7 +32,7 @@ public function register(Container $container): void
{
$container->set(
PluginInterface::class,
- fn(Container $container) => new Logout(
+ fn (Container $container) => new Logout(
$container->get(DispatcherInterface::class),
(array) PluginHelper::getPlugin('system', 'logout'),
Factory::getApplication()
diff --git a/plugins/system/schedulerunner/src/Extension/ScheduleRunner.php b/plugins/system/schedulerunner/src/Extension/ScheduleRunner.php
index 7c42ea93b143..6ffdbfe50f92 100644
--- a/plugins/system/schedulerunner/src/Extension/ScheduleRunner.php
+++ b/plugins/system/schedulerunner/src/Extension/ScheduleRunner.php
@@ -10,9 +10,9 @@
namespace Joomla\Plugin\System\ScheduleRunner\Extension;
-use Joomla\CMS\Event\Model\PrepareFormEvent;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Event\Model;
+use Joomla\CMS\Event\Model\PrepareFormEvent;
use Joomla\CMS\Factory;
use Joomla\CMS\Log\Log;
use Joomla\CMS\Plugin\CMSPlugin;
diff --git a/plugins/system/schemaorg/src/Extension/Schemaorg.php b/plugins/system/schemaorg/src/Extension/Schemaorg.php
index d01895d774ac..b144e81a32fa 100644
--- a/plugins/system/schemaorg/src/Extension/Schemaorg.php
+++ b/plugins/system/schemaorg/src/Extension/Schemaorg.php
@@ -10,9 +10,9 @@
namespace Joomla\Plugin\System\Schemaorg\Extension;
-use Joomla\CMS\Event\Model\AfterSaveEvent;
-use Joomla\CMS\Event\Model\AfterDeleteEvent;
use Joomla\CMS\Event\Model;
+use Joomla\CMS\Event\Model\AfterDeleteEvent;
+use Joomla\CMS\Event\Model\AfterSaveEvent;
use Joomla\CMS\Event\Plugin\System\Schemaorg\BeforeCompileHeadEvent;
use Joomla\CMS\Event\Plugin\System\Schemaorg\PrepareDataEvent;
use Joomla\CMS\Event\Plugin\System\Schemaorg\PrepareFormEvent;
diff --git a/plugins/system/sef/src/Extension/Sef.php b/plugins/system/sef/src/Extension/Sef.php
index 487de04710ff..ca6c9a73eb1e 100644
--- a/plugins/system/sef/src/Extension/Sef.php
+++ b/plugins/system/sef/src/Extension/Sef.php
@@ -481,8 +481,8 @@ private function checkBuffer($buffer)
$message = match (preg_last_error()) {
PREG_BACKTRACK_LIMIT_ERROR => 'PHP regular expression limit reached (pcre.backtrack_limit)',
PREG_RECURSION_LIMIT_ERROR => 'PHP regular expression limit reached (pcre.recursion_limit)',
- PREG_BAD_UTF8_ERROR => 'Bad UTF8 passed to PCRE function',
- default => 'Unknown PCRE error calling PCRE function',
+ PREG_BAD_UTF8_ERROR => 'Bad UTF8 passed to PCRE function',
+ default => 'Unknown PCRE error calling PCRE function',
};
throw new \RuntimeException($message);
diff --git a/plugins/system/skipto/src/Extension/Skipto.php b/plugins/system/skipto/src/Extension/Skipto.php
index 9aab9bd24ebd..6111292d4093 100644
--- a/plugins/system/skipto/src/Extension/Skipto.php
+++ b/plugins/system/skipto/src/Extension/Skipto.php
@@ -10,8 +10,8 @@
namespace Joomla\Plugin\System\Skipto\Extension;
-use Joomla\CMS\WebAsset\WebAssetManager;
use Joomla\CMS\Plugin\CMSPlugin;
+use Joomla\CMS\WebAsset\WebAssetManager;
// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
diff --git a/plugins/system/stats/src/Extension/Stats.php b/plugins/system/stats/src/Extension/Stats.php
index eff83cedc23a..cbd1bb3aa742 100644
--- a/plugins/system/stats/src/Extension/Stats.php
+++ b/plugins/system/stats/src/Extension/Stats.php
@@ -10,10 +10,10 @@
namespace Joomla\Plugin\System\Stats\Extension;
-use Joomla\CMS\Layout\LayoutInterface;
use Joomla\CMS\Cache\Cache;
use Joomla\CMS\Http\HttpFactory;
use Joomla\CMS\Layout\FileLayout;
+use Joomla\CMS\Layout\LayoutInterface;
use Joomla\CMS\Log\Log;
use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\CMS\User\UserHelper;
diff --git a/plugins/system/tasknotification/src/Extension/TaskNotification.php b/plugins/system/tasknotification/src/Extension/TaskNotification.php
index 9fa4fb692a3d..737e1548f8d9 100644
--- a/plugins/system/tasknotification/src/Extension/TaskNotification.php
+++ b/plugins/system/tasknotification/src/Extension/TaskNotification.php
@@ -10,8 +10,8 @@
namespace Joomla\Plugin\System\TaskNotification\Extension;
-use Joomla\CMS\Event\Model\PrepareFormEvent;
use Joomla\CMS\Event\Model;
+use Joomla\CMS\Event\Model\PrepareFormEvent;
use Joomla\CMS\Factory;
use Joomla\CMS\Log\Log;
use Joomla\CMS\Mail\MailTemplate;
diff --git a/plugins/system/webauthn/src/Authentication.php b/plugins/system/webauthn/src/Authentication.php
index 9d3b8881f11a..a4c6321afee6 100644
--- a/plugins/system/webauthn/src/Authentication.php
+++ b/plugins/system/webauthn/src/Authentication.php
@@ -10,7 +10,6 @@
namespace Joomla\Plugin\System\Webauthn;
-use Webauthn\MetadataService\Statement\MetadataStatement;
use Joomla\Application\ApplicationInterface;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
@@ -23,6 +22,7 @@
use Webauthn\AuthenticationExtensions\AuthenticationExtensionsClientInputs;
use Webauthn\AuthenticatorSelectionCriteria;
use Webauthn\MetadataService\MetadataStatementRepository;
+use Webauthn\MetadataService\Statement\MetadataStatement;
use Webauthn\PublicKeyCredentialCreationOptions;
use Webauthn\PublicKeyCredentialDescriptor;
use Webauthn\PublicKeyCredentialRequestOptions;
@@ -87,8 +87,7 @@ public function __construct(
* @since 4.2.0
*/
private readonly ?MetadataStatementRepository $metadataRepository = null
- )
- {
+ ) {
}
/**
diff --git a/plugins/system/webauthn/src/CredentialRepository.php b/plugins/system/webauthn/src/CredentialRepository.php
index d1859f5ed96d..ae484b41a5e9 100644
--- a/plugins/system/webauthn/src/CredentialRepository.php
+++ b/plugins/system/webauthn/src/CredentialRepository.php
@@ -155,7 +155,7 @@ public function findAllForUserEntity(PublicKeyCredentialUserEntity $publicKeyCre
*
* @return boolean
*/
- $filterClosure = (fn($record) => !\is_null($record) && \is_object($record) && ($record instanceof PublicKeyCredentialSource));
+ $filterClosure = (fn ($record) => !\is_null($record) && \is_object($record) && ($record instanceof PublicKeyCredentialSource));
return array_filter($records, $filterClosure);
}
diff --git a/plugins/system/webauthn/src/MetadataRepository.php b/plugins/system/webauthn/src/MetadataRepository.php
index 8e6899f455cb..0a76fa731f20 100644
--- a/plugins/system/webauthn/src/MetadataRepository.php
+++ b/plugins/system/webauthn/src/MetadataRepository.php
@@ -81,8 +81,8 @@ public function getKnownAuthenticators(): array
{
$this->load();
- $mapKeys = (fn(MetadataStatement $meta) => $meta->getAaguid());
- $mapvalues = (fn(MetadataStatement $meta) => in_array($meta->getAaguid(), [null, '', '0'], true) ? null : (object) [
+ $mapKeys = (fn (MetadataStatement $meta) => $meta->getAaguid());
+ $mapvalues = (fn (MetadataStatement $meta) => \in_array($meta->getAaguid(), [null, '', '0'], true) ? null : (object) [
'description' => $meta->getDescription(),
'icon' => $meta->getIcon(),
]);
@@ -90,7 +90,7 @@ public function getKnownAuthenticators(): array
$values = array_map($mapvalues, $this->mdsCache);
$return = array_combine($keys, $values);
- $filter = (fn($x) => !empty($x));
+ $filter = (fn ($x) => !empty($x));
return array_filter($return, $filter);
}
@@ -155,8 +155,8 @@ private function load(): void
unset($token);
- $entriesFilter = (fn($x) => !empty($x));
- $this->mdsCache = array_filter($entries, $entriesFilter);
+ $entriesFilter = (fn ($x) => !empty($x));
+ $this->mdsCache = array_filter($entries, $entriesFilter);
foreach ($this->mdsCache as $idx => $meta) {
$aaguid = $meta->getAaguid();
diff --git a/plugins/system/webauthn/src/PluginTraits/AdditionalLoginButtons.php b/plugins/system/webauthn/src/PluginTraits/AdditionalLoginButtons.php
index dc9ab7a2f893..931a4bc94217 100644
--- a/plugins/system/webauthn/src/PluginTraits/AdditionalLoginButtons.php
+++ b/plugins/system/webauthn/src/PluginTraits/AdditionalLoginButtons.php
@@ -10,13 +10,13 @@
namespace Joomla\Plugin\System\Webauthn\PluginTraits;
-use Joomla\CMS\WebAsset\WebAssetManager;
use Joomla\CMS\Application\CMSApplication;
use Joomla\CMS\Document\HtmlDocument;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\User\UserHelper;
+use Joomla\CMS\WebAsset\WebAssetManager;
use Joomla\Event\Event;
// phpcs:disable PSR1.Files.SideEffects
diff --git a/plugins/system/webauthn/src/PluginTraits/AjaxHandler.php b/plugins/system/webauthn/src/PluginTraits/AjaxHandler.php
index 2cd4f2d14402..1bad0e3c0e97 100644
--- a/plugins/system/webauthn/src/PluginTraits/AjaxHandler.php
+++ b/plugins/system/webauthn/src/PluginTraits/AjaxHandler.php
@@ -88,14 +88,14 @@ public function onAjaxWebauthn(AjaxEvent $event): void
$eventName = 'onAjaxWebauthn' . ucfirst((string) $akaction);
$eventClass = match ($eventName) {
- 'onAjaxWebauthn' => PlgSystemWebauthnAjax::class,
- 'onAjaxWebauthnChallenge' => PlgSystemWebauthnAjaxChallenge::class,
- 'onAjaxWebauthnCreate' => PlgSystemWebauthnAjaxCreate::class,
- 'onAjaxWebauthnDelete' => PlgSystemWebauthnAjaxDelete::class,
+ 'onAjaxWebauthn' => PlgSystemWebauthnAjax::class,
+ 'onAjaxWebauthnChallenge' => PlgSystemWebauthnAjaxChallenge::class,
+ 'onAjaxWebauthnCreate' => PlgSystemWebauthnAjaxCreate::class,
+ 'onAjaxWebauthnDelete' => PlgSystemWebauthnAjaxDelete::class,
'onAjaxWebauthnInitcreate' => PlgSystemWebauthnAjaxInitCreate::class,
- 'onAjaxWebauthnLogin' => PlgSystemWebauthnAjaxLogin::class,
- 'onAjaxWebauthnSavelabel' => PlgSystemWebauthnAjaxSaveLabel::class,
- default => GenericEvent::class,
+ 'onAjaxWebauthnLogin' => PlgSystemWebauthnAjaxLogin::class,
+ 'onAjaxWebauthnSavelabel' => PlgSystemWebauthnAjaxSaveLabel::class,
+ default => GenericEvent::class,
};
$triggerEvent = new $eventClass($eventName, []);
@@ -103,11 +103,11 @@ public function onAjaxWebauthn(AjaxEvent $event): void
$results = ($result instanceof ResultAwareInterface) ? ($result['result'] ?? []) : [];
$result = array_reduce(
$results,
- fn($carry, $result) => $carry ?? $result,
+ fn ($carry, $result) => $carry ?? $result,
null
);
} catch (\Exception $exception) {
- Log::add(sprintf('Callback failure, redirecting to %s.', $returnURL), Log::DEBUG, 'webauthn.system');
+ Log::add(\sprintf('Callback failure, redirecting to %s.', $returnURL), Log::DEBUG, 'webauthn.system');
$this->getApplication()->getSession()->set('plg_system_webauthn.returnUrl', null);
$this->getApplication()->enqueueMessage($exception->getMessage(), 'error');
$this->getApplication()->redirect($returnURL);
@@ -134,11 +134,11 @@ public function onAjaxWebauthn(AjaxEvent $event): void
}
if (isset($result['url'])) {
- Log::add(sprintf('Callback complete, performing redirection to %s%s.', $result['url'], $modifiers), Log::DEBUG, 'webauthn.system');
+ Log::add(\sprintf('Callback complete, performing redirection to %s%s.', $result['url'], $modifiers), Log::DEBUG, 'webauthn.system');
$this->getApplication()->redirect($result['url']);
}
- Log::add(sprintf('Callback complete, performing redirection to %s%s.', $result, $modifiers), Log::DEBUG, 'webauthn.system');
+ Log::add(\sprintf('Callback complete, performing redirection to %s%s.', $result, $modifiers), Log::DEBUG, 'webauthn.system');
$this->getApplication()->redirect($result);
return;
diff --git a/plugins/system/webauthn/src/PluginTraits/AjaxHandlerLogin.php b/plugins/system/webauthn/src/PluginTraits/AjaxHandlerLogin.php
index 869058d35416..85dd086c0b6b 100644
--- a/plugins/system/webauthn/src/PluginTraits/AjaxHandlerLogin.php
+++ b/plugins/system/webauthn/src/PluginTraits/AjaxHandlerLogin.php
@@ -10,12 +10,12 @@
namespace Joomla\Plugin\System\Webauthn\PluginTraits;
-use Joomla\CMS\Event\User\LoginEvent;
-use Joomla\CMS\Event\User\AfterLoginEvent;
-use Joomla\CMS\Event\User\LoginFailureEvent;
use Joomla\CMS\Authentication\Authentication;
use Joomla\CMS\Authentication\AuthenticationResponse;
use Joomla\CMS\Event\Plugin\System\Webauthn\AjaxLogin;
+use Joomla\CMS\Event\User\AfterLoginEvent;
+use Joomla\CMS\Event\User\LoginEvent;
+use Joomla\CMS\Event\User\LoginFailureEvent;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Log\Log;
diff --git a/plugins/system/webauthn/src/PluginTraits/UserProfileFields.php b/plugins/system/webauthn/src/PluginTraits/UserProfileFields.php
index 6fa7c3f3075d..d4a8b6626db6 100644
--- a/plugins/system/webauthn/src/PluginTraits/UserProfileFields.php
+++ b/plugins/system/webauthn/src/PluginTraits/UserProfileFields.php
@@ -74,7 +74,7 @@ public static function renderWebauthnProfileField($value): string
$credentialRepository = $plugin->getAuthenticationHelper()->getCredentialsRepository();
$credentials = $credentialRepository->getAll(self::$userFromFormData->id);
$authenticators = array_map(
- fn(array $credential) => $credential['label'],
+ fn (array $credential) => $credential['label'],
$credentials
);
diff --git a/plugins/task/checkfiles/src/Extension/Checkfiles.php b/plugins/task/checkfiles/src/Extension/Checkfiles.php
index a878e662608f..61b44e515111 100644
--- a/plugins/task/checkfiles/src/Extension/Checkfiles.php
+++ b/plugins/task/checkfiles/src/Extension/Checkfiles.php
@@ -83,7 +83,7 @@ public function __construct(DispatcherInterface $dispatcher, array $config, /**
*
* @since 4.2.0
*/
- private string $rootDirectory)
+ private string $rootDirectory)
{
parent::__construct($dispatcher, $config);
}
diff --git a/plugins/task/requests/src/Extension/Requests.php b/plugins/task/requests/src/Extension/Requests.php
index 3bcf26637bb7..47304019d3a9 100644
--- a/plugins/task/requests/src/Extension/Requests.php
+++ b/plugins/task/requests/src/Extension/Requests.php
@@ -83,12 +83,12 @@ public function __construct(DispatcherInterface $dispatcher, array $config, /**
*
* @since 4.2.0
*/
- private HttpFactory $httpFactory, /**
+ private HttpFactory $httpFactory, /**
* The root directory
*
* @since 4.2.0
*/
- private string $rootDirectory)
+ private string $rootDirectory)
{
parent::__construct($dispatcher, $config);
}
@@ -131,7 +131,7 @@ private function makeGetRequest(ExecuteTaskEvent $event): int
$responseBody = $response->body;
// @todo this handling must be rethought and made safe. stands as a good demo right now.
- $responseFilename = Path::clean($this->rootDirectory . sprintf('/task_%d_response.html', $id));
+ $responseFilename = Path::clean($this->rootDirectory . \sprintf('/task_%d_response.html', $id));
try {
File::write($responseFilename, $responseBody);
diff --git a/plugins/task/sessiongc/src/Extension/SessionGC.php b/plugins/task/sessiongc/src/Extension/SessionGC.php
index 94445dc64a3d..3c315601c055 100644
--- a/plugins/task/sessiongc/src/Extension/SessionGC.php
+++ b/plugins/task/sessiongc/src/Extension/SessionGC.php
@@ -65,7 +65,7 @@ public function __construct(DispatcherInterface $dispatcher, array $config, /**
*
* @since 4.4.0
*/
- private MetadataManager $metadataManager)
+ private MetadataManager $metadataManager)
{
parent::__construct($dispatcher, $config);
}
diff --git a/plugins/task/sitestatus/src/Extension/SiteStatus.php b/plugins/task/sitestatus/src/Extension/SiteStatus.php
index 3577fd1c2379..1fc87cd45f36 100644
--- a/plugins/task/sitestatus/src/Extension/SiteStatus.php
+++ b/plugins/task/sitestatus/src/Extension/SiteStatus.php
@@ -94,12 +94,12 @@ public function __construct(DispatcherInterface $dispatcher, array $config, /**
*
* @since 4.2.0
*/
- private array $oldConfig, /**
+ private array $oldConfig, /**
* The config file
*
* @since 4.2.0
*/
- private string $configFile)
+ private string $configFile)
{
parent::__construct($dispatcher, $config);
}
diff --git a/plugins/user/joomla/src/Extension/Joomla.php b/plugins/user/joomla/src/Extension/Joomla.php
index 18a5d6a4df27..4544e82f71a8 100644
--- a/plugins/user/joomla/src/Extension/Joomla.php
+++ b/plugins/user/joomla/src/Extension/Joomla.php
@@ -10,9 +10,9 @@
namespace Joomla\Plugin\User\Joomla\Extension;
-use Joomla\CMS\Form\Form;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Factory;
+use Joomla\CMS\Form\Form;
use Joomla\CMS\Language\LanguageFactoryInterface;
use Joomla\CMS\Log\Log;
use Joomla\CMS\Mail\MailTemplate;
diff --git a/plugins/user/token/src/Extension/Token.php b/plugins/user/token/src/Extension/Token.php
index 7570f6c3e705..feab4b4e4647 100644
--- a/plugins/user/token/src/Extension/Token.php
+++ b/plugins/user/token/src/Extension/Token.php
@@ -544,7 +544,7 @@ private function getTokenForDisplay(
return '';
}
- return base64_encode(sprintf('%s:%d:%s', $algorithm, $userId, $tokenHash));
+ return base64_encode(\sprintf('%s:%d:%s', $algorithm, $userId, $tokenHash));
}
/**
diff --git a/plugins/user/token/src/Field/JoomlatokenField.php b/plugins/user/token/src/Field/JoomlatokenField.php
index b49213b446db..b927e076decf 100644
--- a/plugins/user/token/src/Field/JoomlatokenField.php
+++ b/plugins/user/token/src/Field/JoomlatokenField.php
@@ -120,7 +120,7 @@ private function getTokenForDisplay(string $tokenSeed): string
return '';
}
- return base64_encode(sprintf('%s:%s:%s', $algorithm, $userId, $tokenHash));
+ return base64_encode(\sprintf('%s:%s:%s', $algorithm, $userId, $tokenHash));
}
/**
diff --git a/plugins/webservices/languages/src/Extension/Languages.php b/plugins/webservices/languages/src/Extension/Languages.php
index b9b6c87596c7..b96741863f46 100644
--- a/plugins/webservices/languages/src/Extension/Languages.php
+++ b/plugins/webservices/languages/src/Extension/Languages.php
@@ -10,10 +10,10 @@
namespace Joomla\Plugin\WebServices\Languages\Extension;
-use Joomla\Component\Languages\Administrator\Model\LanguagesModel;
use Joomla\CMS\Event\Application\BeforeApiRouteEvent;
use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\CMS\Router\ApiRouter;
+use Joomla\Component\Languages\Administrator\Model\LanguagesModel;
use Joomla\Event\SubscriberInterface;
use Joomla\Router\Route;
diff --git a/plugins/workflow/featuring/src/Extension/Featuring.php b/plugins/workflow/featuring/src/Extension/Featuring.php
index 96f35936f69f..8986f887dad4 100644
--- a/plugins/workflow/featuring/src/Extension/Featuring.php
+++ b/plugins/workflow/featuring/src/Extension/Featuring.php
@@ -10,10 +10,10 @@
namespace Joomla\Plugin\Workflow\Featuring\Extension;
-use Joomla\CMS\Event\Model\PrepareFormEvent;
-use Joomla\CMS\Event\Model\BeforeSaveEvent;
use Joomla\CMS\Event\AbstractEvent;
use Joomla\CMS\Event\Model;
+use Joomla\CMS\Event\Model\BeforeSaveEvent;
+use Joomla\CMS\Event\Model\PrepareFormEvent;
use Joomla\CMS\Event\Table\BeforeStoreEvent;
use Joomla\CMS\Event\View\DisplayEvent;
use Joomla\CMS\Event\Workflow\WorkflowFunctionalityUsedEvent;
diff --git a/plugins/workflow/notification/src/Extension/Notification.php b/plugins/workflow/notification/src/Extension/Notification.php
index f283b423f9fe..31e067d8f03f 100644
--- a/plugins/workflow/notification/src/Extension/Notification.php
+++ b/plugins/workflow/notification/src/Extension/Notification.php
@@ -10,9 +10,9 @@
namespace Joomla\Plugin\Workflow\Notification\Extension;
-use Joomla\CMS\Event\Model\PrepareFormEvent;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Event\Model;
+use Joomla\CMS\Event\Model\PrepareFormEvent;
use Joomla\CMS\Event\Workflow\WorkflowTransitionEvent;
use Joomla\CMS\Language\LanguageFactoryInterface;
use Joomla\CMS\Plugin\CMSPlugin;
@@ -77,7 +77,7 @@ public function __construct(DispatcherInterface $dispatcher, array $config, /**
*
* @since 4.4.0
*/
- private LanguageFactoryInterface $languageFactory)
+ private LanguageFactoryInterface $languageFactory)
{
parent::__construct($dispatcher, $config);
}
diff --git a/plugins/workflow/publishing/src/Extension/Publishing.php b/plugins/workflow/publishing/src/Extension/Publishing.php
index 8504b6d4ee3a..ad2f85691184 100644
--- a/plugins/workflow/publishing/src/Extension/Publishing.php
+++ b/plugins/workflow/publishing/src/Extension/Publishing.php
@@ -10,10 +10,10 @@
namespace Joomla\Plugin\Workflow\Publishing\Extension;
-use Joomla\CMS\Event\Model\PrepareFormEvent;
+use Joomla\CMS\Event\Model;
use Joomla\CMS\Event\Model\BeforeChangeStateEvent;
use Joomla\CMS\Event\Model\BeforeSaveEvent;
-use Joomla\CMS\Event\Model;
+use Joomla\CMS\Event\Model\PrepareFormEvent;
use Joomla\CMS\Event\Table\BeforeStoreEvent;
use Joomla\CMS\Event\View\DisplayEvent;
use Joomla\CMS\Event\Workflow\WorkflowFunctionalityUsedEvent;
diff --git a/tests/Unit/Libraries/Cms/Console/ExtensionDiscoverCommandTest.php b/tests/Unit/Libraries/Cms/Console/ExtensionDiscoverCommandTest.php
index b7e8060ed9a9..d9849740aee2 100644
--- a/tests/Unit/Libraries/Cms/Console/ExtensionDiscoverCommandTest.php
+++ b/tests/Unit/Libraries/Cms/Console/ExtensionDiscoverCommandTest.php
@@ -10,8 +10,8 @@
namespace Joomla\Tests\Unit\Libraries\Cms\Console;
-use PHPUnit\Framework\TestCase;
use Joomla\CMS\Console\ExtensionDiscoverCommand;
+use PHPUnit\Framework\TestCase;
/**
* Test class for Joomla\CMS\Console\ExtensionDiscoverCommand.
diff --git a/tests/Unit/Libraries/Cms/Console/ExtensionDiscoverInstallCommandTest.php b/tests/Unit/Libraries/Cms/Console/ExtensionDiscoverInstallCommandTest.php
index 1e58ab0f759f..b63ffa9323af 100644
--- a/tests/Unit/Libraries/Cms/Console/ExtensionDiscoverInstallCommandTest.php
+++ b/tests/Unit/Libraries/Cms/Console/ExtensionDiscoverInstallCommandTest.php
@@ -10,9 +10,9 @@
namespace Joomla\Tests\Unit\Libraries\Cms\Console;
-use PHPUnit\Framework\TestCase;
use Joomla\CMS\Console\ExtensionDiscoverInstallCommand;
use Joomla\Database\DatabaseInterface;
+use PHPUnit\Framework\TestCase;
/**
* Test class for Joomla\CMS\Console\ExtensionDiscoverInstallCommand.
diff --git a/tests/Unit/Libraries/Cms/Console/ExtensionDiscoverListCommandTest.php b/tests/Unit/Libraries/Cms/Console/ExtensionDiscoverListCommandTest.php
index de9dc3ab0094..dbd54a58d5c9 100644
--- a/tests/Unit/Libraries/Cms/Console/ExtensionDiscoverListCommandTest.php
+++ b/tests/Unit/Libraries/Cms/Console/ExtensionDiscoverListCommandTest.php
@@ -10,9 +10,9 @@
namespace Joomla\Tests\Unit\Libraries\Cms\Console;
-use PHPUnit\Framework\TestCase;
use Joomla\CMS\Console\ExtensionDiscoverListCommand;
use Joomla\Database\DatabaseInterface;
+use PHPUnit\Framework\TestCase;
/**
* Test class for Joomla\CMS\Console\ExtensionDiscoverCommand.
@@ -63,9 +63,9 @@ public function testFilterExtensions()
$filteredextensionsArray1 = $command->filterExtensionsBasedOnState($extensions1, $state);
$filteredextensionsArray2 = $command->filterExtensionsBasedOnState($extensions2, $state);
- $size0 = count($filteredextensionsArray0);
- $size1 = count($filteredextensionsArray1);
- $size2 = count($filteredextensionsArray2);
+ $size0 = \count($filteredextensionsArray0);
+ $size1 = \count($filteredextensionsArray1);
+ $size2 = \count($filteredextensionsArray2);
$this->assertSame($size0, 0);
$this->assertSame($size1, 1);
diff --git a/tests/Unit/Libraries/Cms/Console/Loader/WritableContainerLoaderTest.php b/tests/Unit/Libraries/Cms/Console/Loader/WritableContainerLoaderTest.php
index 143d6fd40ef5..1c7b9c3570da 100644
--- a/tests/Unit/Libraries/Cms/Console/Loader/WritableContainerLoaderTest.php
+++ b/tests/Unit/Libraries/Cms/Console/Loader/WritableContainerLoaderTest.php
@@ -10,12 +10,12 @@
namespace Joomla\Tests\Unit\Libraries\Cms\Console\Loader;
-use Symfony\Component\Console\Exception\CommandNotFoundException;
use Joomla\CMS\Console\Loader\WritableContainerLoader;
use Joomla\Console\Command\AbstractCommand;
use Joomla\Tests\Unit\UnitTestCase;
use PHPUnit\Framework\MockObject\MockObject;
use Psr\Container\ContainerInterface;
+use Symfony\Component\Console\Exception\CommandNotFoundException;
/**
* Test class for Joomla\CMS\Console\Loader\WritableContainerLoader.
diff --git a/tests/Unit/Libraries/Cms/Feed/FeedParserTest.php b/tests/Unit/Libraries/Cms/Feed/FeedParserTest.php
index 74337989ce08..7252a19b7327 100644
--- a/tests/Unit/Libraries/Cms/Feed/FeedParserTest.php
+++ b/tests/Unit/Libraries/Cms/Feed/FeedParserTest.php
@@ -59,7 +59,7 @@ public function testParse()
public function testParseCustomElement()
{
$content = 'test';
- $xml = sprintf('%s', $content);
+ $xml = \sprintf('%s', $content);
$xmlReader = $this->getXmlReader($xml, 'custom');
$parser = new FeedParserStub($xmlReader);
@@ -85,7 +85,7 @@ public function testParseNamespaceElement()
{
$content = 'test';
$prefix = 'custom';
- $xml = sprintf("<%s:content>%s%s:content>", $prefix, $prefix, $content, $prefix);
+ $xml = \sprintf("<%s:content>%s%s:content>", $prefix, $prefix, $content, $prefix);
$xmlReader = $this->getXmlReader($xml, $prefix . ':content');
$namespaceMock = $this->createMock(NamespaceParserInterface::class);
$namespaceMock
@@ -94,7 +94,7 @@ public function testParseNamespaceElement()
->with(
$this->isInstanceOf(Feed::class),
$this->callback(
- fn($value) => $value instanceof \SimpleXMLElement && (string) $value[0] === $content
+ fn ($value) => $value instanceof \SimpleXMLElement && (string) $value[0] === $content
)
);
@@ -117,7 +117,7 @@ public function testParseDetectsUnregisteredNamespace()
{
$content = 'test';
$prefix = 'unregistered';
- $xml = sprintf("<%s:content>%s%s:content>", $prefix, $prefix, $content, $prefix);
+ $xml = \sprintf("<%s:content>%s%s:content>", $prefix, $prefix, $content, $prefix);
$xmlReader = $this->getXmlReader($xml, $prefix . ':content');
$parser = new FeedParserStub($xmlReader);
@@ -167,7 +167,7 @@ public function testParseElementWithEntry()
public function testParseElementWithNamespaceEntry()
{
$prefix = 'custom';
- $xml = sprintf("<%s:entry>%s:entry>", $prefix, $prefix, $prefix);
+ $xml = \sprintf("<%s:entry>%s:entry>", $prefix, $prefix, $prefix);
$xmlReader = $this->getXmlReader($xml, $prefix . ':entry');
$namespaceMock = $this->createMock(NamespaceParserInterface::class);
$namespaceMock
@@ -176,7 +176,7 @@ public function testParseElementWithNamespaceEntry()
->with(
$this->isInstanceOf(FeedEntry::class),
$this->callback(
- fn($value) => $value instanceof \SimpleXMLElement && (string) $value[0] === ''
+ fn ($value) => $value instanceof \SimpleXMLElement && (string) $value[0] === ''
)
);
diff --git a/tests/Unit/Libraries/Cms/Feed/Parser/AtomParserTest.php b/tests/Unit/Libraries/Cms/Feed/Parser/AtomParserTest.php
index 55bc0603bf6c..2d1d4daa2fab 100644
--- a/tests/Unit/Libraries/Cms/Feed/Parser/AtomParserTest.php
+++ b/tests/Unit/Libraries/Cms/Feed/Parser/AtomParserTest.php
@@ -182,7 +182,7 @@ public function testHandleLink()
->with(
'link',
$this->callback(
- fn($param) => $param instanceof FeedLink && $param->uri === $href
+ fn ($param) => $param instanceof FeedLink && $param->uri === $href
)
);
diff --git a/tests/Unit/Libraries/Cms/Feed/Parser/RssParserTest.php b/tests/Unit/Libraries/Cms/Feed/Parser/RssParserTest.php
index 06224b2b23b4..14fdb821111c 100644
--- a/tests/Unit/Libraries/Cms/Feed/Parser/RssParserTest.php
+++ b/tests/Unit/Libraries/Cms/Feed/Parser/RssParserTest.php
@@ -40,7 +40,7 @@ public function testHandleCategory()
// It's currently not possible to mock simple xml element
// @link https://github.com/se3bastianbergmann/phpunit-mock-objects/issues/417
- $xmlElement = new \SimpleXMLElement(sprintf('%s', $category));
+ $xmlElement = new \SimpleXMLElement(\sprintf('%s', $category));
$feedMock = $this->createMock(Feed::class);
$feedMock
@@ -87,7 +87,7 @@ public function testHandleCloud()
->with(
'cloud',
$this->callback(
- fn($value) => \is_object($value)
+ fn ($value) => \is_object($value)
&& $value->domain === $cloud['domain']
&& $value->port === $cloud['port']
&& $value->path === $cloud['path']
@@ -224,7 +224,7 @@ public function testHandleImage()
->with(
'image',
$this->callback(
- fn($value) => $value instanceof FeedLink
+ fn ($value) => $value instanceof FeedLink
&& $value->uri === $image['url']
&& $value->relation === null
&& $value->type === 'logo'
@@ -318,7 +318,7 @@ public function testHandleLink()
// It's currently not possible to mock simple xml element
// @link https://github.com/se3bastianbergmann/phpunit-mock-objects/issues/417
- $xmlElement = new \SimpleXMLElement(sprintf("", $link));
+ $xmlElement = new \SimpleXMLElement(\sprintf("", $link));
$feedMock = $this->createMock(Feed::class);
$feedMock
@@ -327,7 +327,7 @@ public function testHandleLink()
->with(
'link',
$this->callback(
- fn($value) => $value instanceof FeedLink && $value->uri === $link
+ fn ($value) => $value instanceof FeedLink && $value->uri === $link
)
);
@@ -365,7 +365,7 @@ public function testHandleManagingEditor()
->with(
'author',
$this->callback(
- fn($value) => $value instanceof FeedPerson
+ fn ($value) => $value instanceof FeedPerson
&& $value->name === $editor['name']
&& $value->email === $editor['email']
)
@@ -483,7 +483,7 @@ public function testHandleTitle()
// It's currently not possible to mock simple xml element
// @link https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
- $xmlElement = new \SimpleXMLElement(sprintf('%s', $title));
+ $xmlElement = new \SimpleXMLElement(\sprintf('%s', $title));
$feedMock = $this->createMock(Feed::class);
$feedMock
@@ -513,7 +513,7 @@ public function testHandleTtl()
// It's currently not possible to mock simple xml element
// @link https://github.com/sebastianbergmann/phpunit-mock-objects/issues/417
- $xmlElement = new \SimpleXMLElement(sprintf('%s', $ttl));
+ $xmlElement = new \SimpleXMLElement(\sprintf('%s', $ttl));
$feedMock = $this->createMock(Feed::class);
$feedMock
@@ -658,7 +658,7 @@ public function testProcessFeedEntry()
['isPermaLink', true],
['comments', ''],
['author', $this->callback(
- fn($value) => $value instanceof FeedPerson
+ fn ($value) => $value instanceof FeedPerson
&& $value->name === $entry['authorName']
&& $value->email === $entry['authorEmail']
),
@@ -675,7 +675,7 @@ public function testProcessFeedEntry()
->method('addLink')
->with(
$this->callback(
- fn($value) => $value instanceof FeedLink
+ fn ($value) => $value instanceof FeedLink
&& $value->uri === $entry['enclosureUrl']
&& $value->type === $entry['enclosureType']
&& $value->length === (int) $entry['enclosureLength']
diff --git a/tests/Unit/Libraries/Cms/Form/Field/AccessiblemediaFieldTest.php b/tests/Unit/Libraries/Cms/Form/Field/AccessiblemediaFieldTest.php
index 8b628ecb4231..132b13afdf93 100644
--- a/tests/Unit/Libraries/Cms/Form/Field/AccessiblemediaFieldTest.php
+++ b/tests/Unit/Libraries/Cms/Form/Field/AccessiblemediaFieldTest.php
@@ -10,8 +10,8 @@
namespace Joomla\Tests\Unit\Libraries\Cms\Form\Field;
-use PHPUnit\Framework\TestCase;
use Joomla\CMS\Form\Field\AccessiblemediaField;
+use PHPUnit\Framework\TestCase;
/**
* Test class for AccessiblemediaField.
diff --git a/tests/Unit/Libraries/Cms/Image/ImageTest.php b/tests/Unit/Libraries/Cms/Image/ImageTest.php
index 579d2451cce4..3f8b09942b88 100644
--- a/tests/Unit/Libraries/Cms/Image/ImageTest.php
+++ b/tests/Unit/Libraries/Cms/Image/ImageTest.php
@@ -8,8 +8,8 @@
namespace Joomla\Tests\Unit\Libraries\Cms\Image;
use Joomla\CMS\Image\Filter\Brightness;
-use Joomla\CMS\Image\ImageFilter;
use Joomla\CMS\Image\Image;
+use Joomla\CMS\Image\ImageFilter;
use Joomla\Test\TestHelper;
use Joomla\Tests\Unit\UnitTestCase;
diff --git a/tests/Unit/Libraries/Cms/Mail/MailTest.php b/tests/Unit/Libraries/Cms/Mail/MailTest.php
index 0b66dd5ca49c..24f73be3aa3d 100644
--- a/tests/Unit/Libraries/Cms/Mail/MailTest.php
+++ b/tests/Unit/Libraries/Cms/Mail/MailTest.php
@@ -10,10 +10,10 @@
namespace Joomla\Tests\Unit\Libraries\Cms\Mail;
-use PHPMailer\PHPMailer\PHPMailer\PHPMailer\Exception;
use Joomla\CMS\Mail\Mail;
use Joomla\Tests\Unit\UnitTestCase;
use PHPMailer\PHPMailer\PHPMailer;
+use PHPMailer\PHPMailer\PHPMailer\PHPMailer\Exception;
/**
* Test class for JMail.
diff --git a/tests/Unit/Libraries/Cms/Microdata/MicrodataTest.php b/tests/Unit/Libraries/Cms/Microdata/MicrodataTest.php
index b818831ffa7d..c7f2e3c93d89 100644
--- a/tests/Unit/Libraries/Cms/Microdata/MicrodataTest.php
+++ b/tests/Unit/Libraries/Cms/Microdata/MicrodataTest.php
@@ -255,7 +255,7 @@ public function testDisplaySimpleWithContent()
->content($content)
->display();
- $this->assertEquals(sprintf("%s", $content), $html);
+ $this->assertEquals(\sprintf("%s", $content), $html);
}
/**
@@ -285,7 +285,7 @@ public function testDisplaySimpleWithEmptyContent()
->content($content)
->display();
- $this->assertEquals(sprintf("%s", $content), $html);
+ $this->assertEquals(\sprintf("%s", $content), $html);
}
/**
@@ -344,7 +344,7 @@ public function testDisplayNestedWithContent()
->display();
$this->assertEquals(
- sprintf("%s", $content),
+ \sprintf("%s", $content),
$html
);
}
@@ -388,7 +388,7 @@ public function testDisplayNestedWithContentAndFallback()
->display();
$this->assertEquals(
- sprintf("%s", $content),
+ \sprintf("%s", $content),
$html
);
}
@@ -491,7 +491,7 @@ public function testDisplayMetaWithContent()
->content($content)
->display();
- $this->assertEquals(sprintf("%s", $content, $content), $html);
+ $this->assertEquals(\sprintf("%s", $content, $content), $html);
}
/**
@@ -524,7 +524,7 @@ public function testDisplayMetaWithHumanAndMachineContent()
->content($content, $machineContent)
->display();
- $this->assertEquals(sprintf("%s", $machineContent, $content), $html);
+ $this->assertEquals(\sprintf("%s", $machineContent, $content), $html);
}
/**
@@ -654,7 +654,7 @@ public function testDisplayFallbackForNotExistingPropertiesWithContent()
->display();
$this->assertEquals(
- sprintf("%s", $content),
+ \sprintf("%s", $content),
$html
);
}
@@ -753,7 +753,7 @@ public function testDisplayFallbackWithContentWhenThePropertyDoesNotExistInTheTy
->display();
$this->assertEquals(
- sprintf("", $content),
+ \sprintf("", $content),
$html
);
}
@@ -956,7 +956,7 @@ public function testDisplayScope()
]
);
- $this->assertEquals(sprintf("itemscope itemtype='https://schema.org/%s'", $type), $microdata->displayScope());
+ $this->assertEquals(\sprintf("itemscope itemtype='https://schema.org/%s'", $type), $microdata->displayScope());
}
/**
@@ -1023,19 +1023,19 @@ public function testHtmlMeta()
// Test with all params
$this->assertEquals(
- sprintf("", $scope, $property, $content),
+ \sprintf("", $scope, $property, $content),
MicrodataStub::htmlMeta($content, $property, $scope)
);
// Test with the $inverse mode
$this->assertEquals(
- sprintf("", $property, $scope, $content),
+ \sprintf("", $property, $scope, $content),
MicrodataStub::htmlMeta($content, $property, $scope, true)
);
// Test without the $scope
$this->assertEquals(
- sprintf("", $property, $content),
+ \sprintf("", $property, $content),
MicrodataStub::htmlMeta($content, $property)
);
}
@@ -1056,31 +1056,31 @@ public function testHtmlDiv()
// Test with all params
$this->assertEquals(
- sprintf("
%s
", $scope, $property, $content),
+ \sprintf("
%s
", $scope, $property, $content),
MicrodataStub::htmlDiv($content, $property, $scope)
);
// Test with the $inverse mode
$this->assertEquals(
- sprintf("
%s
", $property, $scope, $content),
+ \sprintf("
%s
", $property, $scope, $content),
MicrodataStub::htmlDiv($content, $property, $scope, true)
);
// Test without the $scope
$this->assertEquals(
- sprintf("
%s
", $property, $content),
+ \sprintf("
%s
", $property, $content),
MicrodataStub::htmlDiv($content, $property)
);
// Test without the $property
$this->assertEquals(
- sprintf("
%s
", $property, $scope, $content),
+ \sprintf("
%s
", $property, $scope, $content),
MicrodataStub::htmlDiv($content, $property, $scope, true)
);
// Test without the $scope, $property
$this->assertEquals(
- sprintf('
%s
', $content),
+ \sprintf('
%s
', $content),
MicrodataStub::htmlDiv($content)
);
}
@@ -1101,31 +1101,31 @@ public function testHtmlSpan()
// Test with all params
$this->assertEquals(
- sprintf("%s", $scope, $property, $content),
+ \sprintf("%s", $scope, $property, $content),
MicrodataStub::htmlSpan($content, $property, $scope)
);
// Test with the inverse mode
$this->assertEquals(
- sprintf("%s", $property, $scope, $content),
+ \sprintf("%s", $property, $scope, $content),
MicrodataStub::htmlSpan($content, $property, $scope, true)
);
// Test without the $scope
$this->assertEquals(
- sprintf("%s", $property, $content),
+ \sprintf("%s", $property, $content),
MicrodataStub::htmlSpan($content, $property)
);
// Test without the $property
$this->assertEquals(
- sprintf("%s", $property, $scope, $content),
+ \sprintf("%s", $property, $scope, $content),
MicrodataStub::htmlSpan($content, $property, $scope, true)
);
// Test without the $scope, $property
$this->assertEquals(
- sprintf('%s', $content),
+ \sprintf('%s', $content),
MicrodataStub::htmlSpan($content)
);
}
diff --git a/tests/Unit/Libraries/Cms/Toolbar/ToolbarTest.php b/tests/Unit/Libraries/Cms/Toolbar/ToolbarTest.php
index 8e0006a1d62a..24a29cd739f1 100644
--- a/tests/Unit/Libraries/Cms/Toolbar/ToolbarTest.php
+++ b/tests/Unit/Libraries/Cms/Toolbar/ToolbarTest.php
@@ -10,10 +10,10 @@
namespace Joomla\Tests\Unit\Libraries\Cms\Toolbar;
-use PHPUnit\Framework\TestCase;
use Joomla\CMS\Toolbar\Toolbar;
use Joomla\CMS\Toolbar\ToolbarButton;
use Joomla\CMS\Toolbar\ToolbarFactoryInterface;
+use PHPUnit\Framework\TestCase;
/**
* Test class for Toolbar.
diff --git a/tests/Unit/UnitTestCase.php b/tests/Unit/UnitTestCase.php
index 68b961418f13..02076f02828e 100644
--- a/tests/Unit/UnitTestCase.php
+++ b/tests/Unit/UnitTestCase.php
@@ -10,10 +10,10 @@
namespace Joomla\Tests\Unit;
-use PHPUnit\Framework\TestCase;
use Joomla\Database\DatabaseInterface;
use Joomla\Database\DatabaseQuery;
use Joomla\Database\QueryInterface;
+use PHPUnit\Framework\TestCase;
/**
* Base Unit Test case for common behaviour across unit tests