]> source.dussan.org Git - nextcloud-server.git/commitdiff
Fix warning about optional parameter before required one 31942/head
authorCôme Chilliet <come.chilliet@nextcloud.com>
Tue, 12 Apr 2022 12:26:24 +0000 (14:26 +0200)
committerCôme Chilliet <come.chilliet@nextcloud.com>
Tue, 12 Apr 2022 12:26:24 +0000 (14:26 +0200)
Fixes this warning:
PHP Deprecated:  Required parameter $logger follows optional parameter $principalPrefix in /var/www/html/apps/dav/lib/CalDAV/CalendarRoot.php on line 37

Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
apps/dav/lib/CalDAV/CalendarRoot.php

index e08264b8f596147be08a8780830ca1bf545b8e3b..0c701d9cdcf14ebd3f346d346d494a9255e96680 100644 (file)
@@ -30,11 +30,14 @@ use Sabre\CalDAV\Backend;
 use Sabre\DAVACL\PrincipalBackend;
 
 class CalendarRoot extends \Sabre\CalDAV\CalendarRoot {
-
-       /** @var LoggerInterface */
-       private $logger;
-
-       public function __construct(PrincipalBackend\BackendInterface $principalBackend, Backend\BackendInterface $caldavBackend, $principalPrefix = 'principals', LoggerInterface $logger) {
+       private LoggerInterface $logger;
+
+       public function __construct(
+               PrincipalBackend\BackendInterface $principalBackend,
+               Backend\BackendInterface $caldavBackend,
+               $principalPrefix,
+               LoggerInterface $logger
+       ) {
                parent::__construct($principalBackend, $caldavBackend, $principalPrefix);
                $this->logger = $logger;
        }