Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 3 additions & 7 deletions tests/stubs/oc_files_cache_cache.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,11 +13,7 @@
use OCP\Files\Search\ISearchQuery;

class Cache implements ICache {
/**
* @param \OCP\Files\Cache\ICache $cache
*/
public function __construct($cache) {
$this->cache = $cache;
public function __construct(\OCP\Files\Storage\IStorage $storage, ?CacheDependencies $dependencies = null) {
}
public function getNumericStorageId() {
}
Expand Down Expand Up @@ -61,7 +57,7 @@ public function searchByMime($mimetype) {
}
public function searchQuery(ISearchQuery $query) {
}
public function correctFolderSize($path, $data = null, $isBackgroundScan = false) {
public function correctFolderSize(string $path, $data = null, bool $isBackgroundScan = false): void {
}
public function copyFromCache(ICache $sourceCache, ICacheEntry $sourceEntry, string $targetPath): int {
}
Expand All @@ -71,7 +67,7 @@ public function getQueryFilterForStorage(): ISearchOperator {
}
public function getCacheEntryFromSearchResult(ICacheEntry $rawEntry): ?ICacheEntry {
}
public static function cacheEntryFromData($data, IMimeTypeLoader $mimetypeLoader) {
public static function cacheEntryFromData(array $data, IMimeTypeLoader $mimetypeLoader): CacheEntry {
}
}
}
3 changes: 3 additions & 0 deletions tests/stubs/oc_files_cache_wrapper_cachewrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
use OCP\Files\Cache\ICacheEntry;

class CacheWrapper extends \OC\Files\Cache\Cache {
public function __construct(?\OCP\Files\Cache\ICache $cache, ?\OC\Files\Cache\CacheDependencies $dependencies = null) {
}

/**
* @param ICacheEntry $entry
* @return ICacheEntry|false
Expand Down
103 changes: 49 additions & 54 deletions tests/stubs/oc_files_storage_wrapper_wrapper.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,10 @@
use OCP\Lock\ILockingProvider;

class Wrapper implements IStorage {
/**
* @var \OCP\Files\Storage\IStorage $storage
*/
/** @var IStorage */
protected $storage;

/**
* @param array $parameters
*/
public function __construct($parameters) {
public function __construct(array $parameters) {
}

public function getWrapperStorage(): IStorage {
Expand All @@ -33,112 +28,112 @@ public function getWrapperStorage(): IStorage {
public function getId(): string {
}

public function mkdir($path): bool {
public function mkdir(string $path): bool {
}

public function rmdir($path): bool {
public function rmdir(string $path): bool {
}

public function opendir($path) {
public function opendir(string $path) {
}

public function is_dir($path): bool {
public function is_dir(string $path): bool {
}

public function is_file($path): bool {
public function is_file(string $path): bool {
}

public function stat($path): array|false {
public function stat(string $path): array|false {
}

public function filetype($path): string|false {
public function filetype(string $path): string|false {
}

public function filesize($path): int|float|false {
public function filesize(string $path): int|float|false {
}

public function isCreatable($path): bool {
public function isCreatable(string $path): bool {
}

public function isReadable($path): bool {
public function isReadable(string $path): bool {
}

public function isUpdatable($path): bool {
public function isUpdatable(string $path): bool {
}

public function isDeletable($path): bool {
public function isDeletable(string $path): bool {
}

public function isSharable($path): bool {
public function isSharable(string $path): bool {
}

public function getPermissions($path): int {
public function getPermissions(string $path): int {
}

public function file_exists($path): bool {
public function file_exists(string $path): bool {
}

public function filemtime($path): int|false {
public function filemtime(string $path): int|false {
}

public function file_get_contents($path): string|false {
public function file_get_contents(string $path): string|false {
}

public function file_put_contents($path, $data): int|float|false {
public function file_put_contents(string $path, mixed $data): int|float|false {
}

public function unlink($path): bool {
public function unlink(string $path): bool {
}

public function rename($source, $target): bool {
public function rename(string $source, string $target): bool {
}

public function copy($source, $target): bool {
public function copy(string $source, string $target): bool {
}

public function fopen($path, $mode) {
public function fopen(string $path, string $mode) {
}

public function getMimeType($path): string|false {
public function getMimeType(string $path): string|false {
}

public function hash($type, $path, $raw = false): string|false {
public function hash(string $type, string $path, bool $raw = false): string|false {
}

public function free_space($path): int|float|false {
public function free_space(string $path): int|float|false {
}

public function touch($path, $mtime = null): bool {
public function touch(string $path, ?int $mtime = null): bool {
}

public function getLocalFile($path): string|false {
public function getLocalFile(string $path): string|false {
}

public function hasUpdated($path, $time): bool {
public function hasUpdated(string $path, int $time): bool {
}

public function getCache($path = '', $storage = null): ICache {
public function getCache(string $path = '', ?IStorage $storage = null): ICache {
}

public function getScanner($path = '', $storage = null): IScanner {
public function getScanner(string $path = '', ?IStorage $storage = null): IScanner {
}

public function getOwner($path): string|false {
public function getOwner(string $path): string|false {
}

public function getWatcher($path = '', $storage = null): IWatcher {
public function getWatcher(string $path = '', ?IStorage $storage = null): IWatcher {
}

public function getPropagator($storage = null): IPropagator {
public function getPropagator(?IStorage $storage = null): IPropagator {
}

public function getUpdater($storage = null): IUpdater {
public function getUpdater(?IStorage $storage = null): IUpdater {
}

public function getStorageCache(): \OC\Files\Cache\Storage {
}

public function getETag($path): string|false {
public function getETag(string $path): string|false {
}

public function test(): bool {
Expand All @@ -147,7 +142,7 @@ public function test(): bool {
public function isLocal(): bool {
}

public function instanceOfStorage($class): bool {
public function instanceOfStorage(string $class): bool {
}

/**
Expand All @@ -165,37 +160,37 @@ public function getInstanceOfStorage(string $class): ?IStorage {
* @param array $args
* @return mixed
*/
public function __call($method, $args) {
public function __call(string $method, array $args) {
}

public function getDirectDownload($path): array|false {
public function getDirectDownload(string $path): array|false {
}

public function getAvailability(): array {
}

public function setAvailability($isAvailable): void {
public function setAvailability(bool $isAvailable): void {
}

public function verifyPath($path, $fileName): void {
public function verifyPath(string $path, string $fileName): void {
}

public function copyFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath): bool {
public function copyFromStorage(IStorage $sourceStorage, string $sourceInternalPath, string $targetInternalPath): bool {
}

public function moveFromStorage(IStorage $sourceStorage, $sourceInternalPath, $targetInternalPath): bool {
public function moveFromStorage(IStorage $sourceStorage, string $sourceInternalPath, string $targetInternalPath): bool {
}

public function getMetaData($path): ?array {
public function getMetaData(string $path): ?array {
}

public function acquireLock($path, $type, ILockingProvider $provider): void {
public function acquireLock(string $path, int $type, ILockingProvider $provider): void {
}

public function releaseLock($path, $type, ILockingProvider $provider): void {
public function releaseLock(string $path, int $type, ILockingProvider $provider): void {
}

public function changeLock($path, $type, ILockingProvider $provider): void {
public function changeLock(string $path, int $type, ILockingProvider $provider): void {
}

public function needsPartFile(): bool {
Expand All @@ -204,7 +199,7 @@ public function needsPartFile(): bool {
public function writeStream(string $path, $stream, ?int $size = null): int {
}

public function getDirectoryContent($directory): \Traversable {
public function getDirectoryContent(string $directory): \Traversable {
}

public function isWrapperOf(IStorage $storage): bool {
Expand Down
10 changes: 4 additions & 6 deletions tests/stubs/oc_hooks_emitter.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@
*/

namespace OC\Hooks {
class Emitter {
public function emit(string $class, string $value, array $option) {
}
/** Closure $closure */
public function listen(string $class, string $value, $closure) {
}
interface Emitter {
public function listen($scope, $method, callable $callback);

public function removeListener($scope = null, $method = null, ?callable $callback = null);
}
}
2 changes: 0 additions & 2 deletions tests/stubs/oca_groupfolders.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@

namespace OCA\GroupFolders\Trash {
class TrashBackend {
public function setupTrashFolder(string $class, string $value, $closure) {
}
}
}

Expand Down
Loading