Skip to content

Commit

Permalink
Fix codestyle
Browse files Browse the repository at this point in the history
  • Loading branch information
digedag committed Mar 1, 2024
1 parent cb3a8a8 commit 5d641aa
Show file tree
Hide file tree
Showing 30 changed files with 161 additions and 161 deletions.
2 changes: 1 addition & 1 deletion Classes/Controller/Competition.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ public function getModuleIdentifier()
return 'cfc_league';
}

public function __construct(DfbSync $dfbSync = null)
public function __construct(?DfbSync $dfbSync = null)
{
$this->dfbSync = $dfbSync ?: tx_rnbase::makeInstance(DfbSync::class);
}
Expand Down
2 changes: 1 addition & 1 deletion Classes/Controller/Competition/DfbSync.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ class DfbSync
*/
private $synchronizer;

public function __construct(Synchronizer $synchronizer = null)
public function __construct(?Synchronizer $synchronizer = null)
{
$this->synchronizer = $synchronizer ?: tx_rnbase::makeInstance(Synchronizer::class);
}
Expand Down
2 changes: 1 addition & 1 deletion Classes/Controller/Profile.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class Profile extends BaseModFunc
*/
public $hideResults = false;
/**
* @var \Sys25\RnBase\Backend\Form\ToolBox
* @var ToolBox
*/
private $formTool;

Expand Down
2 changes: 1 addition & 1 deletion Classes/Controller/Team/ProfileAdd.php
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class ProfileAdd
*
* @return string
*/
public function handleRequest($module, team $currTeam, TeamInfo $teamInfo)
public function handleRequest($module, Team $currTeam, TeamInfo $teamInfo)
{
$this->mod = $module;

Expand Down
2 changes: 1 addition & 1 deletion Classes/Dfb/Synchronizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ class Synchronizer

private $teamRepo;

public function __construct(TeamRepository $teamRepo = null)
public function __construct(?TeamRepository $teamRepo = null)
{
$this->teamRepo = $teamRepo ?: new TeamRepository();
}
Expand Down
2 changes: 1 addition & 1 deletion Classes/Module/Decorator/TeamNoteDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public function __construct(ToolBox $formTool)
*
* @return string
*/
public function format($value, $colName, $record = [], TeamNote $item = null)
public function format($value, $colName, $record = [], ?TeamNote $item = null)
{
$ret = $value;
if (!$item) {
Expand Down
2 changes: 1 addition & 1 deletion Classes/Service/CompetitionService.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class CompetitionService extends AbstractService
*/
private $repo;

public function __construct(CompetitionRepository $repo = null)
public function __construct(?CompetitionRepository $repo = null)
{
$this->repo = $repo ?: new CompetitionRepository();
}
Expand Down
2 changes: 1 addition & 1 deletion Classes/Service/GroupService.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class GroupService extends AbstractService
{
private $repo;

public function __construct(GroupRepository $repo = null)
public function __construct(?GroupRepository $repo = null)
{
$this->repo = $repo ?: new GroupRepository();
}
Expand Down
2 changes: 1 addition & 1 deletion Classes/Service/MatchService.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ class MatchService extends AbstractService
private $repo;
private $mnRepo;

public function __construct(MatchRepository $repo = null, MatchNoteRepository $mnRepo = null)
public function __construct(?MatchRepository $repo = null, ?MatchNoteRepository $mnRepo = null)
{
$this->repo = $repo ?: new MatchRepository();
$this->mnRepo = $mnRepo ?: new MatchNoteRepository();
Expand Down
2 changes: 1 addition & 1 deletion Classes/Service/ProfileService.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class ProfileService extends AbstractService
*/
private $profileTypeService;

public function __construct(ProfileRepository $repo = null, ProfileTypeService $profileTypeSrv = null)
public function __construct(?ProfileRepository $repo = null, ?ProfileTypeService $profileTypeSrv = null)
{
$this->repo = $repo ?: new ProfileRepository();
$this->profileTypeService = $profileTypeSrv ?: new ProfileTypeService();
Expand Down
2 changes: 1 addition & 1 deletion Classes/Service/SaisonService.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class SaisonService extends AbstractService
{
private $repo;

public function __construct(SaisonRepository $repo = null)
public function __construct(?SaisonRepository $repo = null)
{
$this->repo = $repo ?: new SaisonRepository();
}
Expand Down
2 changes: 1 addition & 1 deletion Classes/Service/StadiumService.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ class StadiumService extends AbstractService
{
private $repo;

public function __construct(StadiumRepository $repo = null)
public function __construct(?StadiumRepository $repo = null)
{
$this->repo = $repo ?: new StadiumRepository();
}
Expand Down
2 changes: 1 addition & 1 deletion Classes/Service/TeamService.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ class TeamService extends AbstractService
{
private $repo;

public function __construct(TeamRepository $repo = null)
public function __construct(?TeamRepository $repo = null)
{
$this->repo = $repo ?: new TeamRepository();
}
Expand Down
14 changes: 7 additions & 7 deletions Classes/Utility/ServiceRegistry.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ class ServiceRegistry implements \TYPO3\CMS\Core\SingletonInterface
private $teamSrv;

public function __construct(
CompetitionService $competitionService = null,
GroupService $groupService = null,
MatchService $matchService = null,
ProfileService $profileService = null,
SaisonService $saisonService = null,
StadiumService $stadiumService = null,
TeamService $teamService = null
?CompetitionService $competitionService = null,
?GroupService $groupService = null,
?MatchService $matchService = null,
?ProfileService $profileService = null,
?SaisonService $saisonService = null,
?StadiumService $stadiumService = null,
?TeamService $teamService = null
) {
$this->competitionSrv = $competitionService ?: new CompetitionService();
$this->groupSrv = $groupService ?: new GroupService();
Expand Down
2 changes: 1 addition & 1 deletion Configuration/Backend/AjaxRoutes.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@
return [
't3sports_ticker' => [
'path' => '/t3sports/ticker',
'target' => \System25\T3sports\Controller\Ajax\AjaxTicker::class.'::dispatch',
'target' => System25\T3sports\Controller\Ajax\AjaxTicker::class.'::dispatch',
],
];
18 changes: 9 additions & 9 deletions Configuration/TCA/tx_cfcleague_club.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
exit('Access denied.');
}

$clubOrdering = intval(\Sys25\RnBase\Configuration\Processor::getExtensionCfgValue('cfc_league', 'clubOrdering')) > 0;
$clubOrdering = intval(Sys25\RnBase\Configuration\Processor::getExtensionCfgValue('cfc_league', 'clubOrdering')) > 0;

$labelClub = $clubOrdering ? 'city' : 'name';
$altLabelClub = $clubOrdering ? 'name' : 'city';
Expand Down Expand Up @@ -40,7 +40,7 @@
'columns' => [
'hidden' => [
'exclude' => 1,
'label' => \Sys25\RnBase\Backend\Utility\TcaTool::buildGeneralLabel('hidden'),
'label' => Sys25\RnBase\Backend\Utility\TcaTool::buildGeneralLabel('hidden'),
'config' => [
'type' => 'check',
'default' => '0',
Expand Down Expand Up @@ -209,7 +209,7 @@
'label' => 'LLL:EXT:cfc_league/Resources/Private/Language/locallang_db.xlf:tx_cfcleague_club_established',
'config' => [
'type' => 'input',
'renderType' => (\Sys25\RnBase\Utility\TYPO3::isTYPO86OrHigher() ? 'inputDateTime' : ''),
'renderType' => (Sys25\RnBase\Utility\TYPO3::isTYPO86OrHigher() ? 'inputDateTime' : ''),
'size' => '10',
'eval' => 'date',
'default' => '0',
Expand Down Expand Up @@ -289,17 +289,17 @@
],
];

if (\Sys25\RnBase\Utility\TYPO3::isTYPO104OrHigher()) {
if (Sys25\RnBase\Utility\TYPO3::isTYPO104OrHigher()) {
unset($tx_cfcleague_club['interface']['showRecordFieldList']);
}

\Sys25\RnBase\Backend\Utility\TcaTool::configureWizards($tx_cfcleague_club, [
Sys25\RnBase\Backend\Utility\TcaTool::configureWizards($tx_cfcleague_club, [
'stadiums' => ['targettable' => 'tx_cfcleague_stadiums', 'add' => true, 'edit' => true],
'info' => ['RTE' => ['defaultExtras' => $rteConfig]],
'info2' => ['RTE' => ['defaultExtras' => $rteConfig]],
]);

if (\Sys25\RnBase\Utility\Extensions::isLoaded('tt_address')) {
if (Sys25\RnBase\Utility\Extensions::isLoaded('tt_address')) {
$tx_cfcleague_club['columns']['address'] = [
'exclude' => 1,
'label' => 'LLL:EXT:cfc_league/Resources/Private/Language/locallang_db.xlf:tx_cfcleague_club.address',
Expand All @@ -315,11 +315,11 @@
];
}

if (\Sys25\RnBase\Utility\Extensions::isLoaded('static_info_tables')) {
$tx_cfcleague_club['columns']['country'] = \System25\T3sports\Utility\TcaLookup::getCountryField();
if (Sys25\RnBase\Utility\Extensions::isLoaded('static_info_tables')) {
$tx_cfcleague_club['columns']['country'] = System25\T3sports\Utility\TcaLookup::getCountryField();
}

$tx_cfcleague_club['columns']['logo'] = \Sys25\RnBase\Utility\TSFAL::getMediaTCA('logo', [
$tx_cfcleague_club['columns']['logo'] = Sys25\RnBase\Utility\TSFAL::getMediaTCA('logo', [
'label' => 'LLL:EXT:cfc_league/Resources/Private/Language/locallang_db.xlf:tx_cfcleague_club.logo',
]);

Expand Down
8 changes: 4 additions & 4 deletions Configuration/TCA/tx_cfcleague_competition.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
'columns' => [
'hidden' => [
'exclude' => 1,
'label' => \Sys25\RnBase\Backend\Utility\TcaTool::buildGeneralLabel('hidden'),
'label' => Sys25\RnBase\Backend\Utility\TcaTool::buildGeneralLabel('hidden'),
'config' => [
'type' => 'check',
'default' => '0',
Expand Down Expand Up @@ -251,15 +251,15 @@
],
];

if (\Sys25\RnBase\Utility\TYPO3::isTYPO104OrHigher()) {
if (Sys25\RnBase\Utility\TYPO3::isTYPO104OrHigher()) {
unset($tx_cfcleague_competition['interface']['showRecordFieldList']);
}

\Sys25\RnBase\Backend\Utility\TcaTool::configureWizards($tx_cfcleague_competition, [
Sys25\RnBase\Backend\Utility\TcaTool::configureWizards($tx_cfcleague_competition, [
'teams' => ['targettable' => 'tx_cfcleague_teams', 'add' => true],
]);

$tx_cfcleague_competition['columns']['logo'] = \Sys25\RnBase\Utility\TSFAL::getMediaTCA('logo', [
$tx_cfcleague_competition['columns']['logo'] = Sys25\RnBase\Utility\TSFAL::getMediaTCA('logo', [
'label' => 'LLL:EXT:cfc_league/Resources/Private/Language/locallang_db.xlf:tx_cfcleague_club.logo',
'config' => ['size' => 1, 'maxitems' => 1],
]);
Expand Down
6 changes: 3 additions & 3 deletions Configuration/TCA/tx_cfcleague_competition_penalty.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
'columns' => [
'hidden' => [
'exclude' => 1,
'label' => \Sys25\RnBase\Backend\Utility\TcaTool::buildGeneralLabel('hidden'),
'label' => Sys25\RnBase\Backend\Utility\TcaTool::buildGeneralLabel('hidden'),
'config' => [
'type' => 'check',
'default' => '0',
Expand Down Expand Up @@ -265,10 +265,10 @@
],
];

if (\Sys25\RnBase\Utility\TYPO3::isTYPO104OrHigher()) {
if (Sys25\RnBase\Utility\TYPO3::isTYPO104OrHigher()) {
unset($tx_cfcleague_competition_penalty['interface']['showRecordFieldList']);
}

$tx_cfcleague_competition_penalty['columns']['comment']['config']['wizards'] = \Sys25\RnBase\Backend\Utility\TcaTool::getWizards('', ['RTE' => true]);
$tx_cfcleague_competition_penalty['columns']['comment']['config']['wizards'] = Sys25\RnBase\Backend\Utility\TcaTool::getWizards('', ['RTE' => true]);

return $tx_cfcleague_competition_penalty;
14 changes: 7 additions & 7 deletions Configuration/TCA/tx_cfcleague_games.php
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
'columns' => [
'hidden' => [
'exclude' => 1,
'label' => \Sys25\RnBase\Backend\Utility\TcaTool::buildGeneralLabel('hidden'),
'label' => Sys25\RnBase\Backend\Utility\TcaTool::buildGeneralLabel('hidden'),
'config' => [
'type' => 'check',
'default' => '0',
Expand Down Expand Up @@ -727,26 +727,26 @@
],
];

if (\Sys25\RnBase\Utility\TYPO3::isTYPO104OrHigher()) {
if (Sys25\RnBase\Utility\TYPO3::isTYPO104OrHigher()) {
unset($tx_cfcleague_games['interface']['showRecordFieldList']);
}

\Sys25\RnBase\Backend\Utility\TcaTool::configureWizards($tx_cfcleague_games, [
Sys25\RnBase\Backend\Utility\TcaTool::configureWizards($tx_cfcleague_games, [
'game_report' => ['RTE' => ['defaultExtras' => $rteConfig]],
'referee' => ['targettable' => 'tx_cfcleague_profiles', 'suggest' => true],
'assists' => ['targettable' => 'tx_cfcleague_profiles', 'suggest' => true],
'videoreferee' => ['targettable' => 'tx_cfcleague_profiles', 'suggest' => true],
'videoassists' => ['targettable' => 'tx_cfcleague_profiles', 'suggest' => true],
]);

$tx_cfcleague_games['columns']['t3images'] = \Sys25\RnBase\Utility\TSFAL::getMediaTCA('t3images', [
'label' => \Sys25\RnBase\Backend\Utility\TcaTool::buildGeneralLabel('images'),
$tx_cfcleague_games['columns']['t3images'] = Sys25\RnBase\Utility\TSFAL::getMediaTCA('t3images', [
'label' => Sys25\RnBase\Backend\Utility\TcaTool::buildGeneralLabel('images'),
]);
$tx_cfcleague_games['columns']['dam_media'] = \Sys25\RnBase\Utility\TSFAL::getMediaTCA('dam_media', [
$tx_cfcleague_games['columns']['dam_media'] = Sys25\RnBase\Utility\TSFAL::getMediaTCA('dam_media', [
'type' => 'media',
'label' => 'LLL:EXT:cms/locallang_ttc.xlf:media',
]);
$tx_cfcleague_games['columns']['dam_media2'] = \Sys25\RnBase\Utility\TSFAL::getMediaTCA('dam_media2', [
$tx_cfcleague_games['columns']['dam_media2'] = Sys25\RnBase\Utility\TSFAL::getMediaTCA('dam_media2', [
'type' => 'media',
'label' => 'LLL:EXT:cms/locallang_ttc.xlf:media',
]);
Expand Down
10 changes: 5 additions & 5 deletions Configuration/TCA/tx_cfcleague_group.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@
'columns' => [
'hidden' => [
'exclude' => 1,
'label' => \Sys25\RnBase\Backend\Utility\TcaTool::buildGeneralLabel('hidden'),
'label' => Sys25\RnBase\Backend\Utility\TcaTool::buildGeneralLabel('hidden'),
'config' => [
'type' => 'check',
'default' => '0',
],
],
'starttime' => [
'exclude' => 1,
'label' => \Sys25\RnBase\Backend\Utility\TcaTool::buildGeneralLabel('starttime'),
'label' => Sys25\RnBase\Backend\Utility\TcaTool::buildGeneralLabel('starttime'),
'config' => [
'type' => 'input',
'renderType' => 'inputDateTime',
'eval' => 'datetime'.(\Sys25\RnBase\Utility\TYPO3::isTYPO104OrHigher() ? ',int' : ''),
'eval' => 'datetime'.(Sys25\RnBase\Utility\TYPO3::isTYPO104OrHigher() ? ',int' : ''),
'default' => '0',
],
],
Expand Down Expand Up @@ -81,11 +81,11 @@
],
];

if (\Sys25\RnBase\Utility\TYPO3::isTYPO104OrHigher()) {
if (Sys25\RnBase\Utility\TYPO3::isTYPO104OrHigher()) {
unset($tx_cfcleague_group['interface']['showRecordFieldList']);
}

$tx_cfcleague_group['columns']['logo'] = \Sys25\RnBase\Utility\TSFAL::getMediaTCA('logo', [
$tx_cfcleague_group['columns']['logo'] = Sys25\RnBase\Utility\TSFAL::getMediaTCA('logo', [
'label' => 'LLL:EXT:cfc_league/Resources/Private/Language/locallang_db.xlf:tx_cfcleague_club.logo',
'size' => 1,
'maxitems' => 1,
Expand Down
4 changes: 2 additions & 2 deletions Configuration/TCA/tx_cfcleague_match_notes.php
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
'columns' => [
'hidden' => [
'exclude' => 1,
'label' => \Sys25\RnBase\Backend\Utility\TcaTool::buildGeneralLabel('hidden'),
'label' => Sys25\RnBase\Backend\Utility\TcaTool::buildGeneralLabel('hidden'),
'config' => [
'type' => 'check',
'default' => '0',
Expand Down Expand Up @@ -165,7 +165,7 @@
],
];

if (\Sys25\RnBase\Utility\TYPO3::isTYPO104OrHigher()) {
if (Sys25\RnBase\Utility\TYPO3::isTYPO104OrHigher()) {
unset($tx_cfcleague_match_notes['interface']['showRecordFieldList']);
}

Expand Down
2 changes: 1 addition & 1 deletion Configuration/TCA/tx_cfcleague_note_types.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@
],
];

if (\Sys25\RnBase\Utility\TYPO3::isTYPO104OrHigher()) {
if (Sys25\RnBase\Utility\TYPO3::isTYPO104OrHigher()) {
unset($tx_cfcleague_note_types['interface']['showRecordFieldList']);
}

Expand Down
Loading

0 comments on commit 5d641aa

Please sign in to comment.