From 76d787ac73d0d27351f54493556bf5b4b9bf3e7c Mon Sep 17 00:00:00 2001 From: Carl Schwan Date: Wed, 15 Jul 2026 10:41:59 +0200 Subject: [PATCH] chore: Bump phpstan version And fix the issue found by the new version. $uri === '' was always false at that point. Signed-off-by: Carl Schwan --- composer.json | 2 +- src/DAV/PathHelper.php | 7 ++----- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/composer.json b/composer.json index 25e7143..55127a2 100644 --- a/composer.json +++ b/composer.json @@ -15,7 +15,7 @@ "require-dev": { "php-parallel-lint/php-parallel-lint": "^1.0", "friendsofphp/php-cs-fixer": "^2", - "phpstan/phpstan": "^0.12", + "phpstan/phpstan": "^2.2", "psalm/phar": "^4.3", "phpunit/phpunit": "^8" }, diff --git a/src/DAV/PathHelper.php b/src/DAV/PathHelper.php index 04098c7..0b25915 100644 --- a/src/DAV/PathHelper.php +++ b/src/DAV/PathHelper.php @@ -25,13 +25,10 @@ use Sabre\DAV\Exception\Forbidden; use Sabre\DAV\Server; class PathHelper { - /** @var Server */ - private $server; + private Server $server; /** * PathHelper constructor. - * - * @param Server $server */ public function __construct(Server $server) { $this->server = $server; @@ -42,7 +39,7 @@ class PathHelper { return $uri; } try { - return ($uri === '' && $this->server->getBaseUri() === '/') ? '' : $this->server->calculateUri($uri); + return $this->server->calculateUri($uri); } catch (Forbidden $e) { return null; }