Skip to content

Commit fceea88

Browse files
authored
Merge pull request #5251 from nextcloud/dependabot/composer/psalm/phar-6.14.3
chore(deps-dev): Bump psalm/phar from 6.5.1 to 6.14.3
2 parents 5712382 + 507136d commit fceea88

File tree

58 files changed

+150
-16
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+150
-16
lines changed

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"require-dev": {
2424
"roave/security-advisories": "dev-master",
2525
"jakub-onderka/php-parallel-lint": "^1.0.0",
26-
"psalm/phar": "^6.5",
26+
"psalm/phar": "^6.14",
2727
"friendsofphp/php-cs-fixer": "^3.8",
2828
"nextcloud/coding-standard": "^1.0",
2929
"nextcloud/ocp": "dev-master",

composer.lock

Lines changed: 9 additions & 9 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

lib/AppInfo/Application.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ public function __construct(array $urlParams = []) {
7171
parent::__construct(self::APPNAME, $urlParams);
7272
}
7373

74+
#[\Override]
7475
public function register(IRegistrationContext $context): void {
7576
\OCP\Util::connectHook('OC_Filesystem', 'preSetup', $this, 'addStorageWrapper');
7677

@@ -114,6 +115,7 @@ public function register(IRegistrationContext $context): void {
114115
$context->registerTaskProcessingTaskType(SlideDeckGenerationTaskType::class);
115116
}
116117

118+
#[\Override]
117119
public function boot(IBootContext $context): void {
118120
}
119121

lib/Backgroundjobs/Cleanup.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@ public function __construct(
2323
$this->setInterval(60 * 60);
2424
}
2525

26+
#[\Override]
2627
protected function run($argument) {
2728
// Expire template mappings for file creation
2829
$query = $this->db->getQueryBuilder();

lib/Backgroundjobs/ObtainCapabilities.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ public function __construct(
2626
$this->setInterval(60 * 60);
2727
}
2828

29+
#[\Override]
2930
protected function run($argument) {
3031
if (!$this->appConfig->getCollaboraUrlInternal()) {
3132
return;

lib/Capabilities.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ public function __construct(
9999
) {
100100
}
101101

102+
#[\Override]
102103
public function getCapabilities() {
103104
// Only expose capabilities for users with enabled office or guests (where it depends on the share owner if they have access)
104105
if (!$this->permissionManager->isEnabledForUser() && $this->userId !== null) {

lib/Controller/WopiController.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -372,7 +372,7 @@ public function getFile(string $fileId, string $access_token): JSONResponse|Stre
372372
$offset = intval($matches[1] ?? 0);
373373
$length = intval($matches[2] ?? 0) - $offset + 1;
374374
if ($length <= 0) {
375-
$length = $filesize - $offset;
375+
$length = (int)$filesize - $offset;
376376
}
377377

378378
$fp = $file->fopen('rb');
@@ -385,7 +385,9 @@ public function getFile(string $fileId, string $access_token): JSONResponse|Stre
385385
$response->addHeader('Accept-Ranges', 'bytes');
386386
$response->addHeader('Content-Length', (string)$filesize);
387387
$response->setStatus(Http::STATUS_PARTIAL_CONTENT);
388-
$response->addHeader('Content-Range', 'bytes ' . $offset . '-' . ($offset + $length) . '/' . $filesize);
388+
389+
$blockSize = ($offset + $length);
390+
$response->addHeader('Content-Range', "bytes $offset-$blockSize/$filesize");
389391
} else {
390392
$response = new StreamResponse($file->fopen('rb'));
391393
}

lib/Conversion/ConversionProvider.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public function __construct(
5757
$this->l10n = $l10nFactory->get('richdocuments');
5858
}
5959

60+
#[\Override]
6061
public function getSupportedMimeTypes(): array {
6162
$documents = self::MIME_TYPES['documents'];
6263
$sheets = self::MIME_TYPES['sheets'];
@@ -133,6 +134,7 @@ public function getSupportedMimeTypes(): array {
133134
];
134135
}
135136

137+
#[\Override]
136138
public function convertFile(File $file, string $targetMimeType): mixed {
137139
$targetFileExtension = $this->getExtensionForMimeType($targetMimeType);
138140
if ($targetFileExtension === null) {

lib/Db/Wopi.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,7 @@ public function getDirect() {
168168
return (bool)$this->direct;
169169
}
170170

171+
#[\Override]
171172
#[\ReturnTypeWillChange]
172173
public function jsonSerialize() {
173174
$properties = get_object_vars($this);

lib/Listener/AddContentSecurityPolicyListener.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public function __construct(
2424
) {
2525
}
2626

27+
#[\Override]
2728
public function handle(Event $event): void {
2829
if (!$event instanceof AddContentSecurityPolicyEvent) {
2930
return;

0 commit comments

Comments
 (0)