mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
chore: Improve typing and phpdoc comments
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
e7ac9bb2d8
commit
03b969fb95
3 changed files with 7 additions and 11 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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();
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue