diff --git a/lib/Listener/FlowRegisterOperationListener.php b/lib/Listener/FlowRegisterOperationListener.php index 6d66880..acdf816 100644 --- a/lib/Listener/FlowRegisterOperationListener.php +++ b/lib/Listener/FlowRegisterOperationListener.php @@ -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 { diff --git a/lib/Operation.php b/lib/Operation.php index 1fa523a..1fbd20e 100644 --- a/lib/Operation.php +++ b/lib/Operation.php @@ -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, ) { } diff --git a/tests/Integration/features/bootstrap/FeatureContext.php b/tests/Integration/features/bootstrap/FeatureContext.php index 14c5db3..e513c63 100644 --- a/tests/Integration/features/bootstrap/FeatureContext.php +++ b/tests/Integration/features/bootstrap/FeatureContext.php @@ -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()); } } diff --git a/tests/Integration/features/bootstrap/WebDav.php b/tests/Integration/features/bootstrap/WebDav.php index 3ba070d..bbbb512 100644 --- a/tests/Integration/features/bootstrap/WebDav.php +++ b/tests/Integration/features/bootstrap/WebDav.php @@ -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 = [ @@ -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); } @@ -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); } } @@ -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); @@ -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 diff --git a/tests/bootstrap.php b/tests/bootstrap.php index 08e5484..d948a73 100644 --- a/tests/bootstrap.php +++ b/tests/bootstrap.php @@ -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');