@@ -37,7 +37,7 @@ |
||
37 | 37 | } |
38 | 38 | |
39 | 39 | protected function getOCSUrl($url) { |
40 | - return 'https://example.com/ocs/v2.php/' . $url; |
|
40 | + return 'https://example.com/ocs/v2.php/'.$url; |
|
41 | 41 | } |
42 | 42 | |
43 | 43 | public function testGetUser(): void { |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | protected function setUp(): void { |
19 | 19 | parent::setUp(); |
20 | 20 | |
21 | - $this->baseDir = $this->getManager()->getTempBaseDir() . $this->getUniqueID('/oc_tmp_test'); |
|
21 | + $this->baseDir = $this->getManager()->getTempBaseDir().$this->getUniqueID('/oc_tmp_test'); |
|
22 | 22 | if (!is_dir($this->baseDir)) { |
23 | 23 | mkdir($this->baseDir); |
24 | 24 | } |
@@ -73,8 +73,8 @@ discard block |
||
73 | 73 | $this->assertTrue(is_dir($folder)); |
74 | 74 | $this->assertTrue(is_writable($folder)); |
75 | 75 | |
76 | - file_put_contents($folder . 'foo.txt', 'bar'); |
|
77 | - $this->assertEquals('bar', file_get_contents($folder . 'foo.txt')); |
|
76 | + file_put_contents($folder.'foo.txt', 'bar'); |
|
77 | + $this->assertEquals('bar', file_get_contents($folder.'foo.txt')); |
|
78 | 78 | } |
79 | 79 | |
80 | 80 | public function testCleanFiles(): void { |
@@ -94,19 +94,19 @@ discard block |
||
94 | 94 | $manager = $this->getManager(); |
95 | 95 | $folder1 = $manager->getTemporaryFolder(); |
96 | 96 | $folder2 = $manager->getTemporaryFolder(); |
97 | - touch($folder1 . 'foo.txt'); |
|
98 | - touch($folder1 . 'bar.txt'); |
|
97 | + touch($folder1.'foo.txt'); |
|
98 | + touch($folder1.'bar.txt'); |
|
99 | 99 | $this->assertTrue(file_exists($folder1)); |
100 | 100 | $this->assertTrue(file_exists($folder2)); |
101 | - $this->assertTrue(file_exists($folder1 . 'foo.txt')); |
|
102 | - $this->assertTrue(file_exists($folder1 . 'bar.txt')); |
|
101 | + $this->assertTrue(file_exists($folder1.'foo.txt')); |
|
102 | + $this->assertTrue(file_exists($folder1.'bar.txt')); |
|
103 | 103 | |
104 | 104 | $manager->clean(); |
105 | 105 | |
106 | 106 | $this->assertFalse(file_exists($folder1)); |
107 | 107 | $this->assertFalse(file_exists($folder2)); |
108 | - $this->assertFalse(file_exists($folder1 . 'foo.txt')); |
|
109 | - $this->assertFalse(file_exists($folder1 . 'bar.txt')); |
|
108 | + $this->assertFalse(file_exists($folder1.'foo.txt')); |
|
109 | + $this->assertFalse(file_exists($folder1.'bar.txt')); |
|
110 | 110 | } |
111 | 111 | |
112 | 112 | public function testCleanOld(): void { |
@@ -114,7 +114,7 @@ discard block |
||
114 | 114 | $oldFile = $manager->getTemporaryFile('txt'); |
115 | 115 | $newFile = $manager->getTemporaryFile('txt'); |
116 | 116 | $folder = $manager->getTemporaryFolder(); |
117 | - $nonOcFile = $this->baseDir . '/foo.txt'; |
|
117 | + $nonOcFile = $this->baseDir.'/foo.txt'; |
|
118 | 118 | file_put_contents($nonOcFile, 'bar'); |
119 | 119 | |
120 | 120 | $past = time() - 2 * 3600; |
@@ -34,7 +34,7 @@ discard block |
||
34 | 34 | */ |
35 | 35 | public function setupTestPdf() { |
36 | 36 | $fileContents = file_get_contents( |
37 | - __DIR__ . '/../../../data/test.pdf' |
|
37 | + __DIR__.'/../../../data/test.pdf' |
|
38 | 38 | ); |
39 | 39 | $this->testPdf = new InMemoryFile('test.pdf', $fileContents); |
40 | 40 | } |
@@ -85,7 +85,7 @@ discard block |
||
85 | 85 | */ |
86 | 86 | public function testGetContent(): void { |
87 | 87 | self::assertEquals( |
88 | - file_get_contents(__DIR__ . '/../../../data/test.pdf'), |
|
88 | + file_get_contents(__DIR__.'/../../../data/test.pdf'), |
|
89 | 89 | $this->testPdf->getContent() |
90 | 90 | ); |
91 | 91 | } |
@@ -26,7 +26,7 @@ |
||
26 | 26 | |
27 | 27 | public function testWrapper(): void { |
28 | 28 | $test = $this; |
29 | - $wrapper = function ($mountPoint, $storage) use (&$test) { |
|
29 | + $wrapper = function($mountPoint, $storage) use (&$test) { |
|
30 | 30 | $test->assertEquals('/foo/', $mountPoint); |
31 | 31 | $test->assertInstanceOf('\OC\Files\Storage\Storage', $storage); |
32 | 32 | return new Wrapper(['storage' => $storage]); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | |
13 | 13 | class LongId extends Temporary { |
14 | 14 | public function getId(): string { |
15 | - return 'long:' . str_repeat('foo', 50) . parent::getId(); |
|
15 | + return 'long:'.str_repeat('foo', 50).parent::getId(); |
|
16 | 16 | } |
17 | 17 | } |
18 | 18 |
@@ -68,7 +68,7 @@ |
||
68 | 68 | ]; |
69 | 69 | $this->config->expects($this->any()) |
70 | 70 | ->method('getSystemValue') |
71 | - ->willReturnCallback(function ($config) use ($objectstoreConfig) { |
|
71 | + ->willReturnCallback(function($config) use ($objectstoreConfig) { |
|
72 | 72 | if ($config === 'objectstore_multibucket') { |
73 | 73 | return $objectstoreConfig; |
74 | 74 | } elseif ($config === 'objectstore.multibucket.preview-distribution') { |
@@ -32,7 +32,7 @@ |
||
32 | 32 | private function getConfig(array $systemConfig): IConfig { |
33 | 33 | $config = $this->createMock(IConfig::class); |
34 | 34 | $config->method('getSystemValue') |
35 | - ->willReturnCallback(function (string $key, $default) use ($systemConfig) { |
|
35 | + ->willReturnCallback(function(string $key, $default) use ($systemConfig) { |
|
36 | 36 | return $systemConfig[$key] ?? $default; |
37 | 37 | }); |
38 | 38 | return $config; |
@@ -27,7 +27,7 @@ |
||
27 | 27 | return true; |
28 | 28 | } |
29 | 29 | |
30 | - public function url_stat(string $path, int $flags): array|false { |
|
30 | + public function url_stat(string $path, int $flags): array | false { |
|
31 | 31 | self::$statCounter++; |
32 | 32 | return false; |
33 | 33 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | } |
45 | 45 | |
46 | 46 | public function testStat(): void { |
47 | - $textFile = \OC::$SERVERROOT . '/tests/data/lorem.txt'; |
|
47 | + $textFile = \OC::$SERVERROOT.'/tests/data/lorem.txt'; |
|
48 | 48 | $ctimeStart = time(); |
49 | 49 | $this->instance->file_put_contents('/lorem.txt', file_get_contents($textFile)); |
50 | 50 | $this->assertTrue($this->instance->isReadable('/lorem.txt')); |
@@ -81,8 +81,8 @@ discard block |
||
81 | 81 | |
82 | 82 | $this->instance->rename($source, $target); |
83 | 83 | |
84 | - $this->assertTrue($this->instance->file_exists($target), $target . ' was not created'); |
|
85 | - $this->assertFalse($this->instance->file_exists($source), $source . ' still exists'); |
|
84 | + $this->assertTrue($this->instance->file_exists($target), $target.' was not created'); |
|
85 | + $this->assertFalse($this->instance->file_exists($source), $source.' still exists'); |
|
86 | 86 | $this->assertSameAsLorem($target); |
87 | 87 | |
88 | 88 | $targetId = $this->instance->getCache()->getId(ltrim($target, '/')); |