File tree Expand file tree Collapse file tree
lib/private/Lockdown/Filesystem
tests/lib/Lockdown/Filesystem Expand file tree Collapse file tree Original file line number Diff line number Diff line change 41124112 </InvalidOperand >
41134113 </file >
41144114 <file src =" lib/private/Lockdown/Filesystem/NullCache.php" >
4115- <InvalidNullableReturnType >
4116- <code ><![CDATA[ get]]> </code >
4117- </InvalidNullableReturnType >
41184115 <InvalidReturnStatement >
41194116 <code ><![CDATA[ []]]> </code >
41204117 </InvalidReturnStatement >
41214118 <InvalidReturnType >
41224119 <code ><![CDATA[ getIncomplete]]> </code >
41234120 </InvalidReturnType >
4124- <NullableReturnStatement >
4125- <code ><![CDATA[ $file !== '' ? null :
4126- new CacheEntry([
4127- 'fileid' => -1,
4128- 'parent' => -1,
4129- 'name' => '',
4130- 'path' => '',
4131- 'size' => '0',
4132- 'mtime' => time(),
4133- 'storage_mtime' => time(),
4134- 'etag' => '',
4135- 'mimetype' => FileInfo::MIMETYPE_FOLDER,
4136- 'mimepart' => 'httpd',
4137- 'permissions' => Constants::PERMISSION_READ
4138- ])]]> </code >
4139- </NullableReturnStatement >
41404121 </file >
41414122 <file src =" lib/private/Lockdown/Filesystem/NullStorage.php" >
41424123 <TooManyArguments >
Original file line number Diff line number Diff line change @@ -21,20 +21,23 @@ public function getNumericStorageId() {
2121 }
2222
2323 public function get ($ file ) {
24- return $ file !== '' ? null :
25- new CacheEntry ([
26- 'fileid ' => -1 ,
27- 'parent ' => -1 ,
28- 'name ' => '' ,
29- 'path ' => '' ,
30- 'size ' => '0 ' ,
31- 'mtime ' => time (),
32- 'storage_mtime ' => time (),
33- 'etag ' => '' ,
34- 'mimetype ' => FileInfo::MIMETYPE_FOLDER ,
35- 'mimepart ' => 'httpd ' ,
36- 'permissions ' => Constants::PERMISSION_READ
37- ]);
24+ if ($ file !== '' ) {
25+ return false ;
26+ }
27+
28+ return new CacheEntry ([
29+ 'fileid ' => -1 ,
30+ 'parent ' => -1 ,
31+ 'name ' => '' ,
32+ 'path ' => '' ,
33+ 'size ' => '0 ' ,
34+ 'mtime ' => time (),
35+ 'storage_mtime ' => time (),
36+ 'etag ' => '' ,
37+ 'mimetype ' => FileInfo::MIMETYPE_FOLDER ,
38+ 'mimepart ' => 'httpd ' ,
39+ 'permissions ' => Constants::PERMISSION_READ
40+ ]);
3841 }
3942
4043 public function getFolderContents ($ folder ) {
Original file line number Diff line number Diff line change @@ -27,7 +27,7 @@ public function testGetNumericStorageId(): void {
2727 }
2828
2929 public function testGetEmpty (): void {
30- $ this ->assertNull ($ this ->cache ->get ('foo ' ));
30+ $ this ->assertFalse ($ this ->cache ->get ('foo ' ));
3131 }
3232
3333 public function testGet (): void {
You can’t perform that action at this time.
0 commit comments