aboutsummaryrefslogtreecommitdiffstats
path: root/apps/files
diff options
context:
space:
mode:
Diffstat (limited to 'apps/files')
-rw-r--r--apps/files/lib/Activity/FavoriteProvider.php4
-rw-r--r--apps/files/lib/Activity/Provider.php8
-rw-r--r--apps/files/lib/Collaboration/Resources/ResourceProvider.php2
-rw-r--r--apps/files/lib/Controller/DirectEditingController.php4
-rw-r--r--apps/files/lib/Controller/ViewController.php2
5 files changed, 10 insertions, 10 deletions
diff --git a/apps/files/lib/Activity/FavoriteProvider.php b/apps/files/lib/Activity/FavoriteProvider.php
index 9c7018e6a5c..c96d5b5debe 100644
--- a/apps/files/lib/Activity/FavoriteProvider.php
+++ b/apps/files/lib/Activity/FavoriteProvider.php
@@ -71,7 +71,7 @@ class FavoriteProvider implements IProvider {
* @throws \InvalidArgumentException
* @since 11.0.0
*/
- public function parse($language, IEvent $event, IEvent $previousEvent = null) {
+ public function parse($language, IEvent $event, ?IEvent $previousEvent = null) {
if ($event->getApp() !== 'files' || $event->getType() !== 'favorite') {
throw new \InvalidArgumentException();
}
@@ -125,7 +125,7 @@ class FavoriteProvider implements IProvider {
* @throws \InvalidArgumentException
* @since 11.0.0
*/
- public function parseLongVersion(IEvent $event, IEvent $previousEvent = null) {
+ public function parseLongVersion(IEvent $event, ?IEvent $previousEvent = null) {
if ($event->getSubject() === self::SUBJECT_ADDED) {
$subject = $this->l->t('You added {file} to your favorites');
if ($this->activityManager->getRequirePNG()) {
diff --git a/apps/files/lib/Activity/Provider.php b/apps/files/lib/Activity/Provider.php
index 50535cab5c6..662ea98d0b9 100644
--- a/apps/files/lib/Activity/Provider.php
+++ b/apps/files/lib/Activity/Provider.php
@@ -102,7 +102,7 @@ class Provider implements IProvider {
* @throws \InvalidArgumentException
* @since 11.0.0
*/
- public function parse($language, IEvent $event, IEvent $previousEvent = null) {
+ public function parse($language, IEvent $event, ?IEvent $previousEvent = null) {
if ($event->getApp() !== 'files') {
throw new \InvalidArgumentException();
}
@@ -136,7 +136,7 @@ class Provider implements IProvider {
* @throws \InvalidArgumentException
* @since 11.0.0
*/
- public function parseShortVersion(IEvent $event, IEvent $previousEvent = null) {
+ public function parseShortVersion(IEvent $event, ?IEvent $previousEvent = null) {
$parsedParameters = $this->getParameters($event);
if ($event->getSubject() === 'created_by') {
@@ -178,7 +178,7 @@ class Provider implements IProvider {
* @throws \InvalidArgumentException
* @since 11.0.0
*/
- public function parseLongVersion(IEvent $event, IEvent $previousEvent = null) {
+ public function parseLongVersion(IEvent $event, ?IEvent $previousEvent = null) {
$this->fileIsEncrypted = false;
$parsedParameters = $this->getParameters($event);
@@ -368,7 +368,7 @@ class Provider implements IProvider {
* @return array
* @throws \InvalidArgumentException
*/
- protected function getFile($parameter, IEvent $event = null) {
+ protected function getFile($parameter, ?IEvent $event = null) {
if (is_array($parameter)) {
$path = reset($parameter);
$id = (string) key($parameter);
diff --git a/apps/files/lib/Collaboration/Resources/ResourceProvider.php b/apps/files/lib/Collaboration/Resources/ResourceProvider.php
index a15e1558057..a1a944bc56a 100644
--- a/apps/files/lib/Collaboration/Resources/ResourceProvider.php
+++ b/apps/files/lib/Collaboration/Resources/ResourceProvider.php
@@ -107,7 +107,7 @@ class ResourceProvider implements IProvider {
* @return bool
* @since 16.0.0
*/
- public function canAccessResource(IResource $resource, IUser $user = null): bool {
+ public function canAccessResource(IResource $resource, ?IUser $user = null): bool {
if (!$user instanceof IUser) {
return false;
}
diff --git a/apps/files/lib/Controller/DirectEditingController.php b/apps/files/lib/Controller/DirectEditingController.php
index 5d2162c69e0..ab061382a2d 100644
--- a/apps/files/lib/Controller/DirectEditingController.php
+++ b/apps/files/lib/Controller/DirectEditingController.php
@@ -79,7 +79,7 @@ class DirectEditingController extends OCSController {
* 200: URL for direct editing returned
* 403: Opening file is not allowed
*/
- public function create(string $path, string $editorId, string $creatorId, string $templateId = null): DataResponse {
+ public function create(string $path, string $editorId, string $creatorId, ?string $templateId = null): DataResponse {
if (!$this->directEditingManager->isEnabled()) {
return new DataResponse(['message' => 'Direct editing is not enabled'], Http::STATUS_INTERNAL_SERVER_ERROR);
}
@@ -115,7 +115,7 @@ class DirectEditingController extends OCSController {
* 200: URL for direct editing returned
* 403: Opening file is not allowed
*/
- public function open(string $path, string $editorId = null, ?int $fileId = null): DataResponse {
+ public function open(string $path, ?string $editorId = null, ?int $fileId = null): DataResponse {
if (!$this->directEditingManager->isEnabled()) {
return new DataResponse(['message' => 'Direct editing is not enabled'], Http::STATUS_INTERNAL_SERVER_ERROR);
}
diff --git a/apps/files/lib/Controller/ViewController.php b/apps/files/lib/Controller/ViewController.php
index 2934ac06704..67cd0bf2aef 100644
--- a/apps/files/lib/Controller/ViewController.php
+++ b/apps/files/lib/Controller/ViewController.php
@@ -135,7 +135,7 @@ class ViewController extends Controller {
* @param string $fileid
* @return TemplateResponse|RedirectResponse
*/
- public function showFile(string $fileid = null): Response {
+ public function showFile(?string $fileid = null): Response {
if (!$fileid) {
return new RedirectResponse($this->urlGenerator->linkToRoute('files.view.index'));
}