diff --git a/libraries/joomla/controller/controller.php b/libraries/joomla/controller/controller.php index ea44f1be17115..6d11750cf21b0 100644 --- a/libraries/joomla/controller/controller.php +++ b/libraries/joomla/controller/controller.php @@ -7,10 +7,10 @@ * @license GNU General Public License version 2 or later; see LICENSE */ -use Joomla\Application\AbstractApplication; - defined('JPATH_PLATFORM') or die; +use Joomla\Application\AbstractApplication; + /** * Joomla Platform Controller Interface * diff --git a/libraries/src/Authentication/Authentication.php b/libraries/src/Authentication/Authentication.php index e09de8473bcc8..bdff7ed4a6f63 100644 --- a/libraries/src/Authentication/Authentication.php +++ b/libraries/src/Authentication/Authentication.php @@ -8,10 +8,10 @@ namespace Joomla\CMS\Authentication; -use Joomla\CMS\Plugin\PluginHelper; - defined('JPATH_PLATFORM') or die; +use Joomla\CMS\Plugin\PluginHelper; + /** * Authentication class, provides an interface for the Joomla authentication system * diff --git a/libraries/src/Cache/CacheStorage.php b/libraries/src/Cache/CacheStorage.php index 10cadf88d6cba..d923f6af06fda 100644 --- a/libraries/src/Cache/CacheStorage.php +++ b/libraries/src/Cache/CacheStorage.php @@ -8,11 +8,11 @@ namespace Joomla\CMS\Cache; +defined('JPATH_PLATFORM') or die; + use Joomla\CMS\Cache\Exception\UnsupportedCacheException; use Joomla\CMS\Log\Log; -defined('JPATH_PLATFORM') or die; - /** * Abstract cache storage handler * diff --git a/libraries/src/Component/Exception/MissingComponentException.php b/libraries/src/Component/Exception/MissingComponentException.php index e77792667cfe1..3f0caac7b5ba3 100644 --- a/libraries/src/Component/Exception/MissingComponentException.php +++ b/libraries/src/Component/Exception/MissingComponentException.php @@ -8,10 +8,10 @@ namespace Joomla\CMS\Component\Exception; -use Joomla\CMS\Router\Exception\RouteNotFoundException; - defined('JPATH_PLATFORM') or die; +use Joomla\CMS\Router\Exception\RouteNotFoundException; + /** * Exception class defining an error for a missing component * diff --git a/libraries/src/Crypt/Crypt.php b/libraries/src/Crypt/Crypt.php index b34b6caade705..340eedfc92de8 100644 --- a/libraries/src/Crypt/Crypt.php +++ b/libraries/src/Crypt/Crypt.php @@ -8,11 +8,11 @@ namespace Joomla\CMS\Crypt; +defined('JPATH_PLATFORM') or die; + use Joomla\CMS\Crypt\Cipher\SimpleCipher; use Joomla\CMS\Log\Log; -defined('JPATH_PLATFORM') or die; - /** * Crypt is a Joomla Platform class for handling basic encryption/decryption of data. * diff --git a/libraries/src/Feed/Feed.php b/libraries/src/Feed/Feed.php index 440e7f6e5b430..1340c72f81231 100644 --- a/libraries/src/Feed/Feed.php +++ b/libraries/src/Feed/Feed.php @@ -8,10 +8,10 @@ namespace Joomla\CMS\Feed; -use Joomla\CMS\Date\Date; - defined('JPATH_PLATFORM') or die(); +use Joomla\CMS\Date\Date; + /** * Class to encapsulate a feed for the Joomla Platform. * diff --git a/libraries/src/Feed/FeedEntry.php b/libraries/src/Feed/FeedEntry.php index 2771423bbe23b..f1eb017a58851 100644 --- a/libraries/src/Feed/FeedEntry.php +++ b/libraries/src/Feed/FeedEntry.php @@ -8,10 +8,10 @@ namespace Joomla\CMS\Feed; -use Joomla\CMS\Date\Date; - defined('JPATH_PLATFORM') or die; +use Joomla\CMS\Date\Date; + /** * Class to encapsulate a feed entry for the Joomla Platform. * diff --git a/libraries/src/Feed/FeedParser.php b/libraries/src/Feed/FeedParser.php index 68739fb60a8e1..e30633f858579 100644 --- a/libraries/src/Feed/FeedParser.php +++ b/libraries/src/Feed/FeedParser.php @@ -8,10 +8,10 @@ namespace Joomla\CMS\Feed; -use Joomla\CMS\Feed\Parser\NamespaceParserInterface; - defined('JPATH_PLATFORM') or die; +use Joomla\CMS\Feed\Parser\NamespaceParserInterface; + /** * Feed Parser class. * diff --git a/libraries/src/Helper/ContentHistoryHelper.php b/libraries/src/Helper/ContentHistoryHelper.php index 3191653f861e9..87353ec834bc2 100644 --- a/libraries/src/Helper/ContentHistoryHelper.php +++ b/libraries/src/Helper/ContentHistoryHelper.php @@ -8,11 +8,11 @@ namespace Joomla\CMS\Helper; +defined('JPATH_PLATFORM') or die; + use Joomla\CMS\Component\ComponentHelper; use Joomla\CMS\Table\Table; -defined('JPATH_PLATFORM') or die; - /** * Versions helper class, provides methods to perform various tasks relevant * versioning of content. diff --git a/libraries/src/Input/Json.php b/libraries/src/Input/Json.php index 1ac1e6128c1e4..e1dd3e2090fa1 100644 --- a/libraries/src/Input/Json.php +++ b/libraries/src/Input/Json.php @@ -8,10 +8,10 @@ namespace Joomla\CMS\Input; -use Joomla\CMS\Filter\InputFilter; - defined('JPATH_PLATFORM') or die; +use Joomla\CMS\Filter\InputFilter; + /** * Joomla! Input JSON Class * diff --git a/libraries/src/Installer/Installer.php b/libraries/src/Installer/Installer.php index fccb9042b9324..09632acb6af30 100644 --- a/libraries/src/Installer/Installer.php +++ b/libraries/src/Installer/Installer.php @@ -8,13 +8,13 @@ namespace Joomla\CMS\Installer; +defined('JPATH_PLATFORM') or die; + use Joomla\CMS\Application\ApplicationHelper; use Joomla\CMS\Plugin\PluginHelper; use Joomla\CMS\Table\Extension; use Joomla\CMS\Table\Table; -defined('JPATH_PLATFORM') or die; - \JLoader::import('joomla.filesystem.file'); \JLoader::import('joomla.filesystem.folder'); \JLoader::import('joomla.filesystem.path'); diff --git a/libraries/src/Installer/InstallerAdapter.php b/libraries/src/Installer/InstallerAdapter.php index 86869d25dd107..cf03eedc3b53e 100644 --- a/libraries/src/Installer/InstallerAdapter.php +++ b/libraries/src/Installer/InstallerAdapter.php @@ -8,13 +8,13 @@ namespace Joomla\CMS\Installer; +defined('JPATH_PLATFORM') or die; + use Joomla\CMS\Installer\Manifest\PackageManifest; use Joomla\CMS\Table\Extension; use Joomla\CMS\Table\Table; use Joomla\CMS\Table\TableInterface; -defined('JPATH_PLATFORM') or die; - \JLoader::import('joomla.base.adapterinstance'); /** diff --git a/libraries/src/Language/Text.php b/libraries/src/Language/Text.php index 4ada0c5448313..6814f177109a8 100644 --- a/libraries/src/Language/Text.php +++ b/libraries/src/Language/Text.php @@ -8,12 +8,12 @@ namespace Joomla\CMS\Language; +defined('JPATH_PLATFORM') or die; + use Joomla\CMS\Factory; use Joomla\CMS\HTML\HTMLHelper; use Joomla\CMS\Log\Log; -defined('JPATH_PLATFORM') or die; - /** * Text handling class. * diff --git a/libraries/src/Layout/FileLayout.php b/libraries/src/Layout/FileLayout.php index 3b4efeb1cfcde..e864f9c7fe594 100644 --- a/libraries/src/Layout/FileLayout.php +++ b/libraries/src/Layout/FileLayout.php @@ -8,11 +8,11 @@ namespace Joomla\CMS\Layout; +defined('JPATH_PLATFORM') or die; + use Joomla\CMS\Application\ApplicationHelper; use Joomla\CMS\Component\ComponentHelper; -defined('JPATH_PLATFORM') or die; - /** * Base class for rendering a display layout * loaded from from a layout file diff --git a/libraries/src/Mail/Mail.php b/libraries/src/Mail/Mail.php index 0b6f4e2540684..b886fbdbb36eb 100644 --- a/libraries/src/Mail/Mail.php +++ b/libraries/src/Mail/Mail.php @@ -8,11 +8,11 @@ namespace Joomla\CMS\Mail; +defined('JPATH_PLATFORM') or die; + use Joomla\CMS\Factory; use Joomla\CMS\Log\Log; -defined('JPATH_PLATFORM') or die; - /** * Email Class. Provides a common interface to send email from the Joomla! Platform * diff --git a/libraries/src/Table/Observer/AbstractObserver.php b/libraries/src/Table/Observer/AbstractObserver.php index fa3e261d822e7..8ecc41564c932 100644 --- a/libraries/src/Table/Observer/AbstractObserver.php +++ b/libraries/src/Table/Observer/AbstractObserver.php @@ -8,11 +8,11 @@ namespace Joomla\CMS\Table\Observer; +defined('JPATH_PLATFORM') or die; + use Joomla\CMS\Table\TableInterface; use Joomla\CMS\Table\Table; -defined('JPATH_PLATFORM') or die; - /** * Table class supporting modified pre-order tree traversal behavior. * diff --git a/libraries/src/Toolbar/Toolbar.php b/libraries/src/Toolbar/Toolbar.php index e94385c8bc147..57033d3e7b8c0 100644 --- a/libraries/src/Toolbar/Toolbar.php +++ b/libraries/src/Toolbar/Toolbar.php @@ -8,10 +8,10 @@ namespace Joomla\CMS\Toolbar; -use Joomla\CMS\Layout\FileLayout; - defined('JPATH_PLATFORM') or die; +use Joomla\CMS\Layout\FileLayout; + /** * ToolBar handler * diff --git a/libraries/src/Toolbar/ToolbarButton.php b/libraries/src/Toolbar/ToolbarButton.php index 094dfbf0fb93d..4e6f31a332152 100644 --- a/libraries/src/Toolbar/ToolbarButton.php +++ b/libraries/src/Toolbar/ToolbarButton.php @@ -8,10 +8,10 @@ namespace Joomla\CMS\Toolbar; -use Joomla\CMS\Layout\FileLayout; - defined('JPATH_PLATFORM') or die; +use Joomla\CMS\Layout\FileLayout; + /** * Button base class *