aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/FileInfo.php
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2017-03-23 17:52:47 +0100
committerJoas Schilling <coding@schilljs.com>2017-03-23 17:52:47 +0100
commit88015bc51f2be457f5f49fcb8230784678a5d755 (patch)
treeff012d71876cfa9b4c0cd1bb7acc9fc058b37ccc /lib/private/Files/FileInfo.php
parent5c7079f8c67ff1c8153275ff1eb49d04c05fb808 (diff)
downloadnextcloud-server-88015bc51f2be457f5f49fcb8230784678a5d755.tar.gz
nextcloud-server-88015bc51f2be457f5f49fcb8230784678a5d755.zip
Fix type hints and doc blocks
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/private/Files/FileInfo.php')
-rw-r--r--lib/private/Files/FileInfo.php14
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/private/Files/FileInfo.php b/lib/private/Files/FileInfo.php
index a0a3b0a782a..8e968ca453d 100644
--- a/lib/private/Files/FileInfo.php
+++ b/lib/private/Files/FileInfo.php
@@ -150,10 +150,10 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess {
/**
* Get FileInfo ID or null in case of part file
*
- * @return int/null
+ * @return int|null
*/
public function getId() {
- return isset($this->data['fileid']) ? intval($this->data['fileid']) : null;
+ return isset($this->data['fileid']) ? (int) $this->data['fileid'] : null;
}
/**
@@ -195,7 +195,7 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess {
*/
public function getSize() {
$this->updateEntryfromSubMounts();
- return isset($this->data['size']) ? intval($this->data['size']) : 0;
+ return isset($this->data['size']) ? (int) $this->data['size'] : 0;
}
/**
@@ -203,7 +203,7 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess {
*/
public function getMTime() {
$this->updateEntryfromSubMounts();
- return intval($this->data['mtime']);
+ return (int) $this->data['mtime'];
}
/**
@@ -219,18 +219,18 @@ class FileInfo implements \OCP\Files\FileInfo, \ArrayAccess {
* @return int
*/
public function getEncryptedVersion() {
- return isset($this->data['encryptedVersion']) ? intval($this->data['encryptedVersion']) : 1;
+ return isset($this->data['encryptedVersion']) ? (int) $this->data['encryptedVersion'] : 1;
}
/**
* @return int
*/
public function getPermissions() {
- $perms = $this->data['permissions'];
+ $perms = (int) $this->data['permissions'];
if (\OCP\Util::isSharingDisabledForUser() || ($this->isShared() && !\OC\Share\Share::isResharingAllowed())) {
$perms = $perms & ~\OCP\Constants::PERMISSION_SHARE;
}
- return intval($perms);
+ return (int) $perms;
}
/**