Skip to content

Commit 4d6c4f3

Browse files
committed
Fix PHPStan issues
1 parent 4c9b3d3 commit 4d6c4f3

1 file changed

Lines changed: 17 additions & 17 deletions

File tree

mailscanner/rep_viruses.php

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
switch ($vscanner) {
4343
case 'antivir':
4444
$scanner[$vscanner]['name'] = 'AntiVir';
45-
$scanner[$vscanner]['regexp'] = "/ALERT: \[(?P<virus>\S+) \S+\]/";
45+
$scanner[$vscanner]['regexp'] = '/ALERT: \[(?P<virus>\S+) \S+\]/';
4646
break;
4747
case 'avast':
4848
case 'avastd':
@@ -51,23 +51,23 @@
5151
break;
5252
case 'avg':
5353
$scanner[$vscanner]['name'] = 'AVG';
54-
$scanner[$vscanner]['regexp'] = "/Found virus (?P<virus>\S+) in file (?P<file>\S+)/";
54+
$scanner[$vscanner]['regexp'] = '/Found virus (?P<virus>\S+) in file (?P<file>\S+)/';
5555
break;
5656
case 'bitdefender':
5757
$scanner[$vscanner]['name'] = 'BitDefender';
58-
$scanner[$vscanner]['regexp'] = "/(?P<file>.+) Found virus (?P<virus>\S+)/";
58+
$scanner[$vscanner]['regexp'] = '/(?P<file>.+) Found virus (?P<virus>\S+)/';
5959
break;
6060
case 'clamav':
6161
$scanner[$vscanner]['name'] = 'ClamAV';
62-
$scanner[$vscanner]['regexp'] = "/(?P<file>.+) contains (?P<virus>\S+)/";
62+
$scanner[$vscanner]['regexp'] = '/(?P<file>.+) contains (?P<virus>\S+)/';
6363
break;
6464
case 'clamd':
6565
$scanner[$vscanner]['name'] = 'ClamD';
66-
$scanner[$vscanner]['regexp'] = "/(?P<file>.+) was infected: (?P<virus>\S+)/";
66+
$scanner[$vscanner]['regexp'] = '/(?P<file>.+) was infected: (?P<virus>\S+)/';
6767
break;
6868
case 'clamavmodule':
6969
$scanner[$vscanner]['name'] = 'Clam AV Module';
70-
$scanner[$vscanner]['regexp'] = "/(?P<file>.+) was infected: (?P<virus>\S+)/";
70+
$scanner[$vscanner]['regexp'] = '/(?P<file>.+) was infected: (?P<virus>\S+)/';
7171
break;
7272
case 'esets':
7373
case 'esetsefs':
@@ -76,49 +76,49 @@
7676
break;
7777
case 'etrust':
7878
$scanner[$vscanner]['name'] = 'E-Trust';
79-
$scanner[$vscanner]['regexp'] = "/(?P<file>\S+) is infected by virus: (?P<virus>\S+)/";
79+
$scanner[$vscanner]['regexp'] = '/(?P<file>\S+) is infected by virus: (?P<virus>\S+)/';
8080
break;
8181
case 'f-prot':
8282
case 'f-prot-6':
8383
case 'f-protd-6':
8484
$scanner[$vscanner]['name'] = 'F-Prot';
85-
$scanner[$vscanner]['regexp'] = "/(?P<file>.+) Infection: (?P<virus>\S+)/";
85+
$scanner[$vscanner]['regexp'] = '/(?P<file>.+) Infection: (?P<virus>\S+)/';
8686
break;
8787
case 'f-secure':
8888
case 'f-secure-12':
8989
$scanner[$vscanner]['name'] = 'F-Secure';
90-
$scanner[$vscanner]['regexp'] = "/(?P<file>.+) Infected: (?P<virus>\S+)/";
90+
$scanner[$vscanner]['regexp'] = '/(?P<file>.+) Infected: (?P<virus>\S+)/';
9191
break;
9292
case 'kaspersky-4.5':
9393
case 'kaspersky':
9494
case 'kse':
9595
$scanner[$vscanner]['name'] = 'Kaspersky';
96-
$scanner[$vscanner]['regexp'] = "/(?P<file>.+) INFECTED (?P<virus>\S+)/";
96+
$scanner[$vscanner]['regexp'] = '/(?P<file>.+) INFECTED (?P<virus>\S+)/';
9797
break;
9898
case 'mcafee':
9999
case 'mcafee6':
100100
$scanner[$vscanner]['name'] = 'McAfee';
101-
$scanner[$vscanner]['regexp'] = "/(?P<file>.+) Found the (?P<virus>\S+) (trojan|virus) !!!/";
101+
$scanner[$vscanner]['regexp'] = '/(?P<file>.+) Found the (?P<virus>\S+) (trojan|virus) !!!/';
102102
break;
103103
case 'norman':
104104
$scanner[$vscanner]['name'] = 'Norman';
105-
$scanner[$vscanner]['regexp'] = "/Found virus (?P<virus>\S+) in file (?P<file>\S+)/";
105+
$scanner[$vscanner]['regexp'] = '/Found virus (?P<virus>\S+) in file (?P<file>\S+)/';
106106
break;
107107
case 'nod32-1.99':
108108
$scanner[$vscanner]['name'] = 'NOD32';
109-
$scanner[$vscanner]['regexp'] = "/Found virus (?P<virus>\S+) in (?P<file>\S+)/";
109+
$scanner[$vscanner]['regexp'] = '/Found virus (?P<virus>\S+) in (?P<file>\S+)/';
110110
break;
111111
case 'sophos':
112112
$scanner[$vscanner]['name'] = 'Sophos';
113-
$scanner[$vscanner]['regexp'] = "/>>> Virus \'(?P<virus>\S+)\' found in (?P<file>\S+)/";
113+
$scanner[$vscanner]['regexp'] = '/>>> Virus \\\'(?P<virus>\S+)\\\' found in (?P<file>\S+)/';
114114
break;
115115
case 'sophossavi':
116116
$scanner[$vscanner]['name'] = 'Sophos SAVI';
117-
$scanner[$vscanner]['regexp'] = "/(?P<file>\S+) was infected by (?P<virus>\S+)/";
117+
$scanner[$vscanner]['regexp'] = '/(?P<file>\S+) was infected by (?P<virus>\S+)/';
118118
break;
119119
case 'trend':
120120
$scanner[$vscanner]['name'] = 'Trend';
121-
$scanner[$vscanner]['regexp'] = "/Found virus (?P<virus>\S+) in file (?P<file>\S+)/";
121+
$scanner[$vscanner]['regexp'] = '/Found virus (?P<virus>\S+) in file (?P<file>\S+)/';
122122
break;
123123
}
124124
}
@@ -138,7 +138,7 @@
138138
date ASC, time ASC';
139139

140140
$result = dbquery($sql);
141-
if (!$result->num_rows > 0) {
141+
if (!($result->num_rows > 0)) {
142142
exit(__('diemysql99') . "\n");
143143
}
144144

0 commit comments

Comments
 (0)