aboutsummaryrefslogtreecommitdiff
path: root/lib/models/FileRef.php
diff options
context:
space:
mode:
authorJan-Hendrik Willms <tleilax+github@gmail.com>2023-05-08 17:08:52 +0200
committerJan-Hendrik Willms <tleilax+github@gmail.com>2023-05-08 17:08:52 +0200
commita1fda2758e9c241ac3eb980ac8716dfedbe9dd3c (patch)
tree2190f0478fb153efdb8ba48ebb574c7691f4f351 /lib/models/FileRef.php
parent244d00ed91ad2b4b83e902a45cd6def3d7bc7e86 (diff)
let phpcsfixer fix errors according to @PSR12 rules on lib/modelsphpcsfixer
Diffstat (limited to 'lib/models/FileRef.php')
-rw-r--r--lib/models/FileRef.php9
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/models/FileRef.php b/lib/models/FileRef.php
index f440d50..4c2dae3 100644
--- a/lib/models/FileRef.php
+++ b/lib/models/FileRef.php
@@ -124,7 +124,8 @@ class FileRef extends SimpleORMap implements PrivacyObject, FeedbackRange
* If you set download URL to null, the normal sendfile.php will be set as default download URL.
* @param $url : string as URL or null to set URL to sendfile.php-URL
*/
- public function setDownloadURL($field, $url) {
+ public function setDownloadURL($field, $url)
+ {
$this->download_url = $url;
}
@@ -167,7 +168,7 @@ class FileRef extends SimpleORMap implements PrivacyObject, FeedbackRange
$link[] = 'sendfile.php';
if ($dltype == 'zip') {
$params['zip'] = 1;
- } elseif (in_array($dltype, ['force_download', 'force'])) {
+ } elseif (in_array($dltype, ['force_download', 'force'])) {
$params['force_download'] = 1;
}
$params['type'] = $type;
@@ -193,7 +194,7 @@ class FileRef extends SimpleORMap implements PrivacyObject, FeedbackRange
/**
* Returns true if the file is accessible
*/
- public function getAccessibility() : bool
+ public function getAccessibility(): bool
{
return (bool) $this->file->is_accessible;
}
@@ -207,7 +208,7 @@ class FileRef extends SimpleORMap implements PrivacyObject, FeedbackRange
{
$this->downloads += 1;
if (!$this->isNew()) {
- $where_query = join(' AND ' , $this->getWhereQuery());
+ $where_query = join(' AND ', $this->getWhereQuery());
$query = "UPDATE `{$this->db_table()}`
SET `downloads` = `downloads` + 1
WHERE {$where_query}";