aboutsummaryrefslogtreecommitdiff
path: root/app/Models
diff options
context:
space:
mode:
authorGravatar Frans de Jonge <fransdejonge@gmail.com> 2022-01-05 00:52:24 +0100
committerGravatar GitHub <noreply@github.com> 2022-01-05 00:52:24 +0100
commitd339b6dd454d814ffc323fa9077b70e33339c479 (patch)
treebf82e2b4beda3958502465ef76c223175a978afd /app/Models
parenta6ea90e58b807d18fff601135e3e697b38895ca1 (diff)
[CI] PHPCS: check for opening brace on same line (#4122)
* [CI] PHPCS: check for opening brace on same line * make fix-all * Minor comments Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Diffstat (limited to 'app/Models')
-rw-r--r--app/Models/EntryDAO.php10
-rw-r--r--app/Models/Feed.php5
-rw-r--r--app/Models/FeedDAO.php10
3 files changed, 20 insertions, 5 deletions
diff --git a/app/Models/EntryDAO.php b/app/Models/EntryDAO.php
index ff5777bb0..4b781d5db 100644
--- a/app/Models/EntryDAO.php
+++ b/app/Models/EntryDAO.php
@@ -580,7 +580,10 @@ SQL;
return $affected;
}
- public function cleanOldEntries($id_feed, $options = []) { //Remember to call updateCachedValue($id_feed) or updateCachedValues() just after
+ /**
+ * Remember to call updateCachedValue($id_feed) or updateCachedValues() just after.
+ */
+ public function cleanOldEntries($id_feed, $options = []) {
$sql = 'DELETE FROM `_entry` WHERE id_feed = :id_feed1'; //No alias for MySQL / MariaDB
$params = [];
$params[':id_feed1'] = $id_feed;
@@ -1085,8 +1088,11 @@ SQL;
}
}
+ /**
+ * For API
+ */
public function listIdsWhere($type = 'a', $id = '', $state = FreshRSS_Entry::STATE_ALL,
- $order = 'DESC', $limit = 1, $firstId = '', $filters = null) { //For API
+ $order = 'DESC', $limit = 1, $firstId = '', $filters = null) {
list($values, $sql) = $this->sqlListWhere($type, $id, $state, $order, $limit, $firstId, $filters);
$stm = $this->pdo->prepare($sql);
diff --git a/app/Models/Feed.php b/app/Models/Feed.php
index 972983384..781553ca7 100644
--- a/app/Models/Feed.php
+++ b/app/Models/Feed.php
@@ -496,7 +496,10 @@ class FreshRSS_Feed extends Minz_Model {
}
}
- public function cleanOldEntries() { //Remember to call updateCachedValue($id_feed) or updateCachedValues() just after
+ /**
+ * Remember to call updateCachedValue($id_feed) or updateCachedValues() just after
+ */
+ public function cleanOldEntries() {
$archiving = $this->attributes('archiving');
if ($archiving == null) {
$catDAO = FreshRSS_Factory::createCategoryDao();
diff --git a/app/Models/FeedDAO.php b/app/Models/FeedDAO.php
index 150bbe921..b47f06b42 100644
--- a/app/Models/FeedDAO.php
+++ b/app/Models/FeedDAO.php
@@ -174,7 +174,10 @@ class FreshRSS_FeedDAO extends Minz_ModelPdo implements FreshRSS_Searchable {
return false;
}
- public function updateLastUpdate($id, $inError = false, $mtime = 0) { //See also updateCachedValue()
+ /**
+ * @see updateCachedValue()
+ */
+ public function updateLastUpdate($id, $inError = false, $mtime = 0) {
$sql = 'UPDATE `_feed` SET `lastUpdate`=?, error=? WHERE id=?';
$values = array(
$mtime <= 0 ? time() : $mtime,
@@ -321,7 +324,10 @@ SQL;
return $newestItemUsec;
}
- public function arrayFeedCategoryNames() { //For API
+ /**
+ * For API
+ */
+ public function arrayFeedCategoryNames() {
$sql = <<<'SQL'
SELECT f.id, f.name, c.name as c_name FROM `_feed` f
INNER JOIN `_category` c ON c.id = f.category