diff options
author | Sean Molenaar <SMillerDev@users.noreply.github.com> | 2018-03-27 15:35:06 +0200 |
---|---|---|
committer | Bernhard Posselt <BernhardPosselt@users.noreply.github.com> | 2018-03-27 15:35:06 +0200 |
commit | 5b94705cf3918dc7986c6043b1fbe776bf22958f (patch) | |
tree | 4e8059818a0a913d24938e35238913a721fa6373 /lib/Db/Mysql | |
parent | f3c9d13551cef5968baea99c2f25085baee0ed5f (diff) |
Core: Fix compatibility with nextcloud codestyle (#280)
Diffstat (limited to 'lib/Db/Mysql')
-rw-r--r-- | lib/Db/Mysql/ItemMapper.php | 21 |
1 files changed, 13 insertions, 8 deletions
diff --git a/lib/Db/Mysql/ItemMapper.php b/lib/Db/Mysql/ItemMapper.php index ad373eafb..4244faedb 100644 --- a/lib/Db/Mysql/ItemMapper.php +++ b/lib/Db/Mysql/ItemMapper.php @@ -5,10 +5,10 @@ * This file is licensed under the Affero General Public License version 3 or * later. See the COPYING file. * - * @author Alessandro Cosentino <cosenal@gmail.com> - * @author Bernhard Posselt <dev@bernhard-posselt.com> - * @copyright Alessandro Cosentino 2012 - * @copyright Bernhard Posselt 2012, 2014 + * @author Alessandro Cosentino <cosenal@gmail.com> + * @author Bernhard Posselt <dev@bernhard-posselt.com> + * @copyright 2012 Alessandro Cosentino + * @copyright 2012-2014 Bernhard Posselt */ namespace OCA\News\Db\Mysql; @@ -16,9 +16,11 @@ namespace OCA\News\Db\Mysql; use OCA\News\Utility\Time; use OCP\IDBConnection; -class ItemMapper extends \OCA\News\Db\ItemMapper { +class ItemMapper extends \OCA\News\Db\ItemMapper +{ - public function __construct(IDBConnection $db, Time $time){ + public function __construct(IDBConnection $db, Time $time) + { parent::__construct($db, $time); } @@ -26,9 +28,11 @@ class ItemMapper extends \OCA\News\Db\ItemMapper { /** * Delete all items for feeds that have over $threshold unread and not * starred items + * * @param int $threshold the number of items that should be deleted */ - public function deleteReadOlderThanThreshold($threshold){ + public function deleteReadOlderThanThreshold($threshold) + { $sql = 'SELECT (COUNT(*) - `feeds`.`articles_per_update`) AS `size`, ' . '`feeds`.`id` AS `feed_id`, `feeds`.`articles_per_update` ' . 'FROM `*PREFIX*news_items` `items` ' . @@ -62,7 +66,8 @@ class ItemMapper extends \OCA\News\Db\ItemMapper { } - public function readItem($itemId, $isRead, $lastModified, $userId) { + public function readItem($itemId, $isRead, $lastModified, $userId) + { $item = $this->find($itemId, $userId); if ($isRead) { |