Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/files_antivirus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2021-12-17 17:50:48 +0300
committerCarl Schwan <carl@carlschwan.eu>2022-04-19 11:20:38 +0300
commitd1a75dc6ad344d6174e7d9bf17f8159154c5a46a (patch)
treea8c6b56d126deff7e0f7a668a7dfebdc18a93409 /tests
parent100273b5959d3a7fb7583d986705422e80bead5c (diff)
psalm analysis and fixespsalm
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'tests')
-rw-r--r--tests/stub.phpstub288
1 files changed, 288 insertions, 0 deletions
diff --git a/tests/stub.phpstub b/tests/stub.phpstub
new file mode 100644
index 0000000..2a961dd
--- /dev/null
+++ b/tests/stub.phpstub
@@ -0,0 +1,288 @@
+<?php
+
+declare(strict_types=1);
+/**
+ * @copyright Copyright (c) 2021 Robin Appelman <robin@icewind.nl>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+
+namespace OCA\Files_Trashbin\Trash {
+ interface ITrashManager {
+ public function pauseTrash();
+
+ public function resumeTrash();
+ }
+}
+
+namespace {
+
+ use OCP\IServerContainer;
+
+ class OC {
+ static $CLI = false;
+ /** @var IServerContainer */
+ static $server;
+ }
+}
+
+namespace OC\Hooks {
+ class Emitter {
+ }
+}
+
+namespace OC\Files {
+ class Filesystem {
+ public static function addStorageWrapper(string $wrapperName, callable $wrapper, int $priority = 50) {
+ }
+ }
+}
+
+namespace OCA\DAV\Upload {
+
+ use Sabre\DAV\File;
+
+ abstract class FutureFile extends File {}
+}
+
+namespace OC\BackgroundJob {
+
+ use OCP\BackgroundJob\IJob;
+ use OCP\BackgroundJob\IJobList;
+ use OCP\ILogger;
+
+ abstract class TimedJob implements IJob {
+ public function execute(IJobList $jobList, ILogger $logger = null) {
+ }
+
+ abstract protected function run($argument);
+
+ public function setId(int $id) {
+ }
+
+ public function setLastRun(int $lastRun) {
+ }
+
+ public function setArgument($argument) {
+ }
+
+ public function getId() {
+ }
+
+ public function getLastRun() {
+ }
+
+ public function getArgument() {
+ }
+ }
+}
+
+namespace OC\Files\Storage\Wrapper{
+
+ use OCP\Files\Cache\ICache;
+ use OCP\Files\Cache\ICacheEntry;
+ use OCP\Files\Search\ISearchQuery;
+ use OCP\Files\Storage\IStorage;
+
+ class Wrapper implements IStorage {
+ public function __construct(array $parameters) {
+ }
+
+ public function getId() {
+ throw new \Exception('stub');
+ }
+
+ public function mkdir($path) {
+ throw new \Exception('stub');
+ }
+
+ public function rmdir($path) {
+ throw new \Exception('stub');
+ }
+
+ public function opendir($path) {
+ throw new \Exception('stub');
+ }
+
+ public function is_dir($path) {
+ throw new \Exception('stub');
+ }
+
+ public function is_file($path) {
+ throw new \Exception('stub');
+ }
+
+ public function stat($path) {
+ throw new \Exception('stub');
+ }
+
+ public function filetype($path) {
+ throw new \Exception('stub');
+ }
+
+ public function filesize($path) {
+ throw new \Exception('stub');
+ }
+
+ public function isCreatable($path) {
+ throw new \Exception('stub');
+ }
+
+ public function isReadable($path) {
+ throw new \Exception('stub');
+ }
+
+ public function isUpdatable($path) {
+ throw new \Exception('stub');
+ }
+
+ public function isDeletable($path) {
+ throw new \Exception('stub');
+ }
+
+ public function isSharable($path) {
+ throw new \Exception('stub');
+ }
+
+ public function getPermissions($path) {
+ throw new \Exception('stub');
+ }
+
+ public function file_exists($path) {
+ throw new \Exception('stub');
+ }
+
+ public function filemtime($path) {
+ throw new \Exception('stub');
+ }
+
+ public function file_get_contents($path) {
+ throw new \Exception('stub');
+ }
+
+ public function file_put_contents($path, $data) {
+ throw new \Exception('stub');
+ }
+
+ public function unlink($path) {
+ throw new \Exception('stub');
+ }
+
+ public function rename($path1, $path2) {
+ throw new \Exception('stub');
+ }
+
+ public function copy($path1, $path2) {
+ throw new \Exception('stub');
+ }
+
+ public function fopen($path, $mode) {
+ throw new \Exception('stub');
+ }
+
+ public function getMimeType($path) {
+ throw new \Exception('stub');
+ }
+
+ public function hash($type, $path, $raw = false) {
+ throw new \Exception('stub');
+ }
+
+ public function free_space($path) {
+ throw new \Exception('stub');
+ }
+
+ public function touch($path, $mtime = null) {
+ throw new \Exception('stub');
+ }
+
+ public function getLocalFile($path) {
+ throw new \Exception('stub');
+ }
+
+ public function hasUpdated($path, $time) {
+ throw new \Exception('stub');
+ }
+
+ public function getETag($path) {
+ throw new \Exception('stub');
+ }
+
+ public function isLocal() {
+ throw new \Exception('stub');
+ }
+
+ public function instanceOfStorage($class) {
+ throw new \Exception('stub');
+ }
+
+ public function getDirectDownload($path) {
+ throw new \Exception('stub');
+ }
+
+ public function verifyPath($path, $fileName) {
+ throw new \Exception('stub');
+ }
+
+ public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
+ throw new \Exception('stub');
+ }
+
+ public function moveFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath) {
+ throw new \Exception('stub');
+ }
+
+ public function test() {
+ throw new \Exception('stub');
+ }
+
+ public function getAvailability() {
+ throw new \Exception('stub');
+ }
+
+ public function setAvailability($isAvailable) {
+ throw new \Exception('stub');
+ }
+
+ public function getOwner($path) {
+ throw new \Exception('stub');
+ }
+
+ public function getCache() {
+ throw new \Exception('stub');
+ }
+
+ public function getPropagator() {
+ throw new \Exception('stub');
+ }
+
+ public function getScanner() {
+ throw new \Exception('stub');
+ }
+
+ public function getUpdater() {
+ throw new \Exception('stub');
+ }
+
+ public function getWatcher() {
+ throw new \Exception('stub');
+ }
+ }
+
+ class Jail extends Wrapper {
+ }
+}