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
|
|
@ -15,7 +15,7 @@
|
||||||
"require-dev": {
|
"require-dev": {
|
||||||
"php-parallel-lint/php-parallel-lint": "^1.0",
|
"php-parallel-lint/php-parallel-lint": "^1.0",
|
||||||
"friendsofphp/php-cs-fixer": "^2",
|
"friendsofphp/php-cs-fixer": "^2",
|
||||||
"phpstan/phpstan": "^0.12",
|
"phpstan/phpstan": "^2.2",
|
||||||
"psalm/phar": "^4.3",
|
"psalm/phar": "^4.3",
|
||||||
"phpunit/phpunit": "^8"
|
"phpunit/phpunit": "^8"
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -25,13 +25,10 @@ use Sabre\DAV\Exception\Forbidden;
|
||||||
use Sabre\DAV\Server;
|
use Sabre\DAV\Server;
|
||||||
|
|
||||||
class PathHelper {
|
class PathHelper {
|
||||||
/** @var Server */
|
private Server $server;
|
||||||
private $server;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* PathHelper constructor.
|
* PathHelper constructor.
|
||||||
*
|
|
||||||
* @param Server $server
|
|
||||||
*/
|
*/
|
||||||
public function __construct(Server $server) {
|
public function __construct(Server $server) {
|
||||||
$this->server = $server;
|
$this->server = $server;
|
||||||
|
|
@ -42,7 +39,7 @@ class PathHelper {
|
||||||
return $uri;
|
return $uri;
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
return ($uri === '' && $this->server->getBaseUri() === '/') ? '' : $this->server->calculateUri($uri);
|
return $this->server->calculateUri($uri);
|
||||||
} catch (Forbidden $e) {
|
} catch (Forbidden $e) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue