diff options
author | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 09:30:18 +0100 |
---|---|---|
committer | Christoph Wurst <christoph@winzerhof-wurst.at> | 2020-03-26 16:34:56 +0100 |
commit | b80ebc96748b45fd2e0ba9323308657c4b00b7ec (patch) | |
tree | ec20e0ffa2f86b9b54939a83a785407319f94559 /tests/lib/Files/FilesystemTest.php | |
parent | 62403d0932be7d620c7bdadc6b4e13eb496fcd6f (diff) | |
download | nextcloud-server-b80ebc96748b45fd2e0ba9323308657c4b00b7ec.tar.gz nextcloud-server-b80ebc96748b45fd2e0ba9323308657c4b00b7ec.zip |
Use the short array syntax, everywhere
Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
Diffstat (limited to 'tests/lib/Files/FilesystemTest.php')
-rw-r--r-- | tests/lib/Files/FilesystemTest.php | 76 |
1 files changed, 38 insertions, 38 deletions
diff --git a/tests/lib/Files/FilesystemTest.php b/tests/lib/Files/FilesystemTest.php index 6d0362772ca..d98256501b1 100644 --- a/tests/lib/Files/FilesystemTest.php +++ b/tests/lib/Files/FilesystemTest.php @@ -66,7 +66,7 @@ class FilesystemTest extends \Test\TestCase { /** * @var array tmpDirs */ - private $tmpDirs = array(); + private $tmpDirs = []; /** * @return array @@ -74,7 +74,7 @@ class FilesystemTest extends \Test\TestCase { private function getStorageData() { $dir = \OC::$server->getTempManager()->getTemporaryFolder(); $this->tmpDirs[] = $dir; - return array('datadir' => $dir); + return ['datadir' => $dir]; } protected function setUp(): void { @@ -225,29 +225,29 @@ class FilesystemTest extends \Test\TestCase { } public function isValidPathData() { - return array( - array('/', true), - array('/path', true), - array('/foo/bar', true), - array('/foo//bar/', true), - array('/foo////bar', true), - array('/foo//\///bar', true), - array('/foo/bar/.', true), - array('/foo/bar/./', true), - array('/foo/bar/./.', true), - array('/foo/bar/././', true), - array('/foo/bar/././..bar', true), - array('/foo/bar/././..bar/a', true), - array('/foo/bar/././..', false), - array('/foo/bar/././../', false), - array('/foo/bar/.././', false), - array('/foo/bar/../../', false), - array('/foo/bar/../..\\', false), - array('..', false), - array('../', false), - array('../foo/bar', false), - array('..\foo/bar', false), - ); + return [ + ['/', true], + ['/path', true], + ['/foo/bar', true], + ['/foo//bar/', true], + ['/foo////bar', true], + ['/foo//\///bar', true], + ['/foo/bar/.', true], + ['/foo/bar/./', true], + ['/foo/bar/./.', true], + ['/foo/bar/././', true], + ['/foo/bar/././..bar', true], + ['/foo/bar/././..bar/a', true], + ['/foo/bar/././..', false], + ['/foo/bar/././../', false], + ['/foo/bar/.././', false], + ['/foo/bar/../../', false], + ['/foo/bar/../..\\', false], + ['..', false], + ['../', false], + ['../foo/bar', false], + ['..\foo/bar', false], + ]; } /** @@ -258,18 +258,18 @@ class FilesystemTest extends \Test\TestCase { } public function isFileBlacklistedData() { - return array( - array('/etc/foo/bar/foo.txt', false), - array('\etc\foo/bar\foo.txt', false), - array('.htaccess', true), - array('.htaccess/', true), - array('.htaccess\\', true), - array('/etc/foo\bar/.htaccess\\', true), - array('/etc/foo\bar/.htaccess/', true), - array('/etc/foo\bar/.htaccess/foo', false), - array('//foo//bar/\.htaccess/', true), - array('\foo\bar\.HTAccess', true), - ); + return [ + ['/etc/foo/bar/foo.txt', false], + ['\etc\foo/bar\foo.txt', false], + ['.htaccess', true], + ['.htaccess/', true], + ['.htaccess\\', true], + ['/etc/foo\bar/.htaccess\\', true], + ['/etc/foo\bar/.htaccess/', true], + ['/etc/foo\bar/.htaccess/foo', false], + ['//foo//bar/\.htaccess/', true], + ['\foo\bar\.HTAccess', true], + ]; } /** @@ -304,7 +304,7 @@ class FilesystemTest extends \Test\TestCase { \OC_Hook::clear('OC_Filesystem'); \OC_Hook::connect('OC_Filesystem', 'post_write', $this, 'dummyHook'); - \OC\Files\Filesystem::mount('OC\Files\Storage\Temporary', array(), '/'); + \OC\Files\Filesystem::mount('OC\Files\Storage\Temporary', [], '/'); $rootView = new \OC\Files\View(''); $rootView->mkdir('/' . $user); |