Skip to content

Commit 7c0697a

Browse files
committed
Code-style patch.
1 parent f0dd112 commit 7c0697a

File tree

1 file changed

+1
-12
lines changed

1 file changed

+1
-12
lines changed

src/Scanner.php

Lines changed: 1 addition & 12 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: 2022.06.19).
11+
* This file: The scanner (last modified: 2022.08.20).
1212
*/
1313

1414
namespace phpMussel\Core;
@@ -885,13 +885,11 @@ private function recursor($Files = '', int $Depth = -1): void
885885
* only bother doing this if the file hasn't already been flagged though.
886886
*/
887887
if (!empty($this->Loader->InstanceCache['CheckWasLast'])) {
888-
889888
/** Create a new compression object. */
890889
$CompressionObject = new CompressionHandler($In);
891890

892891
/** Now we'll try to decompress the file. */
893892
if (!$CompressionResults = $CompressionObject->TryEverything()) {
894-
895893
/** Success! Now we'll send it to the data handler. */
896894
$this->dataHandler($CompressionObject->Data, $Depth, $this->dropTrailingCompressionExtension($OriginalFilenameClean));
897895

@@ -910,7 +908,6 @@ private function recursor($Files = '', int $Depth = -1): void
910908

911909
/** Executed if any problems were detected. */
912910
if (empty($this->Loader->InstanceCache['CheckWasLast'])) {
913-
914911
/** Quarantine if necessary. */
915912
if (
916913
$this->Loader->Configuration['quarantine']['quarantine_key'] &&
@@ -1736,7 +1733,6 @@ private function dataHandler(string $str = '', int $Depth = 0, string $OriginalF
17361733
['URL_Scanner', 4],
17371734
['Complex_Extended', 5]
17381735
] as $ThisConf) {
1739-
17401736
/** Fire event: "beforeSigFiles". */
17411737
$this->Loader->Events->fireEvent('beforeSigFiles');
17421738

@@ -2338,7 +2334,6 @@ private function dataHandler(string $str = '', int $Depth = 0, string $OriginalF
23382334
) ? array_chunk($URLScanner['URLParts'], 500) : [$URLScanner['URLParts']];
23392335
$URLScanner['URLChunks'] = count($URLScanner['URLsChunked']);
23402336
for ($i = 0; $i < $URLScanner['URLChunks']; $i++) {
2341-
23422337
/** Maximum API lookups reached; abort accordingly. */
23432338
if (
23442339
$this->Loader->Configuration['urlscanner']['maximum_api_lookups'] > 0 &&
@@ -3489,7 +3484,6 @@ private function safeBrowseLookup(array $URLs, array $URLsNoLookup = [], array $
34893484

34903485
/** If this lookup has already been performed, return the results. */
34913486
if (!empty($Response)) {
3492-
34933487
/** Potentially harmful URL detected. */
34943488
if ($Response === '200') {
34953489
return 200;
@@ -3537,13 +3531,11 @@ private function safeBrowseLookup(array $URLs, array $URLsNoLookup = [], array $
35373531
if (strpos($Response, '"matches":') !== false) {
35383532
$returnVal = 200;
35393533
} else {
3540-
35413534
/**
35423535
* Other possible problem detected.
35433536
* @link https://developers.google.com/safe-browsing/v4/status-codes
35443537
*/
35453538
if (isset($this->Loader->MostRecentHttpCode) && $this->Loader->MostRecentHttpCode !== 200) {
3546-
35473539
/**
35483540
* Malformed request detected (e.g., invalid argument, invalid
35493541
* request payload, etc).
@@ -3586,7 +3578,6 @@ private function safeBrowseLookup(array $URLs, array $URLsNoLookup = [], array $
35863578
*/
35873579
$newExpiry += 86400;
35883580
} else {
3589-
35903581
/** Potentially harmful URL *NOT* detected, and no other problems detected. */
35913582
$returnVal = 204;
35923583
}
@@ -3851,13 +3842,11 @@ private function metaDataScan(string $ItemRef, string $Filename, string &$Data,
38513842
* only bother doing this if the file hasn't already been flagged though.
38523843
*/
38533844
if (!empty($this->Loader->InstanceCache['CheckWasLast'])) {
3854-
38553845
/** Create a new compression object. */
38563846
$CompressionObject = new CompressionHandler($Data);
38573847

38583848
/** Now we'll try to decompress the file. */
38593849
if (!$CompressionResults = $CompressionObject->TryEverything()) {
3860-
38613850
/** Success! Now we'll send it to the data handler. */
38623851
$this->dataHandler($CompressionObject->Data, $Depth, $this->dropTrailingCompressionExtension($Filename));
38633852

0 commit comments

Comments
 (0)