Skip to content

Commit

Permalink
fix(cs): Apply auto fixes
Browse files Browse the repository at this point in the history
Signed-off-by: Joas Schilling <[email protected]>
  • Loading branch information
nickvergessen committed Sep 23, 2024
1 parent c0ae809 commit 979c135
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 22 deletions.
3 changes: 2 additions & 1 deletion lib/Listener/FlowRegisterOperationListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@
*/
class FlowRegisterOperationListener implements IEventListener {
public function __construct(
protected readonly Operation $operation) {
protected readonly Operation $operation,
) {
}

public function handle(Event $event): void {
Expand Down
2 changes: 1 addition & 1 deletion lib/Operation.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public function __construct(
protected readonly File $fileEntity,
protected readonly IMountManager $mountManager,
protected readonly IRootFolder $rootFolder,
protected readonly LoggerInterface $logger
protected readonly LoggerInterface $logger,
) {
}

Expand Down
2 changes: 1 addition & 1 deletion tests/Integration/features/bootstrap/FeatureContext.php
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ public function theWebdavResponseShouldHaveAStatusCode($statusCode) {
$statusCodes = [(int)$statusCode];
}
if (!in_array($this->response->getStatusCode(), $statusCodes, true)) {
throw new \Exception("Expected $statusCode, got ".$this->response->getStatusCode());
throw new \Exception("Expected $statusCode, got " . $this->response->getStatusCode());
}
}

Expand Down
36 changes: 18 additions & 18 deletions tests/Integration/features/bootstrap/WebDav.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,9 +54,9 @@ public function makeDavRequest($user, $method, $path, $headers, $body = null, $t
if ($type === 'files') {
$fullUrl = $this->baseUrl . $this->getDavFilesPath($user) . "$path";
} elseif ($type === 'uploads') {
$fullUrl = $this->baseUrl . $this->davPath . "$path";
$fullUrl = $this->baseUrl . $this->davPath . "$path";
} else {
$fullUrl = $this->baseUrl . $this->davPath . '/' . $type . "$path";
$fullUrl = $this->baseUrl . $this->davPath . '/' . $type . "$path";
}
$client = new GClient();
$options = [
Expand Down Expand Up @@ -186,7 +186,7 @@ public function downloadedContentShouldBe($content) {
*/
public function checkPropForFile($file, $prefix, $prop, $value) {
$elementList = $this->propfindFile($this->currentUser, $file, "<$prefix:$prop/>");
$property = $elementList['/'.$this->getDavFilesPath($this->currentUser).$file][200]["{DAV:}$prop"];
$property = $elementList['/' . $this->getDavFilesPath($this->currentUser) . $file][200]["{DAV:}$prop"];
Assert::assertEquals($property, $value);
}

Expand Down Expand Up @@ -522,7 +522,7 @@ public function makeSabrePath($user, $path, $type = 'files') {
if ($type === 'files') {
return $this->encodePath($this->getDavFilesPath($user) . $path);
} else {
return $this->encodePath($this->davPath . '/' . $type . '/' . $user . '/' . $path);
return $this->encodePath($this->davPath . '/' . $type . '/' . $user . '/' . $path);
}
}

Expand Down Expand Up @@ -689,28 +689,28 @@ public function userUploadsBulkedFiles($user, $name1, $content1, $name2, $conten
$boundary = 'boundary_azertyuiop';

$body = '';
$body .= '--'.$boundary."\r\n";
$body .= 'X-File-Path: '.$name1."\r\n";
$body .= '--' . $boundary . "\r\n";
$body .= 'X-File-Path: ' . $name1 . "\r\n";
$body .= "X-File-MD5: f6a6263167c92de8644ac998b3c4e4d1\r\n";
$body .= "X-OC-Mtime: 1111111111\r\n";
$body .= 'Content-Length: '.strlen($content1)."\r\n";
$body .= 'Content-Length: ' . strlen($content1) . "\r\n";
$body .= "\r\n";
$body .= $content1."\r\n";
$body .= '--'.$boundary."\r\n";
$body .= 'X-File-Path: '.$name2."\r\n";
$body .= $content1 . "\r\n";
$body .= '--' . $boundary . "\r\n";
$body .= 'X-File-Path: ' . $name2 . "\r\n";
$body .= "X-File-MD5: 87c7d4068be07d390a1fffd21bf1e944\r\n";
$body .= "X-OC-Mtime: 2222222222\r\n";
$body .= 'Content-Length: '.strlen($content2)."\r\n";
$body .= 'Content-Length: ' . strlen($content2) . "\r\n";
$body .= "\r\n";
$body .= $content2."\r\n";
$body .= '--'.$boundary."\r\n";
$body .= 'X-File-Path: '.$name3."\r\n";
$body .= $content2 . "\r\n";
$body .= '--' . $boundary . "\r\n";
$body .= 'X-File-Path: ' . $name3 . "\r\n";
$body .= "X-File-MD5: e86a1cf0678099986a901c79086f5617\r\n";
$body .= "X-File-Mtime: 3333333333\r\n";
$body .= 'Content-Length: '.strlen($content3)."\r\n";
$body .= 'Content-Length: ' . strlen($content3) . "\r\n";
$body .= "\r\n";
$body .= $content3."\r\n";
$body .= '--'.$boundary."--\r\n";
$body .= $content3 . "\r\n";
$body .= '--' . $boundary . "--\r\n";

$stream = fopen('php://temp', 'r+');
fwrite($stream, $body);
Expand All @@ -720,7 +720,7 @@ public function userUploadsBulkedFiles($user, $name1, $content1, $name2, $conten
$options = [
'auth' => [$user, $this->regularUser],
'headers' => [
'Content-Type' => 'multipart/related; boundary='.$boundary,
'Content-Type' => 'multipart/related; boundary=' . $boundary,
'Content-Length' => (string)strlen($body),
],
'body' => $body
Expand Down
2 changes: 1 addition & 1 deletion tests/bootstrap.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
define('PHPUNIT_RUN', 1);
}

require_once __DIR__.'/../../../lib/base.php';
require_once __DIR__ . '/../../../lib/base.php';

if (!class_exists('\PHPUnit\Framework\TestCase')) {
require_once('PHPUnit/Autoload.php');
Expand Down

0 comments on commit 979c135

Please sign in to comment.