diff options
author | sgiehl <stefan@piwik.org> | 2013-07-06 20:00:00 +0400 |
---|---|---|
committer | sgiehl <stefan@piwik.org> | 2013-07-06 20:00:00 +0400 |
commit | bfd7e1fa5d0df717d7e715a99cd741d76229f7d4 (patch) | |
tree | 88bb71abcb142612013781d0f3915734cb2dce7e /core | |
parent | 1f787b2c435d7e5b2e33d2aeffa821eccb546bf7 (diff) |
fixed several doc blocks
Diffstat (limited to 'core')
-rw-r--r-- | core/API/ResponseBuilder.php | 1 | ||||
-rw-r--r-- | core/Archive.php | 11 | ||||
-rw-r--r-- | core/Archive/DataCollection.php | 12 | ||||
-rw-r--r-- | core/Archive/DataTableFactory.php | 6 | ||||
-rw-r--r-- | core/ArchiveProcessor/Rules.php | 3 | ||||
-rw-r--r-- | core/DataAccess/ArchiveWriter.php | 2 | ||||
-rw-r--r-- | core/DataArray.php | 2 | ||||
-rw-r--r-- | core/DataTable.php | 3 | ||||
-rw-r--r-- | core/EventDispatcher.php | 4 | ||||
-rw-r--r-- | core/Period.php | 2 | ||||
-rw-r--r-- | core/Piwik.php | 1 | ||||
-rw-r--r-- | core/Site.php | 2 | ||||
-rw-r--r-- | core/Tracker/Db/Mysqli.php | 3 | ||||
-rw-r--r-- | core/Tracker/GoalManager.php | 5 | ||||
-rw-r--r-- | core/Tracker/VisitExcluded.php | 3 |
15 files changed, 38 insertions, 22 deletions
diff --git a/core/API/ResponseBuilder.php b/core/API/ResponseBuilder.php index f74365df99..d38a722b1e 100644 --- a/core/API/ResponseBuilder.php +++ b/core/API/ResponseBuilder.php @@ -472,6 +472,7 @@ class Piwik_API_ResponseBuilder * Returns the value for the label query parameter which can be either a string * (ie, label=...) or array (ie, label[]=...). * + * @param array $request * @return array */ static public function getLabelFromRequest($request) diff --git a/core/Archive.php b/core/Archive.php index 07695eab35..272d1e5322 100644 --- a/core/Archive.php +++ b/core/Archive.php @@ -282,7 +282,7 @@ class Piwik_Archive * @param Piwik_Date $date * @param string $segment * @param bool $expanded - * @param null $idSubtable + * @param int|null $idSubtable * @return Piwik_DataTable|Piwik_DataTable_Array */ public static function getDataTableFromArchive($name, $idSite, $period, $date, $segment, $expanded, $idSubtable = null) @@ -308,8 +308,12 @@ class Piwik_Archive { return $recordName . "_" . $id; } + /** * Queries archive tables for data and returns the result. + * @param array|string $archiveNames + * @param $archiveDataType + * @param null|int $idSubtable * @return Piwik_Archive_DataCollection */ private function get($archiveNames, $archiveDataType, $idSubtable = null) @@ -613,11 +617,12 @@ class Piwik_Archive return $plugin; } - + /** * Returns the name of the plugin that archives a given report. - * + * * @param string $report Archive data name, ie, 'nb_visits', 'UserSettings_...', etc. + * @throws Exception * @return string */ public static function getPluginForReport($report) diff --git a/core/Archive/DataCollection.php b/core/Archive/DataCollection.php index 4c9d4bbd59..09e12d8f6b 100644 --- a/core/Archive/DataCollection.php +++ b/core/Archive/DataCollection.php @@ -208,23 +208,25 @@ class Piwik_Archive_DataCollection $index = $this->getArray($resultIndices); return $dataTableFactory->make($index, $resultIndices); } - + /** * Returns archive data as a DataTable indexed by metadata. Indexed data will * be represented by Piwik_DataTable_Array instances. Each DataTable will have * its subtable IDs set. - * + * * This function will only work if blob data was loaded and only one record * was loaded (not including subtables of the record). - * + * * @param array $resultIndices An array mapping metadata names to pretty labels * for them. Each archive data row will be indexed * by the metadata specified here. - * + * * Eg, array('site' => 'idSite', 'period' => 'Date') * @param int $idSubtable The subtable to return. * @param bool $addMetadataSubtableId Whether to add the DB subtable ID as metadata * to each datatable, or not. + * @throws Exception + * @return Piwik_DataTable|Piwik_DataTable_Array */ public function getExpandedDataTable($resultIndices, $idSubtable = null, $addMetadataSubtableId = false) { @@ -251,6 +253,7 @@ class Piwik_Archive_DataCollection * Returns metadata for a data row. * * @param array $data The data row. + * @return array */ public static function getDataRowMetadata($data) { @@ -325,6 +328,7 @@ class Piwik_Archive_DataCollection * stored as metadata). * @param string $period eg, '2012-01-01,2012-01-31'. The period for the * row (needed since period is not stored as metadata). + * @return array */ private function getRowKeys($metadataNames, $row, $idSite, $period) { diff --git a/core/Archive/DataTableFactory.php b/core/Archive/DataTableFactory.php index 4774db7cf3..6bee96d344 100644 --- a/core/Archive/DataTableFactory.php +++ b/core/Archive/DataTableFactory.php @@ -95,12 +95,13 @@ class Piwik_Archive_DataTableFactory $this->expandDataTable = true; $this->addMetadataSubtableId = $addMetadataSubtableId; } - + /** * Tells the factory instance to create a DataTable using a blob with the * supplied subtable ID. - * + * * @param int $idSubtable An in-database subtable ID. + * @throws Exception */ public function useSubtable($idSubtable) { @@ -230,6 +231,7 @@ class Piwik_Archive_DataTableFactory * @param array $index @see Piwik_Archive_DataCollection * @param array $resultIndices @see make * @param array $keyMetadata The metadata to add to the table when it's created. + * @return Piwik_DataTable_Array */ private function createDataTableArrayFromIndex($index, $resultIndices, $keyMetadata = array()) { diff --git a/core/ArchiveProcessor/Rules.php b/core/ArchiveProcessor/Rules.php index 4c824e3051..02f10c7d37 100644 --- a/core/ArchiveProcessor/Rules.php +++ b/core/ArchiveProcessor/Rules.php @@ -92,7 +92,8 @@ class Piwik_ArchiveProcessor_Rules * Given a monthly archive table, will delete all reports that are now outdated, * or reports that ended with an error * - * @return int False, or timestamp indicating which archives to delete + * @param Piwik_Date $date + * @return int|bool False, or timestamp indicating which archives to delete */ public static function shouldPurgeOutdatedArchives(Piwik_Date $date) { diff --git a/core/DataAccess/ArchiveWriter.php b/core/DataAccess/ArchiveWriter.php index 1f8be90156..3f36252fdc 100644 --- a/core/DataAccess/ArchiveWriter.php +++ b/core/DataAccess/ArchiveWriter.php @@ -194,6 +194,8 @@ class Piwik_DataAccess_ArchiveWriter * * @param string $name * @param mixed $value + * + * @return bool */ public function insertRecord($name, $value) { diff --git a/core/DataArray.php b/core/DataArray.php index a05f620966..6a4339b2f6 100644 --- a/core/DataArray.php +++ b/core/DataArray.php @@ -256,7 +256,7 @@ class Piwik_DataArray * Given an array of stats, it will process the sum of goal conversions * and sum of revenue and add it in the stats array in two new fields. * - * @param array $metricsByLabel Passed by reference, two new columns + * @param array $data Passed by reference, two new columns * will be added: total conversions, and total revenue, for all goals for this label/row */ protected function enrichWithConversions(&$data) diff --git a/core/DataTable.php b/core/DataTable.php index c455537f63..e9f3cd2c20 100644 --- a/core/DataTable.php +++ b/core/DataTable.php @@ -502,6 +502,8 @@ class Piwik_DataTable /** * Get an empty table with the same properties as this one * + * @param bool $keepFilters + * * @return Piwik_DataTable */ public function getEmptyClone($keepFilters = true) @@ -1186,6 +1188,7 @@ class Piwik_DataTable * * @param array $array Indexed array, two formats are supported * @param array|null $subtablePerLabel An indexed array of up to one DataTable to associate as a sub table + * @return Piwik_DataTable */ public static function makeFromIndexedArray($array, $subtablePerLabel = null) { diff --git a/core/EventDispatcher.php b/core/EventDispatcher.php index f39148c7a4..b1bc3daa1c 100644 --- a/core/EventDispatcher.php +++ b/core/EventDispatcher.php @@ -184,9 +184,11 @@ class Piwik_EventDispatcher /** * Post an event to the dispatcher which will notice the observers. - * + * * @param string $eventName The event name. * @param array $params The parameter array to forward to observer callbacks. + * @param bool $pending + * @param null $plugins * @return void */ function Piwik_PostEvent($eventName, $params = array(), $pending = false, $plugins = null) diff --git a/core/Period.php b/core/Period.php index b3cfa25f2a..20a5f9c84f 100644 --- a/core/Period.php +++ b/core/Period.php @@ -128,7 +128,7 @@ abstract class Piwik_Period * * @param string $timezone * @param string $period The period string: day, week, month, year, range - * @param string $strDate The date or date range string. + * @param string $date The date or date range string. * @return Piwik_Period */ public static function makePeriodFromQueryParams($timezone, $period, $date) diff --git a/core/Piwik.php b/core/Piwik.php index 8f2d737fe0..0c4781e29f 100644 --- a/core/Piwik.php +++ b/core/Piwik.php @@ -1304,7 +1304,6 @@ class Piwik * @param string $columnName * @param mixed $value * @param bool $htmlAllowed - * @param string $timeAsSentence * @return string */ static public function getPrettyValue($idSite, $columnName, $value, $htmlAllowed) diff --git a/core/Site.php b/core/Site.php index 53a939256b..f341aa7208 100644 --- a/core/Site.php +++ b/core/Site.php @@ -204,7 +204,7 @@ class Piwik_Site * Checks the given string for valid site ids and returns them as an array * * @param string $ids comma separated idSite list - * @param false|string $_restrictSitesToLogin Used only when running as a scheduled task. + * @param bool|string $_restrictSitesToLogin Used only when running as a scheduled task. * @return array of valid integer */ static public function getIdSitesFromIdSitesString($ids, $_restrictSitesToLogin = false) diff --git a/core/Tracker/Db/Mysqli.php b/core/Tracker/Db/Mysqli.php index 32c16c3e1f..96036499a0 100644 --- a/core/Tracker/Db/Mysqli.php +++ b/core/Tracker/Db/Mysqli.php @@ -142,6 +142,9 @@ class Piwik_Tracker_Db_Mysqli extends Piwik_Tracker_Db * * @param string $query Query * @param array $parameters Parameters to bind + * + * @return array + * * @throws Piwik_Tracker_Db_Exception if an exception occurred */ public function fetch($query, $parameters = array()) diff --git a/core/Tracker/GoalManager.php b/core/Tracker/GoalManager.php index 1f674ce438..5ed89c14b3 100644 --- a/core/Tracker/GoalManager.php +++ b/core/Tracker/GoalManager.php @@ -215,11 +215,6 @@ class Piwik_Tracker_GoalManager * @param array $visitorInformation * @param array $visitCustomVariables * @param string $action - * @param int $referrerTimestamp - * @param string $referrerUrl - * @param string $referrerCampaignName - * @param string $referrerCampaignKeyword - * @param string $browserLanguage */ public function recordGoals($idSite, $visitorInformation, $visitCustomVariables, $action) { diff --git a/core/Tracker/VisitExcluded.php b/core/Tracker/VisitExcluded.php index 2ac0f1826f..c94a9d9efe 100644 --- a/core/Tracker/VisitExcluded.php +++ b/core/Tracker/VisitExcluded.php @@ -172,7 +172,6 @@ class Piwik_Tracker_VisitExcluded /** * Checks if the visitor ip is in the excluded list * - * @param string $this->ip Long IP * @return bool */ protected function isVisitorIpExcluded() @@ -193,7 +192,7 @@ class Piwik_Tracker_VisitExcluded * Visits whose user agent string contains one of the excluded_user_agents strings for the * site being tracked (or one of the global strings) will be excluded. * - * @param string $this->userAgent The user agent string. + * @internal param string $this ->userAgent The user agent string. * @return bool */ protected function isUserAgentExcluded() |