fixing typos and PHPDoc

This commit is contained in:
Thomas Müller 2014-04-23 15:34:04 +02:00
parent e77d89fc4b
commit 4ba6f4839d
5 changed files with 22 additions and 8 deletions

View File

@ -29,7 +29,7 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa
* Data will either be supplied as a stream resource, or in certain cases
* as a string. Keep in mind that you may have to support either.
*
* After succesful creation of the file, you may choose to return the ETag
* After successful creation of the file, you may choose to return the ETag
* of the new file here.
*
* The returned ETag must be surrounded by double-quotes (The quotes should
@ -55,7 +55,7 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa
}
// for chunked upload also updating a existing file is a "createFile"
// because we create all the chunks before reasamble them to the existing file.
// because we create all the chunks before re-assemble them to the existing file.
if (isset($_SERVER['HTTP_OC_CHUNKED'])) {
// exit if we can't create a new file and we don't updatable existing file
@ -108,7 +108,7 @@ class OC_Connector_Sabre_Directory extends OC_Connector_Sabre_Node implements Sa
*
* @param string $name
* @param \OCP\Files\FileInfo $info
* @throws Sabre_DAV_Exception_FileNotFound
* @throws Sabre_DAV_Exception_NotFound
* @return Sabre_DAV_INode
*/
public function getChild($name, $info = null) {

View File

@ -42,6 +42,11 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D
*
* @param resource $data
* @throws Sabre_DAV_Exception_Forbidden
* @throws OC_Connector_Sabre_Exception_UnsupportedMediaType
* @throws Sabre_DAV_Exception_BadRequest
* @throws Sabre_DAV_Exception
* @throws OC_Connector_Sabre_Exception_EntityTooLarge
* @throws Sabre_DAV_Exception_ServiceUnavailable
* @return string|null
*/
public function put($data) {
@ -198,6 +203,7 @@ class OC_Connector_Sabre_File extends OC_Connector_Sabre_Node implements Sabre_D
/**
* @param resource $data
* @return null|string
*/
private function createFileChunked($data)
{

View File

@ -81,6 +81,8 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
/**
* @brief Renames the node
* @param string $name The new name
* @throws Sabre_DAV_Exception_BadRequest
* @throws Sabre_DAV_Exception_Forbidden
*/
public function setName($name) {
@ -138,6 +140,7 @@ abstract class OC_Connector_Sabre_Node implements Sabre_DAV_INode, Sabre_DAV_IPr
/**
* @brief Updates properties on this node,
* @see Sabre_DAV_IProperties::updateProperties
* @param array $properties
* @return boolean
*/
public function updateProperties($properties) {

View File

@ -39,6 +39,7 @@ class ObjectTree extends \Sabre_DAV_ObjectTree {
* Returns the INode object for the requested path
*
* @param string $path
* @throws \Sabre_DAV_Exception_ServiceUnavailable
* @throws \Sabre_DAV_Exception_NotFound
* @return \Sabre_DAV_INode
*/
@ -97,6 +98,8 @@ class ObjectTree extends \Sabre_DAV_ObjectTree {
*
* @param string $sourcePath The path to the file which should be moved
* @param string $destinationPath The full destination path, so not just the destination parent node
* @throws \Sabre_DAV_Exception_BadRequest
* @throws \Sabre_DAV_Exception_ServiceUnavailable
* @throws \Sabre_DAV_Exception_Forbidden
* @return int
*/
@ -160,6 +163,7 @@ class ObjectTree extends \Sabre_DAV_ObjectTree {
*
* @param string $source
* @param string $destination
* @throws \Sabre_DAV_Exception_ServiceUnavailable
* @return void
*/
public function copy($source, $destination) {
@ -173,10 +177,10 @@ class ObjectTree extends \Sabre_DAV_ObjectTree {
$this->fileView->mkdir($destination);
$dh = $this->fileView->opendir($source);
if (is_resource($dh)) {
while (($subnode = readdir($dh)) !== false) {
while (($subNode = readdir($dh)) !== false) {
if ($subnode == '.' || $subnode == '..') continue;
$this->copy($source . '/' . $subnode, $destination . '/' . $subnode);
if ($subNode == '.' || $subNode == '..') continue;
$this->copy($source . '/' . $subNode, $destination . '/' . $subNode);
}
}

View File

@ -50,8 +50,9 @@ class OC_Connector_Sabre_QuotaPlugin extends Sabre_DAV_ServerPlugin {
/**
* This method is called before any HTTP method and validates there is enough free space to store the file
*
* @throws Sabre_DAV_Exception
* @param string $uri
* @param null $data
* @throws Sabre_DAV_Exception_InsufficientStorage
* @return bool
*/
public function checkQuota($uri, $data = null) {
@ -65,7 +66,7 @@ class OC_Connector_Sabre_QuotaPlugin extends Sabre_DAV_ServerPlugin {
if ($req->getHeader('OC-Chunked')) {
$info = OC_FileChunking::decodeName($newName);
$chunkHandler = new OC_FileChunking($info);
// substract the already uploaded size to see whether
// subtract the already uploaded size to see whether
// there is still enough space for the remaining chunks
$length -= $chunkHandler->getCurrentSize();
}