[Pkg-owncloud-commits] [php-sabredav] 14/42: Fixes suggested by SensioLabsInsight :)
David Prévot
taffit at moszumanska.debian.org
Wed Oct 29 20:52:05 UTC 2014
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository php-sabredav.
commit 2342adae5fc3975b8fba4c3e10471b10c53c0ef8
Author: Evert Pot <evert at rooftopsolutions.nl>
Date: Mon Oct 6 18:59:30 2014 -0400
Fixes suggested by SensioLabsInsight :)
---
lib/CalDAV/CalendarQueryParser.php | 2 --
lib/CalDAV/Notifications/Plugin.php | 1 -
lib/CalDAV/Plugin.php | 2 +-
lib/CalDAV/Schedule/Plugin.php | 1 -
lib/CalDAV/SharedCalendar.php | 2 --
lib/CardDAV/AddressBookQueryParser.php | 2 --
lib/CardDAV/Backend/PDO.php | 2 +-
lib/DAV/Auth/Backend/BasicCallBack.php | 1 -
lib/DAV/Browser/Plugin.php | 2 +-
lib/DAV/Client.php | 7 -------
lib/DAV/Locks/Plugin.php | 2 --
lib/DAV/Property/GetLastModified.php | 1 -
lib/DAV/Server.php | 5 +----
lib/DAV/Tree.php | 2 +-
lib/DAV/UUIDUtil.php | 2 +-
lib/DAVACL/Plugin.php | 5 ++---
16 files changed, 8 insertions(+), 31 deletions(-)
diff --git a/lib/CalDAV/CalendarQueryParser.php b/lib/CalDAV/CalendarQueryParser.php
index 4df15d3..f1042fd 100644
--- a/lib/CalDAV/CalendarQueryParser.php
+++ b/lib/CalDAV/CalendarQueryParser.php
@@ -80,8 +80,6 @@ class CalendarQueryParser {
*/
function parse() {
- $filterNode = null;
-
$filter = $this->xpath->query('/cal:calendar-query/cal:filter');
if ($filter->length !== 1) {
throw new \Sabre\DAV\Exception\BadRequest('Only one filter element is allowed');
diff --git a/lib/CalDAV/Notifications/Plugin.php b/lib/CalDAV/Notifications/Plugin.php
index cd52719..d80d018 100644
--- a/lib/CalDAV/Notifications/Plugin.php
+++ b/lib/CalDAV/Notifications/Plugin.php
@@ -96,7 +96,6 @@ class Plugin extends ServerPlugin {
// notification-URL property
$propFind->handle('{' . self::NS_CALENDARSERVER . '}notification-URL', function() use ($node, $principalUrl, $caldavPlugin) {
- $principalId = $node->getName();
$notificationPath = $caldavPlugin->getCalendarHomeForPrincipal($principalUrl) . '/notifications/';
return new DAV\Property\Href($notificationPath);
diff --git a/lib/CalDAV/Plugin.php b/lib/CalDAV/Plugin.php
index 45ceabe..754aa7b 100644
--- a/lib/CalDAV/Plugin.php
+++ b/lib/CalDAV/Plugin.php
@@ -786,7 +786,7 @@ class Plugin extends DAV\ServerPlugin {
$sCCS = '{urn:ietf:params:xml:ns:caldav}supported-calendar-component-set';
// Get the Supported Components for the target calendar
- list($parentPath,$object) = URLUtil::splitPath($path);
+ list($parentPath) = URLUtil::splitPath($path);
$calendarProperties = $this->server->getProperties($parentPath, [$sCCS]);
if (isset($calendarProperties[$sCCS])) {
diff --git a/lib/CalDAV/Schedule/Plugin.php b/lib/CalDAV/Schedule/Plugin.php
index 62ed01c..3d497da 100644
--- a/lib/CalDAV/Schedule/Plugin.php
+++ b/lib/CalDAV/Schedule/Plugin.php
@@ -6,7 +6,6 @@ use
Sabre\DAV\Server,
Sabre\DAV\ServerPlugin,
Sabre\DAV\Property\Href,
- Sabre\DAV\Property\HrefList,
Sabre\DAV\PropFind,
Sabre\DAV\INode,
Sabre\DAV\IFile,
diff --git a/lib/CalDAV/SharedCalendar.php b/lib/CalDAV/SharedCalendar.php
index 44c105a..2f53863 100644
--- a/lib/CalDAV/SharedCalendar.php
+++ b/lib/CalDAV/SharedCalendar.php
@@ -2,8 +2,6 @@
namespace Sabre\CalDAV;
-use Sabre\DAVACL;
-
/**
* This object represents a CalDAV calendar that is shared by a different user.
*
diff --git a/lib/CardDAV/AddressBookQueryParser.php b/lib/CardDAV/AddressBookQueryParser.php
index 500591f..d8d1635 100644
--- a/lib/CardDAV/AddressBookQueryParser.php
+++ b/lib/CardDAV/AddressBookQueryParser.php
@@ -84,8 +84,6 @@ class AddressBookQueryParser {
*/
function parse() {
- $filterNode = null;
-
$limit = $this->xpath->evaluate('number(/card:addressbook-query/card:limit/card:nresults)');
if (is_nan($limit)) $limit = null;
diff --git a/lib/CardDAV/Backend/PDO.php b/lib/CardDAV/Backend/PDO.php
index 81f3355..b114248 100644
--- a/lib/CardDAV/Backend/PDO.php
+++ b/lib/CardDAV/Backend/PDO.php
@@ -332,7 +332,7 @@ class PDO extends AbstractBackend implements SyncSupport {
$etag = md5($cardData);
- $result = $stmt->execute([
+ $stmt->execute([
$cardData,
$cardUri,
time(),
diff --git a/lib/DAV/Auth/Backend/BasicCallBack.php b/lib/DAV/Auth/Backend/BasicCallBack.php
index 50763e1..064ef91 100644
--- a/lib/DAV/Auth/Backend/BasicCallBack.php
+++ b/lib/DAV/Auth/Backend/BasicCallBack.php
@@ -3,7 +3,6 @@
namespace Sabre\DAV\Auth\Backend;
use Sabre\DAV;
-use Sabre\HTTP;
/**
* Extremely simply HTTP Basic auth backend.
diff --git a/lib/DAV/Browser/Plugin.php b/lib/DAV/Browser/Plugin.php
index c579dca..d488a01 100644
--- a/lib/DAV/Browser/Plugin.php
+++ b/lib/DAV/Browser/Plugin.php
@@ -88,7 +88,7 @@ class Plugin extends DAV\ServerPlugin {
}
try {
- $node = $this->server->tree->getNodeForPath($request->getPath());
+ $this->server->tree->getNodeForPath($request->getPath());
} catch (DAV\Exception\NotFound $e) {
// We're simply stopping when the file isn't found to not interfere
// with other plugins.
diff --git a/lib/DAV/Client.php b/lib/DAV/Client.php
index 850c54a..d4af1d1 100644
--- a/lib/DAV/Client.php
+++ b/lib/DAV/Client.php
@@ -99,13 +99,6 @@ class Client extends HTTP\Client {
throw new \InvalidArgumentException('A baseUri must be provided');
}
- $validSettings = [
- 'baseUri',
- 'userName',
- 'password',
- 'proxy',
- ];
-
parent::__construct();
$this->baseUri = $settings['baseUri'];
diff --git a/lib/DAV/Locks/Plugin.php b/lib/DAV/Locks/Plugin.php
index 01ffa86..b5604aa 100644
--- a/lib/DAV/Locks/Plugin.php
+++ b/lib/DAV/Locks/Plugin.php
@@ -176,8 +176,6 @@ class Plugin extends DAV\ServerPlugin {
*/
function httpLock(RequestInterface $request, ResponseInterface $response) {
- $lastLock = null;
-
$uri = $request->getPath();
$existingLocks = $this->getLocks($uri);
diff --git a/lib/DAV/Property/GetLastModified.php b/lib/DAV/Property/GetLastModified.php
index 4fc9586..21603b9 100644
--- a/lib/DAV/Property/GetLastModified.php
+++ b/lib/DAV/Property/GetLastModified.php
@@ -56,7 +56,6 @@ class GetLastModified extends DAV\Property {
*/
function serialize(DAV\Server $server, \DOMElement $prop) {
- $doc = $prop->ownerDocument;
//$prop->setAttribute('xmlns:b','urn:uuid:c2f41010-65b3-11d1-a29f-00aa00c14882/');
//$prop->setAttribute('b:dt','dateTime.rfc1123');
$prop->nodeValue = HTTP\Util::toHTTPDate($this->time);
diff --git a/lib/DAV/Server.php b/lib/DAV/Server.php
index 0036ad3..2f40cee 100644
--- a/lib/DAV/Server.php
+++ b/lib/DAV/Server.php
@@ -771,7 +771,7 @@ class Server extends EventEmitter {
// These are the three relevant properties we need to return
return [
'destination' => $destination,
- 'destinationExists' => $destinationNode==true,
+ 'destinationExists' => !!$destinationNode,
'destinationNode' => $destinationNode,
];
@@ -917,9 +917,6 @@ class Server extends EventEmitter {
$propFind = new PropFind($path, $propertyNames, $depth, $propFindType);
$parentNode = $this->tree->getNodeForPath($path);
- $nodes = [
- $path => $parentNode
- ];
$propFindRequests = [[
$propFind,
diff --git a/lib/DAV/Tree.php b/lib/DAV/Tree.php
index 06022eb..7ac047d 100644
--- a/lib/DAV/Tree.php
+++ b/lib/DAV/Tree.php
@@ -142,7 +142,7 @@ class Tree {
*/
function move($sourcePath, $destinationPath) {
- list($sourceDir, $sourceName) = URLUtil::splitPath($sourcePath);
+ list($sourceDir) = URLUtil::splitPath($sourcePath);
list($destinationDir, $destinationName) = URLUtil::splitPath($destinationPath);
if ($sourceDir===$destinationDir) {
diff --git a/lib/DAV/UUIDUtil.php b/lib/DAV/UUIDUtil.php
index 6a904a7..43b75e9 100644
--- a/lib/DAV/UUIDUtil.php
+++ b/lib/DAV/UUIDUtil.php
@@ -57,7 +57,7 @@ class UUIDUtil {
return preg_match(
'/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/i',
$uuid
- ) == true;
+ ) !== false;
}
diff --git a/lib/DAVACL/Plugin.php b/lib/DAVACL/Plugin.php
index 32324bf..27e8a31 100644
--- a/lib/DAVACL/Plugin.php
+++ b/lib/DAVACL/Plugin.php
@@ -4,7 +4,6 @@ namespace Sabre\DAVACL;
use
Sabre\DAV,
- Sabre\DAV\IFile,
Sabre\DAV\INode,
Sabre\HTTP\URLUtil,
Sabre\HTTP\RequestInterface,
@@ -821,7 +820,7 @@ class Plugin extends DAV\ServerPlugin {
*/
function beforeBind($uri) {
- list($parentUri,$nodeName) = URLUtil::splitPath($uri);
+ list($parentUri) = URLUtil::splitPath($uri);
$this->checkPrivileges($parentUri,'{DAV:}bind');
}
@@ -837,7 +836,7 @@ class Plugin extends DAV\ServerPlugin {
*/
function beforeUnbind($uri) {
- list($parentUri,$nodeName) = URLUtil::splitPath($uri);
+ list($parentUri) = URLUtil::splitPath($uri);
$this->checkPrivileges($parentUri,'{DAV:}unbind',self::R_RECURSIVEPARENTS);
}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/php-sabredav.git
More information about the Pkg-owncloud-commits
mailing list