Skip to content

Commit

Permalink
[TASK] Update csfixer rules
Browse files Browse the repository at this point in the history
  • Loading branch information
georgringer committed Oct 30, 2024
1 parent 84612d2 commit 3b117bb
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 36 deletions.
9 changes: 4 additions & 5 deletions Build/php-cs-fixer/php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,21 +25,20 @@
->setRiskyAllowed(true)
->setRules([
'@DoctrineAnnotation' => true,
'@PER' => true,
'@PER-CS' => true,
'array_syntax' => ['syntax' => 'short'],
'blank_line_after_opening_tag' => true,
'braces' => ['allow_single_line_closure' => true],
'cast_spaces' => ['space' => 'none'],
'compact_nullable_typehint' => true,
'compact_nullable_type_declaration' => true,
'concat_space' => ['spacing' => 'one'],
'declare_equal_normalize' => ['space' => 'none'],
'dir_constant' => true,
'function_typehint_space' => true,
'type_declaration_spaces' => true,
'lowercase_cast' => true,
'method_argument_space' => ['on_multiline' => 'ensure_fully_multiline'],
'modernize_types_casting' => true,
'native_function_casing' => true,
'new_with_braces' => true,
'new_with_parentheses' => true,
'no_alias_functions' => true,
'no_blank_lines_after_phpdoc' => true,
'no_empty_phpdoc' => true,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@
)]
final class ModifyDatabaseQueryForRecordListingEventListenerTopNewsColor
{

public function __invoke(ModifyDatabaseQueryForRecordListingEvent $event): void
{
if ($event->getTable() !== 'tx_news_domain_model_news') {
Expand All @@ -39,5 +38,4 @@ public function __invoke(ModifyDatabaseQueryForRecordListingEvent $event): void

$event->setQueryBuilder($queryBuilder);
}

}
7 changes: 3 additions & 4 deletions Classes/Event/Listener/ModifyPageTreeItems.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,20 @@

namespace GeorgRinger\News\Event\Listener;

use TYPO3\CMS\Backend\Controller\Event\AfterPageTreeItemsPreparedEvent;
use TYPO3\CMS\Backend\Dto\Tree\Status\StatusInformation;
use TYPO3\CMS\Core\Attribute\AsEventListener;
use TYPO3\CMS\Core\Database\Connection;
use TYPO3\CMS\Core\Database\ConnectionPool;
use TYPO3\CMS\Core\Localization\LanguageService;
use TYPO3\CMS\Core\Type\ContextualFeedbackSeverity;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Backend\Controller\Event\AfterPageTreeItemsPreparedEvent;
use TYPO3\CMS\Core\Attribute\AsEventListener;

#[AsEventListener(
identifier: 'ext-news/backend/modify-page-tree-items',
)]
final class ModifyPageTreeItems
{

private const NEWS_TYPES = [
'news_pi1' => 'ext-news-plugin-news-list',
'news_newsliststicky' => 'ext-news-plugin-news-list-sticky',
Expand Down Expand Up @@ -83,4 +82,4 @@ private function getLanguageService(): LanguageService
{
return $GLOBALS['LANG'];
}
}
}
46 changes: 23 additions & 23 deletions Configuration/Icons.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,29 +4,29 @@

$iconList = [];
foreach ([
'apps-pagetree-folder-contains-news' => 'ext-news-folder-tree.svg',
'apps-pagetree-page-contains-news' => 'ext-news-page-tree.svg',
'ext-news-wizard-icon' => 'plugin-list-with-detail.svg',
'ext-news-plugin-news-list' => 'plugin-list-with-detail.svg',
'ext-news-plugin-news-list-sticky' => 'plugin-list.svg',
'ext-news-plugin-news-detail' => 'plugin-detail.svg',
'ext-news-plugin-news-date-menu' => 'plugin-date-menu.svg',
'ext-news-plugin-news-search-form' => 'plugin-search-form.svg',
'ext-news-plugin-news-search-result' => 'plugin-search-results.svg',
'ext-news-plugin-news-selected-list' => 'plugin-selected-list.svg',
'ext-news-plugin-category-list' => 'plugin-category-menu.svg',
'ext-news-plugin-tag-list' => 'plugin-tag-menu.svg',
'ext-news-type-default' => 'news_domain_model_news.svg',
'ext-news-type-internal' => 'news_domain_model_news_internal.svg',
'ext-news-type-external' => 'news_domain_model_news_external.svg',
'ext-news-tag' => 'news_domain_model_tag.svg',
'ext-news-link' => 'news_domain_model_link.svg',
'ext-news-donation' => 'donation.svg',
'ext-news-paypal' => 'donation_paypal.svg',
'ext-news-patreon' => 'donation_patreon.svg',
'ext-news-amazon' => 'donation_amazon.svg',
'ext-news-doublecheck' => 'double_check.svg',
] as $identifier => $path) {
'apps-pagetree-folder-contains-news' => 'ext-news-folder-tree.svg',
'apps-pagetree-page-contains-news' => 'ext-news-page-tree.svg',
'ext-news-wizard-icon' => 'plugin-list-with-detail.svg',
'ext-news-plugin-news-list' => 'plugin-list-with-detail.svg',
'ext-news-plugin-news-list-sticky' => 'plugin-list.svg',
'ext-news-plugin-news-detail' => 'plugin-detail.svg',
'ext-news-plugin-news-date-menu' => 'plugin-date-menu.svg',
'ext-news-plugin-news-search-form' => 'plugin-search-form.svg',
'ext-news-plugin-news-search-result' => 'plugin-search-results.svg',
'ext-news-plugin-news-selected-list' => 'plugin-selected-list.svg',
'ext-news-plugin-category-list' => 'plugin-category-menu.svg',
'ext-news-plugin-tag-list' => 'plugin-tag-menu.svg',
'ext-news-type-default' => 'news_domain_model_news.svg',
'ext-news-type-internal' => 'news_domain_model_news_internal.svg',
'ext-news-type-external' => 'news_domain_model_news_external.svg',
'ext-news-tag' => 'news_domain_model_tag.svg',
'ext-news-link' => 'news_domain_model_link.svg',
'ext-news-donation' => 'donation.svg',
'ext-news-paypal' => 'donation_paypal.svg',
'ext-news-patreon' => 'donation_patreon.svg',
'ext-news-amazon' => 'donation_amazon.svg',
'ext-news-doublecheck' => 'double_check.svg',
] as $identifier => $path) {
$iconList[$identifier] = [
'provider' => SvgIconProvider::class,
'source' => 'EXT:news/Resources/Public/Icons/' . $path,
Expand Down
2 changes: 0 additions & 2 deletions ext_localconf.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
use GeorgRinger\News\Controller\CategoryController;
use GeorgRinger\News\Controller\NewsController;
use GeorgRinger\News\Controller\TagController;
use GeorgRinger\News\Hooks\Backend\RecordListQueryHook;
use GeorgRinger\News\Hooks\DataHandlerHook;
use GeorgRinger\News\Routing\NewsCategoryMapper;
use GeorgRinger\News\Routing\NewsTagMapper;
Expand All @@ -13,7 +12,6 @@
use GeorgRinger\News\Utility\ClassLoader;
use GeorgRinger\News\Xclass\ExtensionServiceXclassed;
use TYPO3\CMS\Backend\Form\FormDataProvider\DatabaseRowInitializeNew;
use TYPO3\CMS\Backend\RecordList\DatabaseRecordList;
use TYPO3\CMS\Core\Cache\Backend\FileBackend;
use TYPO3\CMS\Core\Cache\Frontend\PhpFrontend;
use TYPO3\CMS\Core\Cache\Frontend\VariableFrontend;
Expand Down

0 comments on commit 3b117bb

Please sign in to comment.