1 | <?php |
||
24 | class AntivirusPlugin extends ServerPlugin { |
||
25 | const NS_OWNCLOUD = 'http://owncloud.org/ns'; |
||
26 | |||
27 | /** |
||
28 | * @var \Sabre\DAV\Server $server |
||
29 | */ |
||
30 | private $server; |
||
31 | |||
32 | /** |
||
33 | * @var Application |
||
34 | */ |
||
35 | private $application; |
||
36 | |||
37 | /** |
||
38 | * Constructor |
||
39 | * |
||
40 | * @param Application $application |
||
41 | */ |
||
42 | 1 | public function __construct(Application $application) { |
|
45 | |||
46 | /** |
||
47 | * This initializes the plugin. |
||
48 | * |
||
49 | * This function is called by Sabre\DAV\Server, after |
||
50 | * addPlugin is called. |
||
51 | * |
||
52 | * This method should set up the required event subscriptions. |
||
53 | * |
||
54 | * @param Server $server |
||
55 | * |
||
56 | * @return void |
||
57 | */ |
||
58 | 1 | public function initialize(Server $server) { |
|
62 | |||
63 | /** |
||
64 | * @param string $source |
||
65 | * @param string $destination |
||
66 | * |
||
67 | * @return bool|void |
||
68 | * @throws \Sabre\DAV\Exception\NotFound |
||
69 | */ |
||
70 | 1 | public function beforeMove($source, $destination) { |
|
79 | } |
||
80 |
This error could be the result of:
1. Missing dependencies
PHP Analyzer uses your
composer.json
file (if available) to determine the dependencies of your project and to determine all the available classes and functions. It expects thecomposer.json
to be in the root folder of your repository.Are you sure this class is defined by one of your dependencies, or did you maybe not list a dependency in either the
require
orrequire-dev
section?2. Missing use statement
PHP does not complain about undefined classes in
ìnstanceof
checks. For example, the following PHP code will work perfectly fine:If you have not tested against this specific condition, such errors might go unnoticed.