diff options
author | Morris Jobke <hey@morrisjobke.de> | 2018-01-25 23:06:53 +0100 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2018-01-26 11:35:42 +0100 |
commit | c1e4f9f30563d5eda1718d716d631d6092cd4e28 (patch) | |
tree | 3bb7b6ef891cd80895d4c2c92252a4ccbc0c0cee /apps/dav/lib/Connector | |
parent | fe7e726ab228e6ddde7cf1442de9d0db193334a1 (diff) | |
download | nextcloud-server-c1e4f9f30563d5eda1718d716d631d6092cd4e28.tar.gz nextcloud-server-c1e4f9f30563d5eda1718d716d631d6092cd4e28.zip |
Use type casting instead of *val() method
It should be up to 6x faster
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
Diffstat (limited to 'apps/dav/lib/Connector')
-rw-r--r-- | apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php | 6 | ||||
-rw-r--r-- | apps/dav/lib/Connector/Sabre/Node.php | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php b/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php index ac625c3a9a4..58469d27205 100644 --- a/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php +++ b/apps/dav/lib/Connector/Sabre/CommentPropertiesPlugin.php @@ -97,7 +97,7 @@ class CommentPropertiesPlugin extends ServerPlugin { } $propFind->handle(self::PROPERTY_NAME_COUNT, function() use ($node) { - return $this->commentsManager->getNumberOfCommentsForObject('files', strval($node->getId())); + return $this->commentsManager->getNumberOfCommentsForObject('files', (string)$node->getId()); }); $propFind->handle(self::PROPERTY_NAME_HREF, function() use ($node) { @@ -153,9 +153,9 @@ class CommentPropertiesPlugin extends ServerPlugin { return null; } - $lastRead = $this->commentsManager->getReadMark('files', strval($node->getId()), $user); + $lastRead = $this->commentsManager->getReadMark('files', (string)$node->getId(), $user); - return $this->commentsManager->getNumberOfCommentsForObject('files', strval($node->getId()), $lastRead); + return $this->commentsManager->getNumberOfCommentsForObject('files', (string)$node->getId(), $lastRead); } } diff --git a/apps/dav/lib/Connector/Sabre/Node.php b/apps/dav/lib/Connector/Sabre/Node.php index b8a8209129c..fd237b604a9 100644 --- a/apps/dav/lib/Connector/Sabre/Node.php +++ b/apps/dav/lib/Connector/Sabre/Node.php @@ -369,7 +369,7 @@ abstract class Node implements \Sabre\DAV\INode { throw new \InvalidArgumentException('X-OC-MTime header must be an integer (unix timestamp).'); } - return intval($mtimeFromRequest); + return (int)$mtimeFromRequest; } } |