Skip to content

Commit

Permalink
[5.1] PHPStan: Adding type hints for $this to all backend component l…
Browse files Browse the repository at this point in the history
…ayouts (#42923)
  • Loading branch information
Hackwar committed Mar 2, 2024
1 parent ec6f888 commit a34f938
Show file tree
Hide file tree
Showing 198 changed files with 388 additions and 0 deletions.
2 changes: 2 additions & 0 deletions administrator/components/com_admin/tmpl/help/langforum.php
Expand Up @@ -13,6 +13,8 @@
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;

/** @var \Joomla\Component\Admin\Administrator\View\Help\HtmlView $this */

$this->getLanguage()->load('mod_menu', JPATH_ADMINISTRATOR);

$forumId = (int) Text::_('MOD_MENU_HELP_SUPPORT_OFFICIAL_LANGUAGE_FORUM_VALUE');
Expand Down
Expand Up @@ -15,6 +15,8 @@
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;

/** @var \Joomla\CMS\Layout\FileLayout $this */

$data = $displayData;

// Receive overridable options
Expand Down
Expand Up @@ -16,6 +16,8 @@
use Joomla\CMS\Router\Route;
use Joomla\Component\Associations\Administrator\Helper\AssociationsHelper;

/** @var Joomla\Component\Associations\Administrator\View\Associations\HtmlView $this */

/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('com_associations.admin-associations-default')
Expand Down
Expand Up @@ -18,6 +18,8 @@
use Joomla\CMS\Session\Session;
use Joomla\Component\Associations\Administrator\Helper\AssociationsHelper;

/** @var Joomla\Component\Associations\Administrator\View\Associations\HtmlView $this */

$app = Factory::getApplication();

if ($app->isClient('site')) {
Expand Down
Expand Up @@ -12,6 +12,8 @@

use Joomla\CMS\Layout\LayoutHelper;

/** @var \Joomla\Component\Banners\Administrator\View\Banners\HtmlView $this */

$displayData = [
'textPrefix' => 'COM_BANNERS',
'formURL' => 'index.php?option=com_banners&view=banners',
Expand Down
Expand Up @@ -12,6 +12,8 @@

use Joomla\CMS\Layout\LayoutHelper;

/** @var \Joomla\Component\Banners\Administrator\View\Clients\HtmlView $this */

$displayData = [
'textPrefix' => 'COM_BANNERS_CLIENT',
'formURL' => 'index.php?option=com_banners&view=clients',
Expand Down
2 changes: 2 additions & 0 deletions administrator/components/com_banners/tmpl/tracks/default.php
Expand Up @@ -15,6 +15,8 @@
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;

/** @var \Joomla\Component\Banners\Administrator\View\Tracks\HtmlView $this */

/** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('table.columns');
Expand Down
Expand Up @@ -14,6 +14,8 @@
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;

/** @var \Joomla\CMS\Layout\FileLayout $this */

extract($displayData);

/**
Expand Down
Expand Up @@ -13,6 +13,8 @@
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;

/** @var \Joomla\CMS\Layout\FileLayout $this */

extract($displayData);

/**
Expand Down
Expand Up @@ -18,6 +18,8 @@
use Joomla\CMS\Session\Session;
use Joomla\String\Inflector;

/** @var \Joomla\Component\Categories\Administrator\View\Categories\HtmlView $this */

/** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('table.columns')
Expand Down
Expand Up @@ -15,6 +15,8 @@
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;

/** @var \Joomla\Component\Categories\Administrator\View\Categories\HtmlView $this */

$published = (int) $this->state->get('filter.published');
$extension = $this->escape($this->state->get('filter.extension'));

Expand Down
Expand Up @@ -14,6 +14,8 @@
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;

/** @var \Joomla\Component\Categories\Administrator\View\Categories\HtmlView $this */

$extension = $this->state->get('filter.extension');
$component = $this->state->get('filter.component');
$section = $this->state->get('filter.section');
Expand Down
Expand Up @@ -19,6 +19,8 @@
use Joomla\CMS\Session\Session;
use Joomla\Component\Content\Site\Helper\RouteHelper;

/** @var \Joomla\Component\Categories\Administrator\View\Categories\HtmlView $this */

$app = Factory::getApplication();

if ($app->isClient('site')) {
Expand Down
Expand Up @@ -18,6 +18,8 @@
use Joomla\CMS\Router\Route;
use Joomla\CMS\Workflow\WorkflowServiceInterface;

/** @var \Joomla\Component\Categories\Administrator\View\Category\HtmlView $this */

/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('keepalive')
Expand Down
Expand Up @@ -9,6 +9,9 @@
*/

defined('_JEXEC') or die;

/** @var \Joomla\Component\Categories\Administrator\View\Category\HtmlView $this */

?>
<div class="subhead noshadow mb-3">
<?php echo $this->document->getToolbar('toolbar')->render(); ?>
Expand Down
Expand Up @@ -12,6 +12,8 @@

use Joomla\Component\Content\Site\Helper\RouteHelper;

/** @var \Joomla\Component\Categories\Administrator\View\Category\HtmlView $this */

$icon = 'icon-check';
$title = $this->item ? $this->item->title : '';
$content = $this->item ? $this->item->alias : '';
Expand Down
2 changes: 2 additions & 0 deletions administrator/components/com_checkin/tmpl/checkin/default.php
Expand Up @@ -15,6 +15,8 @@
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;

/** @var \Joomla\Component\Checkin\Administrator\View\Checkin\HtmlView $this */

/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('multiselect');
Expand Down
Expand Up @@ -14,6 +14,8 @@
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;

/** @var \Joomla\Component\Config\Administrator\View\Application\HtmlView $this */

/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('keepalive')
Expand Down
Expand Up @@ -13,6 +13,8 @@

defined('_JEXEC') or die;

/** @var \Joomla\Component\Config\Administrator\View\Application\HtmlView $this */

$this->name = Text::_('COM_CONFIG_CACHE_SETTINGS');
$this->description = '';
$this->fieldsname = 'cache';
Expand Down
Expand Up @@ -13,6 +13,8 @@

defined('_JEXEC') or die;

/** @var \Joomla\Component\Config\Administrator\View\Application\HtmlView $this */

$this->name = Text::_('COM_CONFIG_COOKIE_SETTINGS');
$this->description = '';
$this->fieldsname = 'cookie';
Expand Down
Expand Up @@ -13,6 +13,8 @@

defined('_JEXEC') or die;

/** @var \Joomla\Component\Config\Administrator\View\Application\HtmlView $this */

$this->name = Text::_('COM_CONFIG_DATABASE_SETTINGS');
$this->description = '';
$this->fieldsname = 'database';
Expand Down
Expand Up @@ -13,6 +13,8 @@

defined('_JEXEC') or die;

/** @var \Joomla\Component\Config\Administrator\View\Application\HtmlView $this */

$this->name = Text::_('COM_CONFIG_DEBUG_SETTINGS');
$this->description = '';
$this->fieldsname = 'debug';
Expand Down
Expand Up @@ -13,6 +13,8 @@

defined('_JEXEC') or die;

/** @var \Joomla\Component\Config\Administrator\View\Application\HtmlView $this */

$this->name = Text::_('COM_CONFIG_TEXT_FILTER_SETTINGS');
$this->description = '';
$this->fieldsname = 'filters';
Expand Down
Expand Up @@ -13,6 +13,8 @@

defined('_JEXEC') or die;

/** @var \Joomla\Component\Config\Administrator\View\Application\HtmlView $this */

$this->name = Text::_('COM_CONFIG_LOCATION_SETTINGS');
$this->description = '';
$this->fieldsname = 'locale';
Expand Down
Expand Up @@ -13,6 +13,8 @@

defined('_JEXEC') or die;

/** @var \Joomla\Component\Config\Administrator\View\Application\HtmlView $this */

$this->name = Text::_('COM_CONFIG_LOGGING_SETTINGS');
$this->description = '';
$this->fieldsname = 'logging';
Expand Down
Expand Up @@ -13,6 +13,8 @@

defined('_JEXEC') or die;

/** @var \Joomla\Component\Config\Administrator\View\Application\HtmlView $this */

$this->name = Text::_('COM_CONFIG_LOGGING_CUSTOM_SETTINGS');
$this->description = '';
$this->fieldsname = 'logging_custom';
Expand Down
Expand Up @@ -15,6 +15,8 @@

defined('_JEXEC') or die;

/** @var \Joomla\Component\Config\Administrator\View\Application\HtmlView $this */

HTMLHelper::_('form.csrf');
$this->document->getWebAssetManager()
->useScript('webcomponent.field-send-test-mail');
Expand Down
Expand Up @@ -13,6 +13,8 @@

defined('_JEXEC') or die;

/** @var \Joomla\Component\Config\Administrator\View\Application\HtmlView $this */

$this->name = Text::_('COM_CONFIG_METADATA_SETTINGS');
$this->description = '';
$this->fieldsname = 'metadata';
Expand Down
Expand Up @@ -11,6 +11,8 @@
use Joomla\CMS\Language\Text;

defined('_JEXEC') or die;

/** @var \Joomla\Component\Config\Administrator\View\Application\HtmlView $this */
?>
<ul class="nav flex-column">
<?php if ($this->userIsSuperAdmin) : ?>
Expand Down
Expand Up @@ -13,6 +13,8 @@

defined('_JEXEC') or die;

/** @var \Joomla\Component\Config\Administrator\View\Application\HtmlView $this */

$this->name = Text::_('COM_CONFIG_PERMISSION_SETTINGS');
$this->description = '';
$this->fieldsname = 'permissions';
Expand Down
Expand Up @@ -13,6 +13,8 @@

defined('_JEXEC') or die;

/** @var \Joomla\Component\Config\Administrator\View\Application\HtmlView $this */

$this->name = Text::_('COM_CONFIG_PROXY_SETTINGS');
$this->description = '';
$this->fieldsname = 'proxy';
Expand Down
Expand Up @@ -13,6 +13,8 @@

defined('_JEXEC') or die;

/** @var \Joomla\Component\Config\Administrator\View\Application\HtmlView $this */

$this->name = Text::_('COM_CONFIG_SEO_SETTINGS');
$this->description = Text::_('COM_CONFIG_SEO_SETTINGS_DESC');
$this->fieldsname = 'seo';
Expand Down
Expand Up @@ -13,6 +13,8 @@

defined('_JEXEC') or die;

/** @var \Joomla\Component\Config\Administrator\View\Application\HtmlView $this */

$this->name = Text::_('COM_CONFIG_SERVER_SETTINGS');
$this->description = '';
$this->fieldsname = 'server';
Expand Down
Expand Up @@ -13,6 +13,8 @@

defined('_JEXEC') or die;

/** @var \Joomla\Component\Config\Administrator\View\Application\HtmlView $this */

$this->name = Text::_('COM_CONFIG_SESSION_SETTINGS');
$this->description = '';
$this->fieldsname = 'session';
Expand Down
Expand Up @@ -13,6 +13,8 @@

defined('_JEXEC') or die;

/** @var \Joomla\Component\Config\Administrator\View\Application\HtmlView $this */

$this->name = Text::_('COM_CONFIG_SITE_SETTINGS');
$this->description = '';
$this->fieldsname = 'site';
Expand Down
Expand Up @@ -13,6 +13,8 @@

defined('_JEXEC') or die;

/** @var \Joomla\Component\Config\Administrator\View\Application\HtmlView $this */

$this->name = Text::_('COM_CONFIG_WEBSERVICES_SETTINGS');
$this->description = '';
$this->fieldsname = 'webservices';
Expand Down
Expand Up @@ -16,6 +16,8 @@
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;

/** @var \Joomla\Component\Config\Administrator\View\Component\HtmlView $this */

$app = Factory::getApplication();
$template = $app->getTemplate();

Expand Down
Expand Up @@ -11,6 +11,8 @@
use Joomla\CMS\Language\Text;

defined('_JEXEC') or die;

/** @var \Joomla\Component\Config\Administrator\View\Component\HtmlView $this */
?>
<ul class="nav flex-column">
<?php if ($this->userIsSuperAdmin) : ?>
Expand Down
Expand Up @@ -13,6 +13,8 @@
use Joomla\CMS\Factory;
use Joomla\CMS\Language\Text;

/** @var \Joomla\CMS\Layout\FileLayout $this */

extract($displayData);

/**
Expand Down
2 changes: 2 additions & 0 deletions administrator/components/com_contact/tmpl/contact/edit.php
Expand Up @@ -17,6 +17,8 @@
use Joomla\CMS\Layout\LayoutHelper;
use Joomla\CMS\Router\Route;

/** @var \Joomla\Component\Contact\Administrator\View\Contact\HtmlView $this */

/** @var Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('keepalive')
Expand Down
2 changes: 2 additions & 0 deletions administrator/components/com_contact/tmpl/contact/modal.php
Expand Up @@ -9,6 +9,8 @@
*/

defined('_JEXEC') or die;

/** @var \Joomla\Component\Contact\Administrator\View\Contact\HtmlView $this */
?>
<div class="subhead noshadow mb-3">
<?php echo $this->document->getToolbar('toolbar')->render(); ?>
Expand Down
Expand Up @@ -12,6 +12,8 @@

use Joomla\Component\Contact\Site\Helper\RouteHelper;

/** @var \Joomla\Component\Contact\Administrator\View\Contact\HtmlView $this */

$icon = 'icon-check';
$title = $this->item ? $this->item->name : '';
$content = $this->item ? $this->item->alias : '';
Expand Down
Expand Up @@ -18,6 +18,8 @@
use Joomla\CMS\Router\Route;
use Joomla\CMS\Session\Session;

/** @var \Joomla\Component\Contact\Administrator\View\Contacts\HtmlView $this */

/** @var \Joomla\CMS\WebAsset\WebAssetManager $wa */
$wa = $this->document->getWebAssetManager();
$wa->useScript('table.columns')
Expand Down
Expand Up @@ -14,6 +14,8 @@
use Joomla\CMS\Language\Text;
use Joomla\CMS\Layout\LayoutHelper;

/** @var \Joomla\Component\Contact\Administrator\View\Contacts\HtmlView $this */

$published = (int) $this->state->get('filter.published');
$noUser = true;
?>
Expand Down

0 comments on commit a34f938

Please sign in to comment.