diff options
author | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-06-26 11:33:44 +0200 |
---|---|---|
committer | Bernhard Posselt <dev@bernhard-posselt.com> | 2014-06-26 11:33:44 +0200 |
commit | cd10f93e0d271840caff92b88195385a2a3f15b2 (patch) | |
tree | cf9e3724c35bba4cdd82e443938151bf189802cc /utility | |
parent | 06367d8b81407fc2948e0f666b38f4de2dffbd89 (diff) |
style fixes
Diffstat (limited to 'utility')
-rw-r--r-- | utility/faviconfetcher.php | 10 | ||||
-rw-r--r-- | utility/opmlexporter.php | 13 | ||||
-rw-r--r-- | utility/simplepieapifactory.php | 26 |
3 files changed, 32 insertions, 17 deletions
diff --git a/utility/faviconfetcher.php b/utility/faviconfetcher.php index 96205a088..88a1af317 100644 --- a/utility/faviconfetcher.php +++ b/utility/faviconfetcher.php @@ -30,10 +30,12 @@ class FaviconFetcher { } - /** - * Fetches a favicon from a given URL - * @param string|null $url the url where to fetch it from - */ + /** + * Fetches a favicon from a given URL + * + * @param string|null $url the url where to fetch it from + * @return null|string + */ public function fetch($url) { try { $url = $this->buildURL($url); diff --git a/utility/opmlexporter.php b/utility/opmlexporter.php index 2ac735746..8dfb996c6 100644 --- a/utility/opmlexporter.php +++ b/utility/opmlexporter.php @@ -17,11 +17,14 @@ namespace OCA\News\Utility; * Exports the OPML */ class OPMLExporter { - - /** - * Generates the OPML for the active user - * @return the OPML as string - */ + + /** + * Generates the OPML for the active user + * + * @param Folder[] $folders + * @param Feed[] $feeds + * @return \DomDocument the document + */ public function build($folders, $feeds){ $document = new \DomDocument('1.0', 'UTF-8'); $document->formatOutput = true; diff --git a/utility/simplepieapifactory.php b/utility/simplepieapifactory.php index 2184cd994..d1fd26111 100644 --- a/utility/simplepieapifactory.php +++ b/utility/simplepieapifactory.php @@ -17,12 +17,22 @@ namespace OCA\News\Utility; class SimplePieAPIFactory { - /** - * Builds a simplepie file object. This is needed because - * the file object contains logic in its constructor which makes it - * impossible to inject and test - * @return SimplePie_File a new object - */ + /** + * Builds a simplepie file object. This is needed because + * the file object contains logic in its constructor which makes it + * impossible to inject and test + * + * @param $url + * @param int $timeout + * @param int $redirects + * @param null $headers + * @param null $useragent + * @param bool $force_fsockopen + * @param null $proxyHost + * @param null $proxyPort + * @param null $proxyAuth + * @return SimplePie_File a new object + */ public function getFile($url, $timeout=10, $redirects=5, $headers=null, $useragent=null, $force_fsockopen=false, $proxyHost=null, $proxyPort=null, $proxyAuth=null) { @@ -36,12 +46,12 @@ class SimplePieAPIFactory { /** * Returns a new instance of a SimplePie_Core() object. This is needed * because the class relies on external dependencies which are not passed - * in via the constructor and thus making it nearly impossible to unittest + * in via the constructor and thus making it nearly impossible to unit test * code that uses this class * @return \SimplePie_Core instance */ public function getCore() { - return new \SimplePie_Core(); + return new \SimplePie(); } |