diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-04-23 15:34:04 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-04-23 15:36:01 +0200 |
commit | 4ba6f4839d40cea3360637b236eba9371fa390f2 (patch) | |
tree | b4cf9423e31c6ef952c0bf85555d51669ab9daf6 /lib | |
parent | e77d89fc4b8801ff426f3759438cae548d3efcc4 (diff) | |
download | nextcloud-server-4ba6f4839d40cea3360637b236eba9371fa390f2.tar.gz nextcloud-server-4ba6f4839d40cea3360637b236eba9371fa390f2.zip |
fixing typos and PHPDoc
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/connector/sabre/directory.php | 6 | ||||
-rw-r--r-- | lib/private/connector/sabre/file.php | 6 | ||||
-rw-r--r-- | lib/private/connector/sabre/node.php | 3 | ||||
-rw-r--r-- | lib/private/connector/sabre/objecttree.php | 10 | ||||
-rw-r--r-- | lib/private/connector/sabre/quotaplugin.php | 5 |
5 files changed, 22 insertions, 8 deletions
diff --git a/lib/private/connector/sabre/directory.php b/lib/private/connector/sabre/directory.php index 5a2145c8aab..545c1f95ac7 100644 --- a/lib/private/connector/sabre/directory.php +++ b/lib/private/connector/sabre/directory.php @@ -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) { diff --git a/lib/private/connector/sabre/file.php b/lib/private/connector/sabre/file.php index a9de41adf4d..641c69dd1ff 100644 --- a/lib/private/connector/sabre/file.php +++ b/lib/private/connector/sabre/file.php @@ -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) { diff --git a/lib/private/connector/sabre/node.php b/lib/private/connector/sabre/node.php index 55e626c4c85..eede39cba8b 100644 --- a/lib/private/connector/sabre/node.php +++ b/lib/private/connector/sabre/node.php @@ -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) { diff --git a/lib/private/connector/sabre/objecttree.php b/lib/private/connector/sabre/objecttree.php index fa122858786..71a35e87ee4 100644 --- a/lib/private/connector/sabre/objecttree.php +++ b/lib/private/connector/sabre/objecttree.php @@ -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); } } diff --git a/lib/private/connector/sabre/quotaplugin.php b/lib/private/connector/sabre/quotaplugin.php index 78d3172725a..1e73e1645c3 100644 --- a/lib/private/connector/sabre/quotaplugin.php +++ b/lib/private/connector/sabre/quotaplugin.php @@ -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(); } |