From 66c73a96ac2dda076bcfe0dc0a1ca2a7e169149d Mon Sep 17 00:00:00 2001 From: Bernhard Posselt Date: Tue, 21 Oct 2014 18:19:23 +0200 Subject: first try to set indention limit at 80 characters in php --- fetcher/feedfetcher.php | 18 ++++++++++++------ fetcher/fetcher.php | 4 ++-- fetcher/ifeedfetcher.php | 4 ++-- 3 files changed, 16 insertions(+), 10 deletions(-) (limited to 'fetcher') diff --git a/fetcher/feedfetcher.php b/fetcher/feedfetcher.php index 648cb90d8..c658dd36c 100644 --- a/fetcher/feedfetcher.php +++ b/fetcher/feedfetcher.php @@ -64,8 +64,8 @@ class FeedFetcher implements IFeedFetcher { /** * Fetch a feed from remote * @param string $url remote url of the feed - * @param boolean $getFavicon if the favicon should also be fetched, defaults - * to true + * @param boolean $getFavicon if the favicon should also be fetched, + * defaults to true * @throws FetcherException if simple pie fails * @return array an array containing the new feed and its items, first * element being the Feed and second element being an array of Items @@ -74,9 +74,12 @@ class FeedFetcher implements IFeedFetcher { $simplePie = $this->simplePieFactory->getCore(); $simplePie->set_feed_url($url); $simplePie->enable_cache(true); - $simplePie->set_useragent('ownCloud News/' . + $simplePie->set_useragent( + 'ownCloud News/' . $this->appConfig->getConfig('version') . - ' (+https://owncloud.org/; 1 subscriber; feed-url=' . $url . ')'); + ' (+https://owncloud.org/; 1 subscriber; ' . + 'feed-url=' . $url . ')' + ); $simplePie->set_stupidly_fast(true); // disable simple pie sanitation // we use htmlpurifier $simplePie->set_timeout($this->fetchTimeout); @@ -91,7 +94,9 @@ class FeedFetcher implements IFeedFetcher { try { if (!$simplePie->init()) { - throw new \Exception('Could not initialize simple pie on feed with url ' . $url); + throw new \Exception( + 'Could not initialize simple pie on feed with url ' . $url + ); } // somehow $simplePie turns into a feed after init @@ -204,7 +209,8 @@ class FeedFetcher implements IFeedFetcher { $feed->setAdded($this->time->getTime()); if ($getFavicon) { - // use the favicon from the page first since most feeds use a weird image + // use the favicon from the page first since most feeds use a weird + // image $favicon = $this->faviconFetcher->fetch($feed->getLink()); if (!$favicon) { diff --git a/fetcher/fetcher.php b/fetcher/fetcher.php index 4b4c09e1c..ae46d6212 100644 --- a/fetcher/fetcher.php +++ b/fetcher/fetcher.php @@ -34,8 +34,8 @@ class Fetcher { /** * Fetch a feed from remote * @param string $url remote url of the feed - * @param boolean $getFavicon if the favicon should also be fetched, defaults - * to true + * @param boolean $getFavicon if the favicon should also be fetched, + * defaults to true * @throws FetcherException if simple pie fails * @return array an array containing the new feed and its items, first * element being the Feed and second element being an array of Items diff --git a/fetcher/ifeedfetcher.php b/fetcher/ifeedfetcher.php index 8869d9292..68b1bcf64 100644 --- a/fetcher/ifeedfetcher.php +++ b/fetcher/ifeedfetcher.php @@ -17,8 +17,8 @@ interface IFeedFetcher { /** * @param string $url remote url of the feed - * @param boolean $getFavicon if the favicon should also be fetched, defaults - * to true + * @param boolean $getFavicon if the favicon should also be fetched, + * defaults to true * @throws FetcherException if the fetcher encounters a problem * @return array an array containing the new feed and its items, first * element being the Feed and second element being an array of Items -- cgit v1.2.3