Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: Update PSR container to 2.0.2 #36617

Merged
merged 2 commits into from
Apr 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion 3rdparty
Submodule 3rdparty updated 126 files
5 changes: 4 additions & 1 deletion apps/encryption/tests/Crypto/EncryptAllTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ protected function setUp(): void {

/* We need format method to return a string */
$outputFormatter = $this->createMock(OutputFormatterInterface::class);
$outputFormatter->method('isDecorated')->willReturn(false);
$outputFormatter->method('format')->willReturnArgument(0);

$this->outputInterface->expects($this->any())->method('getFormatter')
Expand Down Expand Up @@ -346,9 +347,11 @@ function ($path) {
['/user1/files/foo/subfile'],
);

$outputFormatter = $this->createMock(OutputFormatterInterface::class);
$outputFormatter->method('isDecorated')->willReturn(false);
$this->outputInterface->expects($this->any())
->method('getFormatter')
->willReturn($this->createMock(OutputFormatterInterface::class));
->willReturn($outputFormatter);
$progressBar = new ProgressBar($this->outputInterface);

$this->invokePrivate($encryptAll, 'encryptUsersFiles', ['user1', $progressBar, '']);
Expand Down
6 changes: 3 additions & 3 deletions lib/private/Console/TimestampFormatter.php
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,11 @@ public function getStyle($name) {
/**
* Formats a message according to the given styles.
*
* @param string $message The message to style
* @return string The styled message, prepended with a timestamp using the
* @param string|null $message The message to style
* @return string|null The styled message, prepended with a timestamp using the
* log timezone and dateformat, e.g. "2015-06-23T17:24:37+02:00"
*/
public function format($message) {
public function format(?string $message): ?string {
if (!$this->formatter->isDecorated()) {
// Don't add anything to the output when we shouldn't
return $this->formatter->format($message);
Expand Down
1 change: 1 addition & 0 deletions tests/Core/Command/Encryption/ChangeKeyStorageRootTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ protected function setUp(): void {

/* We need format method to return a string */
$outputFormatter = $this->createMock(OutputFormatterInterface::class);
$outputFormatter->method('isDecorated')->willReturn(false);
$outputFormatter->method('format')->willReturnArgument(0);

$this->outputInterface->expects($this->any())->method('getFormatter')
Expand Down
1 change: 1 addition & 0 deletions tests/Core/Command/Preview/RepairTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ protected function setUp(): void {

/* We need format method to return a string */
$outputFormatter = $this->createMock(OutputFormatterInterface::class);
$outputFormatter->method('isDecorated')->willReturn(false);
$outputFormatter->method('format')->willReturnArgument(0);

$this->output->expects($this->any())
Expand Down
4 changes: 4 additions & 0 deletions tests/lib/Encryption/DecryptAllTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -77,12 +77,15 @@ protected function setUp(): void {
->disableOriginalConstructor()->getMock();
$this->outputInterface = $this->getMockBuilder(OutputInterface::class)
->disableOriginalConstructor()->getMock();
$this->outputInterface->expects($this->any())->method('isDecorated')
->willReturn(false);
$this->userInterface = $this->getMockBuilder(UserInterface::class)
->disableOriginalConstructor()->getMock();

/* We need format method to return a string */
$outputFormatter = $this->createMock(OutputFormatterInterface::class);
$outputFormatter->method('format')->willReturn('foo');
$outputFormatter->method('isDecorated')->willReturn(false);

$this->outputInterface->expects($this->any())->method('getFormatter')
->willReturn($outputFormatter);
Expand Down Expand Up @@ -304,6 +307,7 @@ function ($path) {

/* We need format method to return a string */
$outputFormatter = $this->createMock(OutputFormatterInterface::class);
$outputFormatter->method('isDecorated')->willReturn(false);
$outputFormatter->method('format')->willReturn('foo');

$output = $this->createMock(OutputInterface::class);
Expand Down