2222namespace OCA \Guests \Storage ;
2323
2424use OC \Files \Storage \Wrapper \PermissionsMask ;
25+ use OCP \Files \Cache \ICache ;
2526
2627/**
2728 * While PermissionMask can mask a whole storage this can
@@ -100,9 +101,6 @@ public function getPermissions($path): int {
100101 }
101102 }
102103
103- /**
104- * @psalm-suppress ParamNameMismatch
105- */
106104 public function rename ($ source , $ target ): bool {
107105 if (!$ this ->isUpdatable ($ source )) {
108106 return false ;
@@ -123,9 +121,6 @@ public function rename($source, $target): bool {
123121 return false ;
124122 }
125123
126- /**
127- * @psalm-suppress ParamNameMismatch
128- */
129124 public function copy ($ source , $ target ): bool {
130125 if (!$ this ->isReadable ($ source )) {
131126 return false ;
@@ -162,10 +157,7 @@ public function mkdir($path): bool {
162157 }
163158 }
164159
165- /**
166- * @psalm-suppress MethodSignatureMustProvideReturnType
167- */
168- public function rmdir ($ path ) {
160+ public function rmdir ($ path ): bool {
169161 if ($ this ->checkPath ($ path )) {
170162 return parent ::rmdir ($ path );
171163 } else {
@@ -181,20 +173,14 @@ public function unlink($path): bool {
181173 }
182174 }
183175
184- /**
185- * @psalm-suppress MethodSignatureMustProvideReturnType
186- */
187- public function file_put_contents ($ path , $ data ) {
176+ public function file_put_contents ($ path , $ data ): int |float |false {
188177 if ($ this ->checkPath ($ path )) {
189178 return parent ::file_put_contents ($ path , $ data );
190179 } else {
191180 return $ this ->storage ->file_put_contents ($ path , $ data );
192181 }
193182 }
194183
195- /**
196- * @psalm-suppress MethodSignatureMustProvideReturnType
197- */
198184 public function fopen ($ path , $ mode ) {
199185 if ($ this ->checkPath ($ path )) {
200186 return parent ::fopen ($ path , $ mode );
@@ -203,10 +189,7 @@ public function fopen($path, $mode) {
203189 }
204190 }
205191
206- /**
207- * @psalm-suppress MethodSignatureMustProvideReturnType
208- */
209- public function getCache ($ path = '' , $ storage = null ) {
192+ public function getCache ($ path = '' , $ storage = null ): ICache {
210193 if (!$ storage ) {
211194 $ storage = $ this ;
212195 }
0 commit comments