Skip to content

Commit

Permalink
Adds a code style rule to check if there are unused imports (joomla#4…
Browse files Browse the repository at this point in the history
…1004)

* Adds a code style rule to check if there are unused imports

* alignment
  • Loading branch information
laoneo authored Jun 26, 2023
1 parent dab5efd commit e7920e0
Show file tree
Hide file tree
Showing 9 changed files with 2 additions and 8 deletions.
2 changes: 2 additions & 0 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@
'binary_operator_spaces' => ['operators' => ['=>' => 'align_single_space_minimal', '=' => 'align']],
// The "No break" comment in switch statements
'no_break_comment' => ['comment_text' => 'No break'],
// Remove unused imports
'no_unused_imports' => true,
]
)
->setFinder($finder);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@
use Joomla\CMS\Language\LanguageHelper;
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\Database\DatabaseQuery;
use Joomla\Database\QueryInterface;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
Expand Down
1 change: 0 additions & 1 deletion components/com_tags/src/Model/TagsModel.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,6 @@
use Joomla\CMS\MVC\Model\ListModel;
use Joomla\Database\DatabaseQuery;
use Joomla\Database\ParameterType;
use Joomla\Database\QueryInterface;

// phpcs:disable PSR1.Files.SideEffects
\defined('_JEXEC') or die;
Expand Down
1 change: 0 additions & 1 deletion libraries/src/Document/HtmlDocument.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
use Joomla\CMS\Language\Text;
use Joomla\CMS\Uri\Uri;
use Joomla\CMS\Utility\Utility;
use Joomla\Database\ParameterType;
use Joomla\Registry\Registry;

// phpcs:disable PSR1.Files.SideEffects
Expand Down
1 change: 0 additions & 1 deletion libraries/src/Form/Field/SqlField.php
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
use Joomla\CMS\Factory;
use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\Database\DatabaseQuery;
use Joomla\Database\Exception\ExecutionFailureException;
use Joomla\Database\QueryInterface;

Expand Down
1 change: 0 additions & 1 deletion libraries/src/MVC/View/AbstractView.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

use Joomla\CMS\Document\Document;
use Joomla\CMS\Document\DocumentAwareInterface;
use Joomla\CMS\Document\DocumentAwareTrait;
use Joomla\CMS\Factory;
use Joomla\CMS\Language\LanguageAwareInterface;
use Joomla\CMS\Language\LanguageAwareTrait;
Expand Down
1 change: 0 additions & 1 deletion plugins/system/guidedtours/services/provider.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

defined('_JEXEC') or die;

use Joomla\Application\ApplicationInterface;
use Joomla\CMS\Extension\PluginInterface;
use Joomla\CMS\Factory;
use Joomla\CMS\Plugin\PluginHelper;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
use Joomla\CMS\Cache\Cache;
use Joomla\CMS\Component\ComponentHelper;
use Joomla\CMS\Extension\ExtensionHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Log\Log;
use Joomla\CMS\Mail\Exception\MailDisabledException;
use Joomla\CMS\Mail\MailTemplate;
Expand Down
1 change: 0 additions & 1 deletion tests/Unit/Libraries/Cms/Mail/MailFactoryTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

namespace Joomla\Tests\Unit\Libraries\Cms\Layout;

use Joomla\CMS\Layout\BaseLayout;
use Joomla\CMS\Mail\Mail;
use Joomla\CMS\Mail\MailerFactory;
use Joomla\Registry\Registry;
Expand Down

0 comments on commit e7920e0

Please sign in to comment.