[Pkg-owncloud-commits] [php-sabredav] 75/220: Lots of docblock fixes.
David Prévot
taffit at moszumanska.debian.org
Thu May 12 01:21:09 UTC 2016
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch master
in repository php-sabredav.
commit c0cffca703e25ab4878ba984862bb3612077d256
Author: Evert Pot <me at evertpot.com>
Date: Sun Feb 28 14:58:45 2016 -0500
Lots of docblock fixes.
Closes #781
---
lib/CalDAV/Backend/BackendInterface.php | 4 +++-
lib/CalDAV/Calendar.php | 2 +-
lib/CalDAV/Subscriptions/Subscription.php | 2 +-
lib/CardDAV/Backend/BackendInterface.php | 7 +++++--
lib/DAV/File.php | 18 +++++++++++++++---
lib/DAV/ICollection.php | 4 ++--
lib/DAV/IFile.php | 2 +-
lib/DAV/INode.php | 5 +++--
lib/DAVACL/AbstractPrincipalCollection.php | 2 +-
lib/DAVACL/FS/Collection.php | 4 ++--
lib/DAVACL/FS/HomeCollection.php | 2 +-
11 files changed, 35 insertions(+), 17 deletions(-)
diff --git a/lib/CalDAV/Backend/BackendInterface.php b/lib/CalDAV/Backend/BackendInterface.php
index 7513fb6..3684c77 100644
--- a/lib/CalDAV/Backend/BackendInterface.php
+++ b/lib/CalDAV/Backend/BackendInterface.php
@@ -44,10 +44,12 @@ interface BackendInterface {
* If the creation was a success, an id must be returned that can be used to
* reference this calendar in other methods, such as updateCalendar.
*
+ * The id can be any type, including ints, strings, objects or array.
+ *
* @param string $principalUri
* @param string $calendarUri
* @param array $properties
- * @return void
+ * @return mixed
*/
function createCalendar($principalUri, $calendarUri, array $properties);
diff --git a/lib/CalDAV/Calendar.php b/lib/CalDAV/Calendar.php
index ff8e19b..96f976d 100644
--- a/lib/CalDAV/Calendar.php
+++ b/lib/CalDAV/Calendar.php
@@ -227,7 +227,7 @@ class Calendar implements ICalendar, DAV\IProperties, DAV\Sync\ISyncCollection,
/**
* Returns the last modification date as a unix timestamp.
*
- * @return void
+ * @return null
*/
function getLastModified() {
diff --git a/lib/CalDAV/Subscriptions/Subscription.php b/lib/CalDAV/Subscriptions/Subscription.php
index ee53da2..1e4848c 100644
--- a/lib/CalDAV/Subscriptions/Subscription.php
+++ b/lib/CalDAV/Subscriptions/Subscription.php
@@ -144,7 +144,7 @@ class Subscription extends Collection implements ISubscription, IACL {
* The Server class will filter out the extra.
*
* @param array $properties
- * @return void
+ * @return array
*/
function getProperties($properties) {
diff --git a/lib/CardDAV/Backend/BackendInterface.php b/lib/CardDAV/Backend/BackendInterface.php
index b9691b9..54e42b8 100644
--- a/lib/CardDAV/Backend/BackendInterface.php
+++ b/lib/CardDAV/Backend/BackendInterface.php
@@ -55,12 +55,15 @@ interface BackendInterface {
function updateAddressBook($addressBookId, \Sabre\DAV\PropPatch $propPatch);
/**
- * Creates a new address book
+ * Creates a new address book.
+ *
+ * This method should return the id of the new address book. The id can be
+ * in any format, including ints, strings, arrays or objects.
*
* @param string $principalUri
* @param string $url Just the 'basename' of the url.
* @param array $properties
- * @return void
+ * @return mixed
*/
function createAddressBook($principalUri, $url, array $properties);
diff --git a/lib/DAV/File.php b/lib/DAV/File.php
index 0a4468b..675956b 100644
--- a/lib/DAV/File.php
+++ b/lib/DAV/File.php
@@ -15,12 +15,24 @@ namespace Sabre\DAV;
abstract class File extends Node implements IFile {
/**
- * Updates the data
+ * Replaces the contents of the file.
*
- * data is a readable stream resource.
+ * The data argument is a readable stream resource.
+ *
+ * After a succesful put operation, you may choose to return an ETag. The
+ * etag must always be surrounded by double-quotes. These quotes must
+ * appear in the actual string you're returning.
+ *
+ * Clients may use the ETag from a PUT request to later on make sure that
+ * when they update the file, the contents haven't changed in the mean
+ * time.
+ *
+ * If you don't plan to store the file byte-by-byte, and you return a
+ * different object on a subsequent GET you are strongly recommended to not
+ * return an ETag, and just return null.
*
* @param string|resource $data
- * @return void
+ * @return string|null
*/
function put($data) {
diff --git a/lib/DAV/ICollection.php b/lib/DAV/ICollection.php
index 390d9b7..7793070 100644
--- a/lib/DAV/ICollection.php
+++ b/lib/DAV/ICollection.php
@@ -54,14 +54,14 @@ interface ICollection extends INode {
* exist.
*
* @param string $name
- * @return DAV\INode
+ * @return INode
*/
function getChild($name);
/**
* Returns an array with all the child nodes
*
- * @return DAV\INode[]
+ * @return INode[]
*/
function getChildren();
diff --git a/lib/DAV/IFile.php b/lib/DAV/IFile.php
index e16a3a5..37e7cd3 100644
--- a/lib/DAV/IFile.php
+++ b/lib/DAV/IFile.php
@@ -32,7 +32,7 @@ interface IFile extends INode {
* different object on a subsequent GET you are strongly recommended to not
* return an ETag, and just return null.
*
- * @param resource $data
+ * @param resource|data $data
* @return string|null
*/
function put($data);
diff --git a/lib/DAV/INode.php b/lib/DAV/INode.php
index b5e6cb9..bb88493 100644
--- a/lib/DAV/INode.php
+++ b/lib/DAV/INode.php
@@ -36,9 +36,10 @@ interface INode {
function setName($name);
/**
- * Returns the last modification time, as a unix timestamp
+ * Returns the last modification time, as a unix timestamp. Return null
+ * if the information is not available.
*
- * @return int
+ * @return int|null
*/
function getLastModified();
diff --git a/lib/DAVACL/AbstractPrincipalCollection.php b/lib/DAVACL/AbstractPrincipalCollection.php
index 460f789..9d20263 100644
--- a/lib/DAVACL/AbstractPrincipalCollection.php
+++ b/lib/DAVACL/AbstractPrincipalCollection.php
@@ -110,7 +110,7 @@ abstract class AbstractPrincipalCollection extends DAV\Collection implements IPr
*
* @param string $name
* @throws DAV\Exception\NotFound
- * @return IPrincipal
+ * @return DAV\INode
*/
function getChild($name) {
diff --git a/lib/DAVACL/FS/Collection.php b/lib/DAVACL/FS/Collection.php
index 5fab476..7b78aef 100644
--- a/lib/DAVACL/FS/Collection.php
+++ b/lib/DAVACL/FS/Collection.php
@@ -52,8 +52,8 @@ class Collection extends BaseCollection implements IACL {
* exist.
*
* @param string $name
- * @throws DAV\Exception\NotFound
- * @return DAV\INode
+ * @throws NotFound
+ * @return \Sabre\DAV\INode
*/
function getChild($name) {
diff --git a/lib/DAVACL/FS/HomeCollection.php b/lib/DAVACL/FS/HomeCollection.php
index c276167..dc56129 100644
--- a/lib/DAVACL/FS/HomeCollection.php
+++ b/lib/DAVACL/FS/HomeCollection.php
@@ -70,7 +70,7 @@ class HomeCollection extends AbstractPrincipalCollection implements IACL {
* supplied by the authentication backend.
*
* @param array $principalInfo
- * @return void
+ * @return \Sabre\DAVACL\INode
*/
function getChildForPrincipal(array $principalInfo) {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-php/php-sabredav.git
More information about the Pkg-owncloud-commits
mailing list