Skip to content

Commit 854c015

Browse files
committed
Code-style patch.
1 parent 219abbb commit 854c015

File tree

2 files changed

+23
-28
lines changed

2 files changed

+23
-28
lines changed

Changelog.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,3 +159,5 @@ __*Why "v3.0.0" instead of "v1.0.0?"*__ Prior to phpMussel v3, the "phpMussel Co
159159
[2024.07.13; Bug-fix; Maikuolan]: If the client-specified language was the same as the configured language, the client-specified preferred variant would be ignored, even if it wasn't the same as the configured preferred variant; Fixed.
160160

161161
[2024.08.06; Maikuolan]: Updated the default filetype blacklist (#7).
162+
163+
[2024.09.02; Maikuolan]: Code-style patch.

src/Scanner.php

Lines changed: 21 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
* License: GNU/GPLv2
99
* @see LICENSE.txt
1010
*
11-
* This file: The scanner (last modified: 2024.03.21).
11+
* This file: The scanner (last modified: 2024.09.02).
1212
*/
1313

1414
namespace phpMussel\Core;
@@ -3632,37 +3632,30 @@ private function safeBrowseLookup(array $URLs, array $URLsNoLookup = [], array $
36323632
* @link https://developers.google.com/safe-browsing/v4/status-codes
36333633
*/
36343634
if (isset($this->Loader->MostRecentHttpCode) && $this->Loader->MostRecentHttpCode !== 200) {
3635-
/**
3636-
* Malformed request detected (e.g., invalid argument, invalid
3637-
* request payload, etc).
3638-
*/
36393635
if ($this->Loader->MostRecentHttpCode === '400') {
3636+
/**
3637+
* Malformed request detected (e.g., invalid argument, invalid request payload,
3638+
* etc).
3639+
*/
36403640
$returnVal = 400;
3641-
}
3642-
3643-
/**
3644-
* Unauthorised (most likely an invalid API key used). Returning
3645-
* the same message for 401 and 403 because the returned message is
3646-
* suitable either way.
3647-
*/
3648-
elseif ($this->Loader->MostRecentHttpCode >= '401' && $this->Loader->MostRecentHttpCode <= 403) {
3641+
} elseif ($this->Loader->MostRecentHttpCode >= '401' && $this->Loader->MostRecentHttpCode <= 403) {
3642+
/**
3643+
* Unauthorised (most likely an invalid API key used). Returning the same
3644+
* message for 401 and 403 because the returned message is suitable either way.
3645+
*/
36493646
$returnVal = 401;
3650-
}
3651-
3652-
/**
3653-
* Service unavailable or internal server error. Returning the same
3654-
* message for 429, 500, 503, 504 alike because, for our purpose,
3655-
* the returned message is suitable in any case.
3656-
*/
3657-
elseif ($this->Loader->MostRecentHttpCode >= '429') {
3647+
} elseif ($this->Loader->MostRecentHttpCode >= '429') {
3648+
/**
3649+
* Service unavailable or internal server error. Returning the same message for
3650+
* 429, 500, 503, 504 alike because, for our purpose, the returned message is
3651+
* suitable in any case.
3652+
*/
36583653
$returnVal = 503;
3659-
}
3660-
3661-
/**
3662-
* Fallback for other error codes (in theory, this shouldn't ever
3663-
* be reached, but adding it here just in case).
3664-
*/
3665-
else {
3654+
} else {
3655+
/**
3656+
* Fallback for other error codes (in theory, this shouldn't ever be reached, but
3657+
* adding it here just in case).
3658+
*/
36663659
$returnVal = 999;
36673660
}
36683661

0 commit comments

Comments
 (0)