@@ -61,7 +61,7 @@ |
||
| 61 | 61 | ]; |
| 62 | 62 | $this->writeableCalendar->expects($this->exactly(3)) |
| 63 | 63 | ->method('createFromString') |
| 64 | - ->willReturnCallback(function () use (&$calls): void { |
|
| 64 | + ->willReturnCallback(function() use (&$calls): void { |
|
| 65 | 65 | $expected = array_shift($calls); |
| 66 | 66 | $this->assertEquals($expected, func_get_args()); |
| 67 | 67 | }); |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | ]; |
| 75 | 75 | $this->server->expects($this->exactly(count($calls))) |
| 76 | 76 | ->method('on') |
| 77 | - ->willReturnCallback(function () use (&$calls): void { |
|
| 77 | + ->willReturnCallback(function() use (&$calls): void { |
|
| 78 | 78 | $expected = array_shift($calls); |
| 79 | 79 | $this->assertEquals($expected, func_get_args()); |
| 80 | 80 | }); |
@@ -366,12 +366,12 @@ discard block |
||
| 366 | 366 | $this->server->tree = $tree; |
| 367 | 367 | |
| 368 | 368 | $properties = $propertiesForPath ? [ |
| 369 | - ['href' => '/remote.php/dav/' . $calendarHome . '/' . $calendarUri] |
|
| 369 | + ['href' => '/remote.php/dav/'.$calendarHome.'/'.$calendarUri] |
|
| 370 | 370 | ] : []; |
| 371 | 371 | |
| 372 | 372 | $this->server->expects($this->once()) |
| 373 | 373 | ->method('getPropertiesForPath') |
| 374 | - ->with($calendarHome . '/' . $calendarUri, [], 1) |
|
| 374 | + ->with($calendarHome.'/'.$calendarUri, [], 1) |
|
| 375 | 375 | ->willReturn($properties); |
| 376 | 376 | |
| 377 | 377 | $this->plugin->propFindDefaultCalendarUrl($propFind, $node); |
@@ -383,7 +383,7 @@ discard block |
||
| 383 | 383 | |
| 384 | 384 | /** @var LocalHref $result */ |
| 385 | 385 | $result = $propFind->get(Plugin::SCHEDULE_DEFAULT_CALENDAR_URL); |
| 386 | - $this->assertEquals('/remote.php/dav/' . $calendarHome . '/' . $calendarUri, $result->getHref()); |
|
| 386 | + $this->assertEquals('/remote.php/dav/'.$calendarHome.'/'.$calendarUri, $result->getHref()); |
|
| 387 | 387 | } |
| 388 | 388 | |
| 389 | 389 | /** |
@@ -431,12 +431,12 @@ discard block |
||
| 431 | 431 | 'principals/users/user1', |
| 432 | 432 | ['{urn:ietf:params:xml:ns:caldav}calendar-user-address-set'], |
| 433 | 433 | ['{urn:ietf:params:xml:ns:caldav}calendar-user-address-set' => new LocalHref( |
| 434 | - ['mailto:[email protected]','/remote.php/dav/principals/users/user1/'] |
|
| 434 | + ['mailto:[email protected]', '/remote.php/dav/principals/users/user1/'] |
|
| 435 | 435 | )] |
| 436 | 436 | ] |
| 437 | 437 | ]); |
| 438 | 438 | $this->server->expects($this->exactly(2))->method('emit')->willReturnCallback( |
| 439 | - function (string $eventName, array $arguments = [], ?callable $continueCallBack = null) use (&$iTipMessages) { |
|
| 439 | + function(string $eventName, array $arguments = [], ?callable $continueCallBack = null) use (&$iTipMessages) { |
|
| 440 | 440 | $this->assertEquals('schedule', $eventName); |
| 441 | 441 | $this->assertCount(1, $arguments); |
| 442 | 442 | $iTipMessages[] = $arguments[0]; |
@@ -536,12 +536,12 @@ discard block |
||
| 536 | 536 | 'principals/users/user1', |
| 537 | 537 | ['{urn:ietf:params:xml:ns:caldav}calendar-user-address-set'], |
| 538 | 538 | ['{urn:ietf:params:xml:ns:caldav}calendar-user-address-set' => new LocalHref( |
| 539 | - ['mailto:[email protected]','/remote.php/dav/principals/users/user1/'] |
|
| 539 | + ['mailto:[email protected]', '/remote.php/dav/principals/users/user1/'] |
|
| 540 | 540 | )] |
| 541 | 541 | ] |
| 542 | 542 | ]); |
| 543 | 543 | $this->server->expects($this->exactly(3))->method('emit')->willReturnCallback( |
| 544 | - function (string $eventName, array $arguments = [], ?callable $continueCallBack = null) use (&$iTipMessages) { |
|
| 544 | + function(string $eventName, array $arguments = [], ?callable $continueCallBack = null) use (&$iTipMessages) { |
|
| 545 | 545 | $this->assertEquals('schedule', $eventName); |
| 546 | 546 | $this->assertCount(1, $arguments); |
| 547 | 547 | $iTipMessages[] = $arguments[0]; |
@@ -652,19 +652,19 @@ discard block |
||
| 652 | 652 | 'principals/users/user1', |
| 653 | 653 | ['{urn:ietf:params:xml:ns:caldav}calendar-user-address-set'], |
| 654 | 654 | ['{urn:ietf:params:xml:ns:caldav}calendar-user-address-set' => new LocalHref( |
| 655 | - ['mailto:[email protected]','/remote.php/dav/principals/users/user1/'] |
|
| 655 | + ['mailto:[email protected]', '/remote.php/dav/principals/users/user1/'] |
|
| 656 | 656 | )] |
| 657 | 657 | ], |
| 658 | 658 | [ |
| 659 | 659 | 'principals/users/user2', |
| 660 | 660 | ['{urn:ietf:params:xml:ns:caldav}calendar-user-address-set'], |
| 661 | 661 | ['{urn:ietf:params:xml:ns:caldav}calendar-user-address-set' => new LocalHref( |
| 662 | - ['mailto:[email protected]','/remote.php/dav/principals/users/user2/'] |
|
| 662 | + ['mailto:[email protected]', '/remote.php/dav/principals/users/user2/'] |
|
| 663 | 663 | )] |
| 664 | 664 | ] |
| 665 | 665 | ]); |
| 666 | 666 | $this->server->expects($this->exactly(3))->method('emit')->willReturnCallback( |
| 667 | - function (string $eventName, array $arguments = [], ?callable $continueCallBack = null) use (&$iTipMessages) { |
|
| 667 | + function(string $eventName, array $arguments = [], ?callable $continueCallBack = null) use (&$iTipMessages) { |
|
| 668 | 668 | $this->assertEquals('schedule', $eventName); |
| 669 | 669 | $this->assertCount(1, $arguments); |
| 670 | 670 | $iTipMessages[] = $arguments[0]; |
@@ -290,7 +290,7 @@ discard block |
||
| 290 | 290 | ]; |
| 291 | 291 | $this->backend->expects($this->exactly(count($calls))) |
| 292 | 292 | ->method('insertReminder') |
| 293 | - ->willReturnCallback(function () use (&$calls) { |
|
| 293 | + ->willReturnCallback(function() use (&$calls) { |
|
| 294 | 294 | $expected = array_shift($calls); |
| 295 | 295 | $this->assertEquals($expected, func_get_args()); |
| 296 | 296 | return 1; |
@@ -358,7 +358,7 @@ discard block |
||
| 358 | 358 | ]; |
| 359 | 359 | $this->backend->expects($this->exactly(count($calls))) |
| 360 | 360 | ->method('insertReminder') |
| 361 | - ->willReturnCallback(function () use (&$calls) { |
|
| 361 | + ->willReturnCallback(function() use (&$calls) { |
|
| 362 | 362 | $expected = array_shift($calls); |
| 363 | 363 | $this->assertEquals($expected, func_get_args()); |
| 364 | 364 | return 1; |
@@ -386,7 +386,7 @@ discard block |
||
| 386 | 386 | ]; |
| 387 | 387 | $this->backend->expects($this->exactly(count($calls))) |
| 388 | 388 | ->method('insertReminder') |
| 389 | - ->willReturnCallback(function () use (&$calls) { |
|
| 389 | + ->willReturnCallback(function() use (&$calls) { |
|
| 390 | 390 | $expected = array_shift($calls); |
| 391 | 391 | $this->assertEquals($expected, func_get_args()); |
| 392 | 392 | return 1; |
@@ -518,7 +518,7 @@ discard block |
||
| 518 | 518 | ]; |
| 519 | 519 | $this->backend->expects($this->exactly(count($calls))) |
| 520 | 520 | ->method('insertReminder') |
| 521 | - ->willReturnCallback(function () use (&$calls) { |
|
| 521 | + ->willReturnCallback(function() use (&$calls) { |
|
| 522 | 522 | $expected = array_shift($calls); |
| 523 | 523 | $this->assertEquals($expected, func_get_args()); |
| 524 | 524 | return 1; |
@@ -684,7 +684,7 @@ discard block |
||
| 684 | 684 | ]; |
| 685 | 685 | $this->notificationProviderManager->expects($this->exactly(count($getProviderCalls))) |
| 686 | 686 | ->method('getProvider') |
| 687 | - ->willReturnCallback(function () use (&$getProviderCalls) { |
|
| 687 | + ->willReturnCallback(function() use (&$getProviderCalls) { |
|
| 688 | 688 | $expected = array_shift($getProviderCalls); |
| 689 | 689 | $return = array_pop($expected); |
| 690 | 690 | $this->assertEquals($expected, func_get_args()); |
@@ -699,7 +699,7 @@ discard block |
||
| 699 | 699 | |
| 700 | 700 | $provider1->expects($this->once()) |
| 701 | 701 | ->method('send') |
| 702 | - ->with($this->callback(function ($vevent) { |
|
| 702 | + ->with($this->callback(function($vevent) { |
|
| 703 | 703 | if ($vevent->DTSTART->getDateTime()->format(DateTime::ATOM) !== '2016-06-09T00:00:00+00:00') { |
| 704 | 704 | return false; |
| 705 | 705 | } |
@@ -707,7 +707,7 @@ discard block |
||
| 707 | 707 | }, 'Displayname 123', $user)); |
| 708 | 708 | $provider2->expects($this->once()) |
| 709 | 709 | ->method('send') |
| 710 | - ->with($this->callback(function ($vevent) { |
|
| 710 | + ->with($this->callback(function($vevent) { |
|
| 711 | 711 | if ($vevent->DTSTART->getDateTime()->format(DateTime::ATOM) !== '2016-06-09T00:00:00+00:00') { |
| 712 | 712 | return false; |
| 713 | 713 | } |
@@ -715,7 +715,7 @@ discard block |
||
| 715 | 715 | }, 'Displayname 123', $user)); |
| 716 | 716 | $provider3->expects($this->once()) |
| 717 | 717 | ->method('send') |
| 718 | - ->with($this->callback(function ($vevent) { |
|
| 718 | + ->with($this->callback(function($vevent) { |
|
| 719 | 719 | if ($vevent->DTSTART->getDateTime()->format(DateTime::ATOM) !== '2016-06-09T00:00:00+00:00') { |
| 720 | 720 | return false; |
| 721 | 721 | } |
@@ -723,7 +723,7 @@ discard block |
||
| 723 | 723 | }, 'Displayname 123', $user)); |
| 724 | 724 | $provider4->expects($this->once()) |
| 725 | 725 | ->method('send') |
| 726 | - ->with($this->callback(function ($vevent) { |
|
| 726 | + ->with($this->callback(function($vevent) { |
|
| 727 | 727 | if ($vevent->DTSTART->getDateTime()->format(DateTime::ATOM) !== '2016-06-30T00:00:00+00:00') { |
| 728 | 728 | return false; |
| 729 | 729 | } |
@@ -731,7 +731,7 @@ discard block |
||
| 731 | 731 | }, 'Displayname 123', $user)); |
| 732 | 732 | $provider5->expects($this->once()) |
| 733 | 733 | ->method('send') |
| 734 | - ->with($this->callback(function ($vevent) { |
|
| 734 | + ->with($this->callback(function($vevent) { |
|
| 735 | 735 | if ($vevent->DTSTART->getDateTime()->format(DateTime::ATOM) !== '2016-07-07T00:00:00+00:00') { |
| 736 | 736 | return false; |
| 737 | 737 | } |
@@ -747,7 +747,7 @@ discard block |
||
| 747 | 747 | ]; |
| 748 | 748 | $this->backend->expects($this->exactly(5)) |
| 749 | 749 | ->method('removeReminder') |
| 750 | - ->willReturnCallback(function () use (&$removeReminderCalls): void { |
|
| 750 | + ->willReturnCallback(function() use (&$removeReminderCalls): void { |
|
| 751 | 751 | $expected = array_shift($removeReminderCalls); |
| 752 | 752 | $this->assertEquals($expected, func_get_args()); |
| 753 | 753 | }); |
@@ -763,7 +763,7 @@ discard block |
||
| 763 | 763 | ]; |
| 764 | 764 | $this->backend->expects($this->exactly(count($insertReminderCalls))) |
| 765 | 765 | ->method('insertReminder') |
| 766 | - ->willReturnCallback(function () use (&$insertReminderCalls) { |
|
| 766 | + ->willReturnCallback(function() use (&$insertReminderCalls) { |
|
| 767 | 767 | $expected = array_shift($insertReminderCalls); |
| 768 | 768 | $this->assertEquals($expected, func_get_args()); |
| 769 | 769 | return 99; |
@@ -107,7 +107,7 @@ |
||
| 107 | 107 | ]; |
| 108 | 108 | $this->manager->expects($this->exactly(3)) |
| 109 | 109 | ->method('notify') |
| 110 | - ->willReturnCallback(function ($notification) use (&$calls): void { |
|
| 110 | + ->willReturnCallback(function($notification) use (&$calls): void { |
|
| 111 | 111 | $expected = array_shift($calls); |
| 112 | 112 | $this->assertEquals($expected, $notification); |
| 113 | 113 | }); |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | private OutputInterface $output; |
| 35 | 35 | |
| 36 | - private const ASSETS_DIR = __DIR__ . '/assets/address_books/'; |
|
| 36 | + private const ASSETS_DIR = __DIR__.'/assets/address_books/'; |
|
| 37 | 37 | |
| 38 | 38 | protected function setUp(): void { |
| 39 | 39 | $app = new App(Application::APP_ID); |
@@ -46,9 +46,9 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | public static function dataAssets(): array { |
| 48 | 48 | return array_map( |
| 49 | - function (string $filename) { |
|
| 49 | + function(string $filename) { |
|
| 50 | 50 | $vCardSplitter = new VCardSplitter( |
| 51 | - fopen(self::ASSETS_DIR . $filename, 'r'), |
|
| 51 | + fopen(self::ASSETS_DIR.$filename, 'r'), |
|
| 52 | 52 | VObjectParser::OPTION_FORGIVING, |
| 53 | 53 | ); |
| 54 | 54 | |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | private OutputInterface $output; |
| 35 | 35 | |
| 36 | - private const ASSETS_DIR = __DIR__ . '/assets/calendars/'; |
|
| 36 | + private const ASSETS_DIR = __DIR__.'/assets/calendars/'; |
|
| 37 | 37 | |
| 38 | 38 | protected function setUp(): void { |
| 39 | 39 | $app = new App(Application::APP_ID); |
@@ -46,10 +46,10 @@ discard block |
||
| 46 | 46 | |
| 47 | 47 | public static function dataAssets(): array { |
| 48 | 48 | return array_map( |
| 49 | - function (string $filename) { |
|
| 49 | + function(string $filename) { |
|
| 50 | 50 | /** @var VCalendar $vCalendar */ |
| 51 | 51 | $vCalendar = VObjectReader::read( |
| 52 | - fopen(self::ASSETS_DIR . $filename, 'r'), |
|
| 52 | + fopen(self::ASSETS_DIR.$filename, 'r'), |
|
| 53 | 53 | VObjectReader::OPTION_FORGIVING, |
| 54 | 54 | ); |
| 55 | 55 | [$initialCalendarUri, $ext] = explode('.', $filename, 2); |
@@ -54,13 +54,13 @@ |
||
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | #[\PHPUnit\Framework\Attributes\DataProvider('optionProvider')] |
| 57 | - public function testHandle(string|array $option, string|array $expected): void { |
|
| 57 | + public function testHandle(string | array $option, string | array $expected): void { |
|
| 58 | 58 | $this->setUser(); |
| 59 | 59 | $this->assertSame($expected, $this->handler->handle($option)); |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | 62 | #[\PHPUnit\Framework\Attributes\DataProvider('optionProvider')] |
| 63 | - public function testHandleNoUser(string|array $option): void { |
|
| 63 | + public function testHandleNoUser(string | array $option): void { |
|
| 64 | 64 | $this->shareManager->expects($this->once()) |
| 65 | 65 | ->method('getShareByToken') |
| 66 | 66 | ->willThrowException(new ShareNotFound()); |
@@ -49,7 +49,7 @@ discard block |
||
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | #[\PHPUnit\Framework\Attributes\DataProvider('dataColorContrast')] |
| 52 | - public function testColorContrast(string $color1, string $color2, int|float $contrast): void { |
|
| 52 | + public function testColorContrast(string $color1, string $color2, int | float $contrast): void { |
|
| 53 | 53 | $this->assertEqualsWithDelta($contrast, $this->util->colorContrast($color1, $color2), .001); |
| 54 | 54 | } |
| 55 | 55 | |
@@ -151,9 +151,9 @@ discard block |
||
| 151 | 151 | |
| 152 | 152 | public static function dataGetAppIcon(): array { |
| 153 | 153 | return [ |
| 154 | - ['user_ldap', Server::get(IAppManager::class)->getAppPath('user_ldap') . '/img/app.svg'], |
|
| 155 | - ['noapplikethis', \OC::$SERVERROOT . '/core/img/logo/logo.svg'], |
|
| 156 | - ['comments', Server::get(IAppManager::class)->getAppPath('comments') . '/img/comments.svg'], |
|
| 154 | + ['user_ldap', Server::get(IAppManager::class)->getAppPath('user_ldap').'/img/app.svg'], |
|
| 155 | + ['noapplikethis', \OC::$SERVERROOT.'/core/img/logo/logo.svg'], |
|
| 156 | + ['comments', Server::get(IAppManager::class)->getAppPath('comments').'/img/comments.svg'], |
|
| 157 | 157 | ]; |
| 158 | 158 | } |
| 159 | 159 | |
@@ -173,15 +173,15 @@ discard block |
||
| 173 | 173 | } |
| 174 | 174 | |
| 175 | 175 | #[\PHPUnit\Framework\Attributes\DataProvider('dataGetAppImage')] |
| 176 | - public function testGetAppImage(string $app, string $image, string|bool $expected): void { |
|
| 176 | + public function testGetAppImage(string $app, string $image, string | bool $expected): void { |
|
| 177 | 177 | $this->assertEquals($expected, $this->util->getAppImage($app, $image)); |
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | public static function dataGetAppImage(): array { |
| 181 | 181 | return [ |
| 182 | - ['core', 'logo/logo.svg', \OC::$SERVERROOT . '/core/img/logo/logo.svg'], |
|
| 183 | - ['files', 'folder', \OC::$SERVERROOT . '/apps/files/img/folder.svg'], |
|
| 184 | - ['files', 'folder.svg', \OC::$SERVERROOT . '/apps/files/img/folder.svg'], |
|
| 182 | + ['core', 'logo/logo.svg', \OC::$SERVERROOT.'/core/img/logo/logo.svg'], |
|
| 183 | + ['files', 'folder', \OC::$SERVERROOT.'/apps/files/img/folder.svg'], |
|
| 184 | + ['files', 'folder.svg', \OC::$SERVERROOT.'/apps/files/img/folder.svg'], |
|
| 185 | 185 | ['noapplikethis', 'foobar.svg', false], |
| 186 | 186 | ]; |
| 187 | 187 | } |
@@ -87,13 +87,13 @@ discard block |
||
| 87 | 87 | public static function dataUpdateStylesheetSuccess(): array { |
| 88 | 88 | return [ |
| 89 | 89 | ['name', str_repeat('a', 250), 'Saved'], |
| 90 | - ['url', 'https://nextcloud.com/' . str_repeat('a', 478), 'Saved'], |
|
| 90 | + ['url', 'https://nextcloud.com/'.str_repeat('a', 478), 'Saved'], |
|
| 91 | 91 | ['slogan', str_repeat('a', 500), 'Saved'], |
| 92 | 92 | ['color', '#0082c9', 'Saved'], |
| 93 | 93 | ['color', '#0082C9', 'Saved'], |
| 94 | 94 | ['color', '#0082C9', 'Saved'], |
| 95 | - ['imprintUrl', 'https://nextcloud.com/' . str_repeat('a', 478), 'Saved'], |
|
| 96 | - ['privacyUrl', 'https://nextcloud.com/' . str_repeat('a', 478), 'Saved'], |
|
| 95 | + ['imprintUrl', 'https://nextcloud.com/'.str_repeat('a', 478), 'Saved'], |
|
| 96 | + ['privacyUrl', 'https://nextcloud.com/'.str_repeat('a', 478), 'Saved'], |
|
| 97 | 97 | ]; |
| 98 | 98 | } |
| 99 | 99 | |
@@ -106,7 +106,7 @@ discard block |
||
| 106 | 106 | $this->l10n |
| 107 | 107 | ->expects($this->once()) |
| 108 | 108 | ->method('t') |
| 109 | - ->willReturnCallback(function ($str) { |
|
| 109 | + ->willReturnCallback(function($str) { |
|
| 110 | 110 | return $str; |
| 111 | 111 | }); |
| 112 | 112 | |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | $urlTests = []; |
| 133 | 133 | foreach ($urls as $urlKey => $urlName) { |
| 134 | 134 | // Check length limit |
| 135 | - $urlTests[] = [$urlKey, 'http://example.com/' . str_repeat('a', 501), "The given {$urlName} is too long"]; |
|
| 135 | + $urlTests[] = [$urlKey, 'http://example.com/'.str_repeat('a', 501), "The given {$urlName} is too long"]; |
|
| 136 | 136 | // Check potential evil javascript |
| 137 | 137 | $urlTests[] = [$urlKey, 'javascript:alert(1)', "The given {$urlName} is not a valid URL"]; |
| 138 | 138 | // Check XSS |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | $this->l10n |
| 163 | 163 | ->expects($this->any()) |
| 164 | 164 | ->method('t') |
| 165 | - ->willReturnCallback(function ($str) { |
|
| 165 | + ->willReturnCallback(function($str) { |
|
| 166 | 166 | return $str; |
| 167 | 167 | }); |
| 168 | 168 | |
@@ -193,7 +193,7 @@ discard block |
||
| 193 | 193 | $this->l10n |
| 194 | 194 | ->expects($this->any()) |
| 195 | 195 | ->method('t') |
| 196 | - ->willReturnCallback(function ($str) { |
|
| 196 | + ->willReturnCallback(function($str) { |
|
| 197 | 197 | return $str; |
| 198 | 198 | }); |
| 199 | 199 | |
@@ -223,7 +223,7 @@ discard block |
||
| 223 | 223 | $this->l10n |
| 224 | 224 | ->expects($this->any()) |
| 225 | 225 | ->method('t') |
| 226 | - ->willReturnCallback(function ($str) { |
|
| 226 | + ->willReturnCallback(function($str) { |
|
| 227 | 227 | return $str; |
| 228 | 228 | }); |
| 229 | 229 | |
@@ -260,7 +260,7 @@ discard block |
||
| 260 | 260 | ->method('getUploadedFile') |
| 261 | 261 | ->with('image') |
| 262 | 262 | ->willReturn([ |
| 263 | - 'tmp_name' => __DIR__ . '/../../../../tests/data/testimagelarge.svg', |
|
| 263 | + 'tmp_name' => __DIR__.'/../../../../tests/data/testimagelarge.svg', |
|
| 264 | 264 | 'type' => 'image/svg', |
| 265 | 265 | 'name' => 'testimagelarge.svg', |
| 266 | 266 | 'error' => 0, |
@@ -268,7 +268,7 @@ discard block |
||
| 268 | 268 | $this->l10n |
| 269 | 269 | ->expects($this->any()) |
| 270 | 270 | ->method('t') |
| 271 | - ->willReturnCallback(function ($str) { |
|
| 271 | + ->willReturnCallback(function($str) { |
|
| 272 | 272 | return $str; |
| 273 | 273 | }); |
| 274 | 274 | |
@@ -301,7 +301,7 @@ discard block |
||
| 301 | 301 | ->method('getUploadedFile') |
| 302 | 302 | ->with('image') |
| 303 | 303 | ->willReturn([ |
| 304 | - 'tmp_name' => __DIR__ . '/../../../../tests/data/lorem.txt', |
|
| 304 | + 'tmp_name' => __DIR__.'/../../../../tests/data/lorem.txt', |
|
| 305 | 305 | 'type' => 'application/pdf', |
| 306 | 306 | 'name' => 'logo.pdf', |
| 307 | 307 | 'error' => 0, |
@@ -309,7 +309,7 @@ discard block |
||
| 309 | 309 | $this->l10n |
| 310 | 310 | ->expects($this->any()) |
| 311 | 311 | ->method('t') |
| 312 | - ->willReturnCallback(function ($str) { |
|
| 312 | + ->willReturnCallback(function($str) { |
|
| 313 | 313 | return $str; |
| 314 | 314 | }); |
| 315 | 315 | |
@@ -344,11 +344,11 @@ discard block |
||
| 344 | 344 | |
| 345 | 345 | #[\PHPUnit\Framework\Attributes\DataProvider('dataUpdateImages')] |
| 346 | 346 | public function testUpdateLogoNormalLogoUpload(string $mimeType, bool $folderExists = true): void { |
| 347 | - $tmpLogo = Server::get(ITempManager::class)->getTemporaryFolder() . '/logo.svg'; |
|
| 347 | + $tmpLogo = Server::get(ITempManager::class)->getTemporaryFolder().'/logo.svg'; |
|
| 348 | 348 | $destination = Server::get(ITempManager::class)->getTemporaryFolder(); |
| 349 | 349 | |
| 350 | 350 | touch($tmpLogo); |
| 351 | - copy(__DIR__ . '/../../../../tests/data/testimage.png', $tmpLogo); |
|
| 351 | + copy(__DIR__.'/../../../../tests/data/testimage.png', $tmpLogo); |
|
| 352 | 352 | $this->request |
| 353 | 353 | ->expects($this->once()) |
| 354 | 354 | ->method('getParam') |
@@ -367,7 +367,7 @@ discard block |
||
| 367 | 367 | $this->l10n |
| 368 | 368 | ->expects($this->any()) |
| 369 | 369 | ->method('t') |
| 370 | - ->willReturnCallback(function ($str) { |
|
| 370 | + ->willReturnCallback(function($str) { |
|
| 371 | 371 | return $str; |
| 372 | 372 | }); |
| 373 | 373 | |
@@ -395,10 +395,10 @@ discard block |
||
| 395 | 395 | } |
| 396 | 396 | |
| 397 | 397 | public function testUpdateLogoLoginScreenUpload(): void { |
| 398 | - $tmpLogo = Server::get(ITempManager::class)->getTemporaryFolder() . 'logo.png'; |
|
| 398 | + $tmpLogo = Server::get(ITempManager::class)->getTemporaryFolder().'logo.png'; |
|
| 399 | 399 | |
| 400 | 400 | touch($tmpLogo); |
| 401 | - copy(__DIR__ . '/../../../../tests/data/desktopapp.png', $tmpLogo); |
|
| 401 | + copy(__DIR__.'/../../../../tests/data/desktopapp.png', $tmpLogo); |
|
| 402 | 402 | $this->request |
| 403 | 403 | ->expects($this->once()) |
| 404 | 404 | ->method('getParam') |
@@ -417,7 +417,7 @@ discard block |
||
| 417 | 417 | $this->l10n |
| 418 | 418 | ->expects($this->any()) |
| 419 | 419 | ->method('t') |
| 420 | - ->willReturnCallback(function ($str) { |
|
| 420 | + ->willReturnCallback(function($str) { |
|
| 421 | 421 | return $str; |
| 422 | 422 | }); |
| 423 | 423 | |
@@ -443,10 +443,10 @@ discard block |
||
| 443 | 443 | } |
| 444 | 444 | |
| 445 | 445 | public function testUpdateLogoLoginScreenUploadWithInvalidImage(): void { |
| 446 | - $tmpLogo = Server::get(ITempManager::class)->getTemporaryFolder() . '/logo.svg'; |
|
| 446 | + $tmpLogo = Server::get(ITempManager::class)->getTemporaryFolder().'/logo.svg'; |
|
| 447 | 447 | |
| 448 | 448 | touch($tmpLogo); |
| 449 | - file_put_contents($tmpLogo, file_get_contents(__DIR__ . '/../../../../tests/data/data.zip')); |
|
| 449 | + file_put_contents($tmpLogo, file_get_contents(__DIR__.'/../../../../tests/data/data.zip')); |
|
| 450 | 450 | $this->request |
| 451 | 451 | ->expects($this->once()) |
| 452 | 452 | ->method('getParam') |
@@ -465,7 +465,7 @@ discard block |
||
| 465 | 465 | $this->l10n |
| 466 | 466 | ->expects($this->any()) |
| 467 | 467 | ->method('t') |
| 468 | - ->willReturnCallback(function ($str) { |
|
| 468 | + ->willReturnCallback(function($str) { |
|
| 469 | 469 | return $str; |
| 470 | 470 | }); |
| 471 | 471 | |
@@ -518,7 +518,7 @@ discard block |
||
| 518 | 518 | $this->l10n |
| 519 | 519 | ->expects($this->any()) |
| 520 | 520 | ->method('t') |
| 521 | - ->willReturnCallback(function ($str) { |
|
| 521 | + ->willReturnCallback(function($str) { |
|
| 522 | 522 | return $str; |
| 523 | 523 | }); |
| 524 | 524 | |
@@ -555,7 +555,7 @@ discard block |
||
| 555 | 555 | $this->l10n |
| 556 | 556 | ->expects($this->any()) |
| 557 | 557 | ->method('t') |
| 558 | - ->willReturnCallback(function ($str) { |
|
| 558 | + ->willReturnCallback(function($str) { |
|
| 559 | 559 | return $str; |
| 560 | 560 | }); |
| 561 | 561 | |
@@ -599,8 +599,8 @@ discard block |
||
| 599 | 599 | |
| 600 | 600 | public static function dataUndoDelete(): array { |
| 601 | 601 | return [ |
| 602 | - [ 'backgroundMime', 'background' ], |
|
| 603 | - [ 'logoMime', 'logo' ] |
|
| 602 | + ['backgroundMime', 'background'], |
|
| 603 | + ['logoMime', 'logo'] |
|
| 604 | 604 | ]; |
| 605 | 605 | } |
| 606 | 606 | |