From 580c3f4ffe9608d2beb56d418c68b3b112420e76 Mon Sep 17 00:00:00 2001 From: Mario Date: Sun, 10 Nov 2019 12:49:51 +0000 Subject: another bulk of composer updates (cherry picked from commit 6685381fd8db507493c3d7c1793f8c05c681bbce) --- vendor/sabre/dav/tests/Sabre/DAV/Mock/File.php | 84 +++++++++++--------------- 1 file changed, 36 insertions(+), 48 deletions(-) (limited to 'vendor/sabre/dav/tests/Sabre/DAV/Mock/File.php') diff --git a/vendor/sabre/dav/tests/Sabre/DAV/Mock/File.php b/vendor/sabre/dav/tests/Sabre/DAV/Mock/File.php index a624b6b6b..d48ddaa92 100644 --- a/vendor/sabre/dav/tests/Sabre/DAV/Mock/File.php +++ b/vendor/sabre/dav/tests/Sabre/DAV/Mock/File.php @@ -1,11 +1,13 @@ name = $name; $this->put($contents); $this->parent = $parent; - if ($lastModified === -1) { + if (-1 === $lastModified) { $lastModified = time(); } $this->lastModified = $lastModified; - } /** @@ -50,26 +50,23 @@ class File extends DAV\File { * * @return string */ - function getName() { - + public function getName() + { return $this->name; - } /** * Changes the name of the node. * * @param string $name - * @return void */ - function setName($name) { - + public function setName($name) + { $this->name = $name; - } /** - * Updates the data + * Updates the data. * * The data argument is a readable stream resource. * @@ -86,66 +83,59 @@ class File extends DAV\File { * return an ETag, and just return null. * * @param resource $data + * * @return string|null */ - function put($data) { - + public function put($data) + { if (is_resource($data)) { $data = stream_get_contents($data); } $this->contents = $data; - return '"' . md5($data) . '"'; + return '"'.md5($data).'"'; } /** - * Returns the data + * Returns the data. * * This method may either return a string or a readable stream resource * * @return mixed */ - function get() { - + public function get() + { return $this->contents; - } /** - * Returns the ETag for a file + * Returns the ETag for a file. * * An ETag is a unique identifier representing the current version of the file. If the file changes, the ETag MUST change. * * Return null if the ETag can not effectively be determined - * - * @return void */ - function getETag() { - - return '"' . md5($this->contents) . '"'; - + public function getETag() + { + return '"'.md5($this->contents).'"'; } /** - * Returns the size of the node, in bytes + * Returns the size of the node, in bytes. * * @return int */ - function getSize() { - + public function getSize() + { return strlen($this->contents); - } /** - * Delete the node - * - * @return void + * Delete the node. */ - function delete() { - + public function delete() + { $this->parent->deleteChild($this->name); - } /** @@ -154,10 +144,8 @@ class File extends DAV\File { * * @return int */ - function getLastModified() { - + public function getLastModified() + { return $this->lastModified; - } - } -- cgit v1.2.3