Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/CardDAV/Backend/PDO.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class PDO extends AbstractBackend implements SyncSupport
/**
* PDO connection.
*
* @var PDO
* @var \PDO
*/
protected $pdo;

Expand Down
2 changes: 1 addition & 1 deletion lib/DAV/Auth/Backend/AbstractBearer.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function check(RequestInterface $request, ResponseInterface $response)
$response
);

$bearerToken = $auth->getToken($request);
$bearerToken = $auth->getToken();
if (!$bearerToken) {
return [false, "No 'Authorization: Bearer' header found. Either the client didn't send one, or the server is mis-configured"];
}
Expand Down
2 changes: 1 addition & 1 deletion lib/DAV/Auth/Backend/PDO.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ class PDO extends AbstractDigest
/**
* Reference to PDO connection.
*
* @var PDO
* @var \PDO
*/
protected $pdo;

Expand Down
2 changes: 1 addition & 1 deletion lib/DAV/Auth/Backend/PDOBasicAuth.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ class PDOBasicAuth extends AbstractBasic
/**
* Reference to PDO connection.
*
* @var PDO
* @var \PDO
*/
protected $pdo;

Expand Down
2 changes: 1 addition & 1 deletion lib/DAV/Auth/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ class Plugin extends ServerPlugin
* This is useful if you want to allow both authenticated and
* unauthenticated access to your server.
*
* @param bool
* @var bool
*/
public $autoRequireLogin = true;

Expand Down
2 changes: 1 addition & 1 deletion lib/DAV/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ public function options()
* @param string $url
* @param string|resource|null $body
*
* @throws clientException, in case a curl error occurred
* @throws HTTP\ClientException, in case a curl error occurred
*
* @return array
*/
Expand Down
2 changes: 1 addition & 1 deletion lib/DAV/Locks/Backend/PDO.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ class PDO extends AbstractBackend
/**
* The PDO connection object.
*
* @var pdo
* @var \PDO
*/
protected $pdo;

Expand Down
2 changes: 1 addition & 1 deletion lib/DAVACL/Plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,7 @@ public function checkPrivileges($uri, $privileges, $recursion = self::R_PARENT,
*/
public function getCurrentUserPrincipal()
{
/** @var $authPlugin \Sabre\DAV\Auth\Plugin */
/** @var DAV\Auth\Plugin $authPlugin */
$authPlugin = $this->server->getPlugin('auth');
if (!$authPlugin) {
return null;
Expand Down
2 changes: 1 addition & 1 deletion lib/DAVACL/PrincipalBackend/PDO.php
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class PDO extends AbstractBackend implements CreatePrincipalSupport
/**
* pdo.
*
* @var PDO
* @var \PDO
*/
protected $pdo;

Expand Down
2 changes: 1 addition & 1 deletion tests/Sabre/AbstractDAVServerTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ public function request($request, $expectedStatus = null)
if (is_array($request)) {
$request = HTTP\Sapi::createFromServerArray($request);
}
$response = new HTTP\ResponseMock();
$response = new HTTP\Response();

$this->server->httpRequest = $request;
$this->server->httpResponse = $response;
Expand Down
4 changes: 2 additions & 2 deletions tests/Sabre/CalDAV/Backend/MockSharing.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,8 +156,8 @@ public function getInvites($calendarId)
/**
* This method is called when a user replied to a request to share.
*
* @param string href The sharee who is replying (often a mailto: address)
* @param int status One of the \Sabre\DAV\Sharing\Plugin::INVITE_* constants
* @param string $href The sharee who is replying (often a mailto: address)
* @param int $status One of the \Sabre\DAV\Sharing\Plugin::INVITE_* constants
* @param string $calendarUri The url to the calendar thats being shared
* @param string $inReplyTo The unique id this message is a response to
* @param string $summary A description of the reply
Expand Down
2 changes: 1 addition & 1 deletion tests/Sabre/CalDAV/CalendarHomeTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
class CalendarHomeTest extends \PHPUnit\Framework\TestCase
{
/**
* @var Sabre\CalDAV\CalendarHome
* @var CalendarHome
*/
protected $usercalendars;

Expand Down
6 changes: 4 additions & 2 deletions tests/Sabre/CalDAV/CalendarObjectTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,16 @@

namespace Sabre\CalDAV;

use Sabre\CalDAV;

class CalendarObjectTest extends \PHPUnit\Framework\TestCase
{
/**
* @var Sabre\CalDAV\Backend_PDO
* @var CalDAV\Backend\PDO
*/
protected $backend;
/**
* @var Sabre\CalDAV\Calendar
* @var CalDAV\Calendar
*/
protected $calendar;
protected $principalBackend;
Expand Down
5 changes: 3 additions & 2 deletions tests/Sabre/CalDAV/CalendarTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,18 @@

namespace Sabre\CalDAV;

use Sabre\CalDAV;
use Sabre\DAV\PropPatch;

class CalendarTest extends \PHPUnit\Framework\TestCase
{
/**
* @var Sabre\CalDAV\Backend\PDO
* @var CalDAV\Backend\PDO
*/
protected $backend;
protected $principalBackend;
/**
* @var Sabre\CalDAV\Calendar
* @var CalDAV\Calendar
*/
protected $calendar;
/**
Expand Down
10 changes: 5 additions & 5 deletions tests/Sabre/CalDAV/FreeBusyReportTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ public function setup(): void

$request = new HTTP\Request('GET', '/calendar');
$this->server->httpRequest = $request;
$this->server->httpResponse = new HTTP\ResponseMock();
$this->server->httpResponse = new HTTP\Response();

$this->plugin = new Plugin();
$this->server->addPlugin($this->plugin);
Expand All @@ -101,11 +101,11 @@ public function testFreeBusyReport()
$report = $this->server->xml->parse($reportXML, null, $rootElem);
$this->plugin->report($rootElem, $report, null);

self::assertEquals(200, $this->server->httpResponse->status);
self::assertEquals(200, $this->server->httpResponse->getStatus());
self::assertEquals('text/calendar', $this->server->httpResponse->getHeader('Content-Type'));
self::assertTrue(false !== strpos($this->server->httpResponse->body, 'BEGIN:VFREEBUSY'));
self::assertTrue(false !== strpos($this->server->httpResponse->body, '20111005T120000Z/20111005T130000Z'));
self::assertTrue(false !== strpos($this->server->httpResponse->body, '20111006T100000Z/20111006T110000Z'));
self::assertTrue(false !== strpos($this->server->httpResponse->getBody(), 'BEGIN:VFREEBUSY'));
self::assertTrue(false !== strpos($this->server->httpResponse->getBody(), '20111005T120000Z/20111005T130000Z'));
self::assertTrue(false !== strpos($this->server->httpResponse->getBody(), '20111006T100000Z/20111006T110000Z'));
}

public function testFreeBusyReportNoTimeRange()
Expand Down
2 changes: 1 addition & 1 deletion tests/Sabre/CalDAV/Issue220Test.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,6 @@ public function testIssue220()
self::assertFalse(strpos($response->getBodyAsString(), '<s:exception>PHPUnit_Framework_Error_Warning</s:exception>'), 'Error Warning occurred: '.$response->getBodyAsString());
self::assertFalse(strpos($response->getBodyAsString(), 'Invalid argument supplied for foreach()'), 'Invalid argument supplied for foreach(): '.$response->getBodyAsString());

self::assertEquals(207, $response->status);
self::assertEquals(207, $response->getStatus());
}
}
14 changes: 7 additions & 7 deletions tests/Sabre/CalDAV/Notifications/PluginTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,16 @@
class PluginTest extends \PHPUnit\Framework\TestCase
{
/**
* @var Sabre\DAV\Server
* @var DAV\Server
*/
protected $server;
/**
* @var Sabre\CalDAV\Plugin
* @var CalDAV\Plugin
*/
protected $plugin;
protected $response;
/**
* @var Sabre\CalDAV\Backend\PDO
* @var CalDAV\Backend\PDO
*/
protected $caldavBackend;

Expand Down Expand Up @@ -60,7 +60,7 @@ public function setup(): void
// This forces a login
$authPlugin->beforeMethod(new HTTP\Request('GET', '/'), new HTTP\Response());

$this->response = new HTTP\ResponseMock();
$this->response = new HTTP\Response();
$this->server->httpResponse = $this->response;
}

Expand Down Expand Up @@ -123,14 +123,14 @@ public function testNotificationGet()
$caldav = new Plugin();

$server->httpRequest = new Request('GET', '/foo.xml');
$httpResponse = new HTTP\ResponseMock();
$httpResponse = new HTTP\Response();
$server->httpResponse = $httpResponse;

$server->addPlugin($caldav);

$caldav->httpGet($server->httpRequest, $server->httpResponse);

self::assertEquals(200, $httpResponse->status);
self::assertEquals(200, $httpResponse->getStatus());
self::assertEquals([
'Content-Type' => ['application/xml'],
'ETag' => ['"1"'],
Expand All @@ -151,7 +151,7 @@ public function testGETPassthrough()
$server = new DAV\Server();
$caldav = new Plugin();

$httpResponse = new HTTP\ResponseMock();
$httpResponse = new HTTP\Response();
$server->httpResponse = $httpResponse;

$server->addPlugin($caldav);
Expand Down
Loading