chore: Improve typing and phpdoc comments

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
Côme Chilliet 2024-09-16 20:29:48 +02:00
parent e7ac9bb2d8
commit 03b969fb95
No known key found for this signature in database
GPG key ID: A3E2F658B28C760A
3 changed files with 7 additions and 11 deletions

View file

@ -72,10 +72,7 @@ class FileTest extends TestCase {
parent::tearDown();
}
/**
* @return MockObject|IStorage
*/
private function getMockStorage() {
private function getMockStorage(): MockObject&IStorage {
$storage = $this->getMockBuilder(IStorage::class)
->disableOriginalConstructor()
->getMock();
@ -84,10 +81,7 @@ class FileTest extends TestCase {
return $storage;
}
/**
* @param string $string
*/
private function getStream($string) {
private function getStream(string $string) {
$stream = fopen('php://temp', 'r+');
fwrite($stream, $string);
fseek($stream, 0);

View file

@ -140,6 +140,7 @@ class Trashbin {
}
}
/** @param string $user */
private static function setUpTrash($user): void {
$view = new View('/' . $user);
if (!$view->is_dir('files_trashbin')) {
@ -163,10 +164,10 @@ class Trashbin {
* @param string $sourcePath
* @param string $owner
* @param string $targetPath
* @param $user
* @param string $user
* @param int $timestamp
*/
private static function copyFilesToUser($sourcePath, $owner, $targetPath, $user, $timestamp) {
private static function copyFilesToUser($sourcePath, $owner, $targetPath, $user, $timestamp): void {
self::setUpTrash($owner);
$targetFilename = basename($targetPath);

View file

@ -407,7 +407,8 @@ interface IStorage {
/**
* @since 12.0.0
* @return mixed
* @since 31.0.0 moved from Storage to IStorage
* @return bool
*/
public function needsPartFile();