}
/**
- * @return int
+ * Get FileInfo ID or null in case of part file
+ *
+ * @return int/null
*/
public function getId() {
- return $this->data['fileid'];
+ return isset($this->data['fileid']) ? intval($this->data['fileid']) : null;
}
/**
*/
public function getSize() {
$this->updateEntryfromSubMounts();
- return isset($this->data['size']) ? $this->data['size'] : 0;
+ return isset($this->data['size']) ? intval($this->data['size']) : 0;
}
/**
*/
public function getMTime() {
$this->updateEntryfromSubMounts();
- return $this->data['mtime'];
+ return intval($this->data['mtime']);
}
/**
* @return int
*/
public function getEncryptedVersion() {
- return isset($this->data['encryptedVersion']) ? (int) $this->data['encryptedVersion'] : 1;
+ return isset($this->data['encryptedVersion']) ? intval($this->data['encryptedVersion']) : 1;
}
/**
if (\OCP\Util::isSharingDisabledForUser() || ($this->isShared() && !\OC\Share\Share::isResharingAllowed())) {
$perms = $perms & ~\OCP\Constants::PERMISSION_SHARE;
}
- return $perms;
+ return intval($perms);
}
/**