mirror of
https://codeberg.org/icewind/SearchDAV.git
synced 2026-08-02 12:14:54 +02:00
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 <carlschwan@kde.org>
This commit is contained in:
parent
3865288b69
commit
76d787ac73
2 changed files with 3 additions and 6 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue