Skip to content

Commit 01de9fd

Browse files
authored
Merge pull request #1615 from alecpl/dev/phpstan
Remove useless ResponseMock, fix obvious code issues
2 parents e0137b8 + 3fb8b9b commit 01de9fd

61 files changed

Lines changed: 295 additions & 315 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

lib/CardDAV/Backend/PDO.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class PDO extends AbstractBackend implements SyncSupport
2222
/**
2323
* PDO connection.
2424
*
25-
* @var PDO
25+
* @var \PDO
2626
*/
2727
protected $pdo;
2828

lib/DAV/Auth/Backend/AbstractBearer.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function check(RequestInterface $request, ResponseInterface $response)
8989
$response
9090
);
9191

92-
$bearerToken = $auth->getToken($request);
92+
$bearerToken = $auth->getToken();
9393
if (!$bearerToken) {
9494
return [false, "No 'Authorization: Bearer' header found. Either the client didn't send one, or the server is mis-configured"];
9595
}

lib/DAV/Auth/Backend/PDO.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ class PDO extends AbstractDigest
1616
/**
1717
* Reference to PDO connection.
1818
*
19-
* @var PDO
19+
* @var \PDO
2020
*/
2121
protected $pdo;
2222

lib/DAV/Auth/Backend/PDOBasicAuth.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class PDOBasicAuth extends AbstractBasic
1313
/**
1414
* Reference to PDO connection.
1515
*
16-
* @var PDO
16+
* @var \PDO
1717
*/
1818
protected $pdo;
1919

lib/DAV/Auth/Plugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ class Plugin extends ServerPlugin
3636
* This is useful if you want to allow both authenticated and
3737
* unauthenticated access to your server.
3838
*
39-
* @param bool
39+
* @var bool
4040
*/
4141
public $autoRequireLogin = true;
4242

lib/DAV/Client.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -412,7 +412,7 @@ public function options()
412412
* @param string $url
413413
* @param string|resource|null $body
414414
*
415-
* @throws clientException, in case a curl error occurred
415+
* @throws HTTP\ClientException, in case a curl error occurred
416416
*
417417
* @return array
418418
*/

lib/DAV/Locks/Backend/PDO.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ class PDO extends AbstractBackend
2828
/**
2929
* The PDO connection object.
3030
*
31-
* @var pdo
31+
* @var \PDO
3232
*/
3333
protected $pdo;
3434

lib/DAVACL/Plugin.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ public function checkPrivileges($uri, $privileges, $recursion = self::R_PARENT,
236236
*/
237237
public function getCurrentUserPrincipal()
238238
{
239-
/** @var $authPlugin \Sabre\DAV\Auth\Plugin */
239+
/** @var DAV\Auth\Plugin $authPlugin */
240240
$authPlugin = $this->server->getPlugin('auth');
241241
if (!$authPlugin) {
242242
return null;

lib/DAVACL/PrincipalBackend/PDO.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ class PDO extends AbstractBackend implements CreatePrincipalSupport
3737
/**
3838
* pdo.
3939
*
40-
* @var PDO
40+
* @var \PDO
4141
*/
4242
protected $pdo;
4343

tests/Sabre/AbstractDAVServerTestCase.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ public function request($request, $expectedStatus = null)
204204
if (is_array($request)) {
205205
$request = HTTP\Sapi::createFromServerArray($request);
206206
}
207-
$response = new HTTP\ResponseMock();
207+
$response = new HTTP\Response();
208208

209209
$this->server->httpRequest = $request;
210210
$this->server->httpResponse = $response;

0 commit comments

Comments
 (0)