diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-10-21 18:19:23 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-10-21 18:19:23 +0200 |
commit | 66c73a96ac2dda076bcfe0dc0a1ca2a7e169149d (patch) | |
tree | dc0318fa459e4f313217ee38e4bc63524513d721 /fetcher | |
parent | f5e64d35c05b14016eb4fffff7199386a97a9b43 (diff) |
first try to set indention limit at 80 characters in php
Diffstat (limited to 'fetcher')
-rw-r--r-- | fetcher/feedfetcher.php | 18 | ||||
-rw-r--r-- | fetcher/fetcher.php | 4 | ||||
-rw-r--r-- | fetcher/ifeedfetcher.php | 4 |
3 files changed, 16 insertions, 10 deletions
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 |