Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
clamav
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
clamav
Merge requests
!8
fix(class): add interface
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
fix(class): add interface
issue/clamav-3403522:3403522-scanner-class-doesnt
into
2.x
Overview
0
Commits
3
Pipelines
2
Changes
2
Merged
Mathew Winstone
requested to merge
issue/clamav-3403522:3403522-scanner-class-doesnt
into
2.x
1 year ago
Overview
0
Commits
3
Pipelines
2
Changes
2
Expand
Closes
#3403522
0
0
Merge request reports
Compare
2.x
version 3
6f622e7a
1 year ago
version 2
c26fe493
1 year ago
version 1
925658ba
1 year ago
2.x (base)
and
latest version
latest version
6f622e7a
3 commits,
5 months ago
version 3
6f622e7a
3 commits,
1 year ago
version 2
c26fe493
2 commits,
1 year ago
version 1
925658ba
1 commit,
1 year ago
2 files
+
5
−
21
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
src/Scanner.php
+
3
−
19
Options
@@ -13,7 +13,7 @@ use Drupal\clamav\Config;
* Passes the methods "scan" and "version" to a specific handler, according to
* the configuration.
*/
class
Scanner
{
class
Scanner
implements
ScannerInterface
{
// Constants defining the infection state of a specific file.
const
FILE_IS_UNCHECKED
=
-
1
;
@@ -139,21 +139,8 @@ class Scanner {
return
$scannable
;
}
/**
* Scan a file for viruses.
*
* @param Drupal\file\FileInterface $file
* The file to scan for viruses.
*
* @return int
* One of the following class constants:
* - CLAMAV_SCANRESULT_UNCHECKED
* The file was not scanned. The ClamAV service may be unavailable.
* - CLAMAV_SCANRESULT_CLEAN
* The file was scanned, and no infection was found.
* - CLAMAV_SCANRESULT_INFECTED
* The file was scanned, and found to be infected with a virus.
* {@inheritdoc}
*/
public
function
scan
(
FileInterface
$file
)
{
// Empty files are never infected.
@@ -201,10 +188,7 @@ class Scanner {
}
/**
* The version of the ClamAV service.
*
* @return string
* The version number provided by ClamAV.
* {@inheritdoc}
*/
public
function
version
()
{
return
$this
->
scanner
->
version
();
Loading