Skip to content

Commit

Permalink
Merge pull request #8034 from jdarwood007/release-3.0
Browse files Browse the repository at this point in the history
PHP-CS-Fixer
  • Loading branch information
tyrsson authored Jan 22, 2024
2 parents 7d96db0 + eff33ee commit a2dc5f4
Show file tree
Hide file tree
Showing 28 changed files with 82 additions and 73 deletions.
2 changes: 1 addition & 1 deletion Sources/Actions/Admin/ACP.php
Original file line number Diff line number Diff line change
Expand Up @@ -1913,7 +1913,7 @@ function (&$value, $key) {
$value = strtr($value, [
'{scripturl}' => Config::$scripturl,
'{boardurl}' => Config::$boardurl,
]);
]);
}
},
);
Expand Down
2 changes: 1 addition & 1 deletion Sources/Actions/Admin/Bans.php
Original file line number Diff line number Diff line change
Expand Up @@ -2405,7 +2405,7 @@ protected function getMemberData(int $id): array
* If null, the triggers will be deleted from all groups.
* @return bool Whether the operation was successful.
*/
protected static function removeBanTriggers(array|int $items_ids = [], int $group_id = null): bool
protected static function removeBanTriggers(array|int $items_ids = [], ?int $group_id = null): bool
{
if (isset($group_id)) {
$group_id = (int) $group_id;
Expand Down
4 changes: 2 additions & 2 deletions Sources/Actions/Admin/Calendar.php
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ public function edit(): void
],
);
} else {
$date = Time::strftime($_REQUEST['year'] <= 1004 ? '1004-%m-%d' : '%Y-%m-%d',mktime(0, 0, 0, (int) $_REQUEST['month'], (int) $_REQUEST['day'], (int) $_REQUEST['year']));
$date = Time::strftime($_REQUEST['year'] <= 1004 ? '1004-%m-%d' : '%Y-%m-%d', mktime(0, 0, 0, (int) $_REQUEST['month'], (int) $_REQUEST['day'], (int) $_REQUEST['year']));

if (isset($_REQUEST['edit'])) {
Db::$db->query(
Expand Down Expand Up @@ -321,7 +321,7 @@ public function edit(): void
}

// Last day for the drop down?
Utils::$context['holiday']['last_day'] = (int) Time::strftime('%d', mktime(0, 0, 0, Utils::$context['holiday']['month'] == 12 ? 1 : (int) Utils::$context['holiday']['month'] + 1, 0, Utils::$context['holiday']['month'] == 12 ? (int)Utils::$context['holiday']['year'] + 1 : (int) Utils::$context['holiday']['year']));
Utils::$context['holiday']['last_day'] = (int) Time::strftime('%d', mktime(0, 0, 0, Utils::$context['holiday']['month'] == 12 ? 1 : (int) Utils::$context['holiday']['month'] + 1, 0, Utils::$context['holiday']['month'] == 12 ? (int) Utils::$context['holiday']['year'] + 1 : (int) Utils::$context['holiday']['year']));
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Sources/Actions/Admin/Registration.php
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ public function privacyPolicy(): void
];

if (isset(Config::$modSettings['policy_updated_' . Utils::$context['current_policy_lang']], Config::$modSettings['policy_' . Utils::$context['current_policy_lang'] . '_' . Config::$modSettings['policy_updated_' . Utils::$context['current_policy_lang']]])) {
$policy_settings['policy_' . Utils::$context['current_policy_lang'] . '_' . Config::$modSettings['policy_updated_' . Utils::$context['current_policy_lang']]] = Utils::$context['privacy_policy'];
$policy_settings['policy_' . Utils::$context['current_policy_lang'] . '_' . Config::$modSettings['policy_updated_' . Utils::$context['current_policy_lang']]] = Utils::$context['privacy_policy'];
}

$policy_settings['policy_updated_' . Utils::$context['current_policy_lang']] = time();
Expand Down
68 changes: 34 additions & 34 deletions Sources/Actions/Admin/RepairBoards.php
Original file line number Diff line number Diff line change
Expand Up @@ -1312,7 +1312,7 @@ protected function createSalvageArea(): void

/**
* Callback to fix missing topics.
*
*
* @param array $row Message with missing topic.
*/
protected function fixMissingTopics(array $row): void
Expand Down Expand Up @@ -1384,7 +1384,7 @@ protected function fixMissingTopics(array $row): void

/**
* Callback to remove all topics that have zero messages in the messages table.
*
*
* @param array $topics An array of topic ids.
*/
protected function fixMissingMessages(array $topics): void
Expand All @@ -1410,7 +1410,7 @@ protected function fixMissingMessages(array $topics): void

/**
* Callback to fix missing poll options.
*
*
* @param array $row Message with missing topic.
*/
protected function fixMissingPollOptions(array $row): void
Expand Down Expand Up @@ -1537,7 +1537,7 @@ protected function fixMissingPollOptions(array $row): void

/**
* Callback to fix polls that have no topic.
*
*
* @param array $row Message with missing topic.
*/
protected function fixMissingPollTopics(array $row): void
Expand Down Expand Up @@ -1627,7 +1627,7 @@ protected function fixMissingPollTopics(array $row): void

/**
* Callback to fix missing first and last message IDs for a topic.
*
*
* @param array $row Topic data.
*/
protected function fixTopicStats(array $row): bool
Expand Down Expand Up @@ -1667,7 +1667,7 @@ protected function fixTopicStats(array $row): bool
/**
* Callback to get a message about missing first and last message IDs for a
* topic.
*
*
* @param array $row Topic data.
*/
protected function topicStatsMessage(array $row): bool
Expand All @@ -1694,7 +1694,7 @@ protected function topicStatsMessage(array $row): bool

/**
* Callback to fix the recorded number of replies to a topic.
*
*
* @param array $row Topic data.
*/
protected function fixTopicStats2(array $row): bool
Expand Down Expand Up @@ -1723,7 +1723,7 @@ protected function fixTopicStats2(array $row): bool
/**
* Callback to get a message about an incorrect record of the number of
* replies to a topic.
*
*
* @param array $row Topic data.
*/
protected function topicStatsMessage2(array $row): bool
Expand All @@ -1742,7 +1742,7 @@ protected function topicStatsMessage2(array $row): bool

/**
* Callback to fix the recorded number of unapproved replies to a topic.
*
*
* @param array $row Topic data.
*/
protected function fixTopicStats3(array $row): void
Expand All @@ -1763,7 +1763,7 @@ protected function fixTopicStats3(array $row): void

/**
* Callback to give a home to topics that have no board.
*
*
* @param array $row Topic data.
*/
protected function fixMissingBoards(array $row): void
Expand Down Expand Up @@ -1806,7 +1806,7 @@ protected function fixMissingBoards(array $row): void

/**
* Callback to give a home to boards that have no category.
*
*
* @param array $cats An array of missing Categories.
*/
protected function fixMissingCategories(array $cats): void
Expand All @@ -1827,7 +1827,7 @@ protected function fixMissingCategories(array $cats): void

/**
* Callback to give an author to messages that don't have one.
*
*
* @param array $msgs An array of messages.
*/
protected function fixMissingPosters(array $msgs): void
Expand All @@ -1846,7 +1846,7 @@ protected function fixMissingPosters(array $msgs): void

/**
* Callback to let our salvage board adopt orphaned child boards.
*
*
* @param array $parents An array of board ids.
*/
protected function fixMissingParents(array $parents): void
Expand All @@ -1869,7 +1869,7 @@ protected function fixMissingParents(array $parents): void

/**
* Callback to remove non-existent polls from topics.
*
*
* @param array $polls An array of poll ids.
*/
protected function fixMissingPolls(array $polls): void
Expand All @@ -1887,7 +1887,7 @@ protected function fixMissingPolls(array $polls): void

/**
* Callback to remove broken links to topics from calendar events.
*
*
* @param array $events An array of topic ids.
*/
protected function fixMissingCaledarTopics(array $events): void
Expand All @@ -1905,7 +1905,7 @@ protected function fixMissingCaledarTopics(array $events): void

/**
* Callback to remove log_topics entries for non-existent topics.
*
*
* @param array $topics An array of topic ids.
*/
protected function fixMissingLogTopics(array $topics): void
Expand All @@ -1922,7 +1922,7 @@ protected function fixMissingLogTopics(array $topics): void

/**
* Callback to remove log_topics entries for non-existent members.
*
*
* @param array $members An array of member ids.
*/
protected function fixMissingLogTopicsMembers(array $members): void
Expand All @@ -1939,7 +1939,7 @@ protected function fixMissingLogTopicsMembers(array $members): void

/**
* Callback to remove log_boards entries for non-existent boards.
*
*
* @param array $boards An array of board ids.
*/
protected function fixMissingLogBoards(array $boards): void
Expand All @@ -1956,7 +1956,7 @@ protected function fixMissingLogBoards(array $boards): void

/**
* Callback to remove log_boards entries for non-existent members.
*
*
* @param array $members An array of member ids.
*/
protected function fixMissingLogBoardsMembers(array $members): void
Expand All @@ -1973,7 +1973,7 @@ protected function fixMissingLogBoardsMembers(array $members): void

/**
* Callback to remove log_mark_read entries for non-existent boards.
*
*
* @param array $boards An array of board ids.
*/
protected function fixMissingLogMarkRead(array $boards): void
Expand All @@ -1990,7 +1990,7 @@ protected function fixMissingLogMarkRead(array $boards): void

/**
* Callback to remove log_mark_read entries for non-existent members.
*
*
* @param array $members An array of member ids.
*/
protected function fixMissingLogMarkReadMembers(array $members): void
Expand All @@ -2008,7 +2008,7 @@ protected function fixMissingLogMarkReadMembers(array $members): void
/**
* Callback to remove non-existent personal messages from the recipients'
* inboxes.
*
*
* @param array $pms An array of personal message ids.
*/
protected function fixMissingPMs(array $pms): void
Expand All @@ -2025,7 +2025,7 @@ protected function fixMissingPMs(array $pms): void

/**
* Callback to remove non-existent recipients from personal messages.
*
*
* @param array $members An array of member ids.
*/
protected function fixMissingRecipients(array $members): void
Expand All @@ -2043,7 +2043,7 @@ protected function fixMissingRecipients(array $members): void
/**
* Callback to fix the assigned authorship of PMs from non-existent senders.
* Specifically, such PMs will be shown to have been sent from a guest.
*
*
* @param array $guestMessages An array of personal messages ids.
*/
protected function fixMissingSenders(array $guestMessages): void
Expand All @@ -2061,7 +2061,7 @@ protected function fixMissingSenders(array $guestMessages): void

/**
* Callback to remove log_notify entries for non-existent members.
*
*
* @param array $members An array of member ids.
*/
protected function fixMissingNotifyMembers(array $members): void
Expand All @@ -2078,7 +2078,7 @@ protected function fixMissingNotifyMembers(array $members): void

/**
* Callback to fix missing log_search_subjects entries for a topic.
*
*
* @param array $result Search result id
*/
protected function fixMissingCachedSubject(array $result): void
Expand Down Expand Up @@ -2117,7 +2117,7 @@ protected function fixMissingCachedSubject(array $result): void
/**
* Callback to get a message about missing log_search_subjects entries for a
* topic.
*
*
* @param array $row Search result id
*/
protected function missingCachedSubjectMessage(array $row): bool
Expand All @@ -2133,7 +2133,7 @@ protected function missingCachedSubjectMessage(array $row): bool

/**
* Callback to remove log_search_subjects entries for non-existent topics.
*
*
* @param array $deleteTopics An array of topic ids.
*/
protected function fixMissingTopicForCache(array $deleteTopics): void
Expand All @@ -2150,7 +2150,7 @@ protected function fixMissingTopicForCache(array $deleteTopics): void

/**
* Callback to remove poll votes made by non-existent members.
*
*
* @param array $members An array of member ids.
*/
protected function fixMissingMemberVote(array $members): void
Expand All @@ -2167,7 +2167,7 @@ protected function fixMissingMemberVote(array $members): void

/**
* Callback to remove poll votes made in non-existent polls.
*
*
* @param array $polls An array of poll ids.
*/
protected function fixMissingLogPollVote(array $polls): void
Expand All @@ -2184,7 +2184,7 @@ protected function fixMissingLogPollVote(array $polls): void

/**
* Callback to remove non-existent comments from reports.
*
*
* @param array $reports An array of report ids.
*/
protected function fixReportMissingComments(array $reports): void
Expand All @@ -2201,7 +2201,7 @@ protected function fixReportMissingComments(array $reports): void

/**
* Callback to remove comments made on non-existent reports.
*
*
* @param array $reports An array of report ids.
*/
protected function fixCommentMissingReport(array $reports): void
Expand All @@ -2218,7 +2218,7 @@ protected function fixCommentMissingReport(array $reports): void

/**
* Callback to remove requests to join a group made by non-existent members.
*
*
* @param array $members An array of member ids.
*/
protected function fixGroupRequestMissingMember(array $members): void
Expand All @@ -2235,7 +2235,7 @@ protected function fixGroupRequestMissingMember(array $members): void

/**
* Callback to remove requests to join non-existent groups.
*
*
* @param array $groups An array of group ids.
*/
protected function fixGroupRequestMissingGroup(array $groups): void
Expand Down
2 changes: 1 addition & 1 deletion Sources/Actions/Admin/Server.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ class Server implements ActionInterface
*/
public static bool $diskspace_disabled = false;


/****************************
* Internal static properties
****************************/
Expand Down
4 changes: 2 additions & 2 deletions Sources/Actions/Admin/Subscriptions.php
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,7 @@ public function modifyUser(): void
0,
(int) $_POST['month'],
(int) $_POST['day'],
(int) $_POST['year']
(int) $_POST['year'],
);

$endtime = mktime(
Expand All @@ -908,7 +908,7 @@ public function modifyUser(): void
0,
(int) $_POST['monthend'],
(int) $_POST['dayend'],
(int) $_POST['yearend']
(int) $_POST['yearend'],
);

// Status.
Expand Down
3 changes: 2 additions & 1 deletion Sources/Actions/Admin/Themes.php
Original file line number Diff line number Diff line change
Expand Up @@ -985,7 +985,7 @@ public function install(): void
* Shows an interface for editing the templates.
* - uses the Themes template and edit_template/edit_style sub template.
* - accessed via ?action=admin;area=theme;sa=edit
*
*
* @return ?string 'no_themes' returned if we can't find the theme, otherwise nothing is returned.
*/
public function edit(): ?string
Expand Down Expand Up @@ -2190,6 +2190,7 @@ protected function deltree(string $path): bool
}

reset($objects);

return rmdir($path);
}

Expand Down
Loading

0 comments on commit a2dc5f4

Please sign in to comment.