Skip to content
Snippets Groups Projects
Commit ea2c278f authored by megachriz's avatar megachriz Committed by MegaChriz
Browse files

Issue #2490782 by MegaChriz, heykarthikwithu: fixed a few comment docblocks.

parent b7884a55
No related branches found
No related tags found
No related merge requests found
......@@ -150,7 +150,7 @@ class FeedsImporter extends FeedsConfigurable {
/**
* Copy a FeedsImporter configuration into this importer.
*
* @param FeedsImporter $importer
* @param FeedsConfigurable $configurable
* The feeds importer object to copy from.
*/
public function copy(FeedsConfigurable $configurable) {
......
......@@ -171,7 +171,7 @@ class ParserCSV {
/**
* Get the byte number where the parser left off after last parse() call.
*
* @return
* @return int
* 0 if all lines or no line has been parsed, the byte position of where a
* timeout or the line limit has been reached otherwise. This position can be
* used to set the start byte for the next iteration after parse() has
......@@ -198,11 +198,8 @@ class ParserCSV {
*
* @param Iterator $lineIterator
* An Iterator object that yields line strings, e.g. ParserCSVIterator.
* @param $start
* The byte number from where to start parsing the file.
* @param $lines
* The number of lines to parse, 0 for all lines.
* @return
*
* @return array
* Two dimensional array that contains the data in the CSV file.
*/
public function parse(Iterator $lineIterator) {
......
......@@ -13,10 +13,11 @@
/**
* Parse the feed into a data structure.
*
* @param $feed
* The feed object (contains the URL or the parsed XML structure.
* @return
* stdClass The structured datas extracted from the feed.
* @param string $string
* The feed object (contains the URL or the parsed XML structure).
*
* @return array|false
* The structured datas extracted from the feed or FALSE in case of failures.
*/
function common_syndication_parser_parse($string) {
// SimpleXML can only deal with XML declaration at the start of the document,
......@@ -45,10 +46,11 @@ function common_syndication_parser_parse($string) {
/**
* Determine the feed format of a SimpleXML parsed object structure.
*
* @param $xml
* SimpleXML-preprocessed feed.
* @return
* The feed format short description or FALSE if not compatible.
* @param SimpleXMLElement $xml
* SimpleXML-preprocessed feed.
*
* @return string|false
* The feed format short description or FALSE if not compatible.
*/
function _parser_common_syndication_feed_format_detect($xml) {
if (!is_object($xml)) {
......@@ -490,10 +492,11 @@ function _parser_common_syndication_RSS20_parse($feed_XML) {
/**
* Parse a date comes from a feed.
*
* @param $date_string
* The date string in various formats.
* @return
* The timestamp of the string or the current time if can't be parsed
* @param string $date_str
* The date string in various formats.
*
* @return int
* The timestamp of the string or the current time if can't be parsed.
*/
function _parser_common_syndication_parse_date($date_str) {
// PHP < 5.3 doesn't like the GMT- notation for parsing timezones.
......@@ -526,9 +529,10 @@ function _parser_common_syndication_parse_date($date_str) {
* See http://www.w3.org/TR/NOTE-datetime for more information.
* Originally from MagpieRSS (http://magpierss.sourceforge.net/).
*
* @param $date_str
* A string with a potentially W3C DTF date.
* @return
* @param string $date_str
* A potentially W3C DTF date.
*
* @return int|false
* A timestamp if parsed successfully or FALSE if not.
*/
function _parser_common_syndication_parse_w3cdtf($date_str) {
......@@ -563,8 +567,11 @@ function _parser_common_syndication_parse_w3cdtf($date_str) {
* Extract the link that points to the original content (back to site or
* original article)
*
* @param $links
* Array of SimpleXML objects
* @param array $links
* Array of SimpleXML objects
*
* @return string
* An URL if found. An empty string otherwise.
*/
function _parser_common_syndication_link($links) {
$to_link = '';
......
......@@ -10,7 +10,8 @@
*
* @param $raw
* File contents.
* @return
*
* @return array
* An array of the parsed OPML file.
*/
function opml_parser_parse($raw) {
......
......@@ -56,12 +56,14 @@ class FeedsCSVParser extends FeedsParser {
/**
* Get first line and use it for column names, convert them to lower case.
* Be aware that the $parser and iterator objects can be modified in this
* function since they are passed in by reference
* function since they are passed in by reference.
*
* @param ParserCSV $parser
* @param ParserCSVIterator $iterator
* @return
* An array of lower-cased column names to use as keys for the parsed items.
*
* @return array|false
* An array of lower-cased column names to use as keys for the parsed items
* or FALSE if the document was empty.
*/
protected function parseHeader(ParserCSV $parser, ParserCSVIterator $iterator) {
$parser->setLineLimit(1);
......@@ -81,8 +83,13 @@ class FeedsCSVParser extends FeedsParser {
*
* @param ParserCSV $parser
* @param ParserCSVIterator $iterator
* @return
* An array of rows of the CSV keyed by the column names previously set
* @param int $start
* The byte number from where to start parsing the file.
* @param int $limit
* The number of lines to parse, 0 for all lines.
*
* @return array
* An array of rows of the CSV keyed by the column names previously set.
*/
protected function parseItems(ParserCSV $parser, ParserCSVIterator $iterator, $start = 0, $limit = 0) {
$parser->setLineLimit($limit);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment