diff --git a/core/API/ResponseBuilder.php b/core/API/ResponseBuilder.php index f74365df99ffc55a4fecb3a1e9b965a199b73ecb..d38a722b1e7856b06fd9a7348ac7f4c5f01f0e60 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 07695eab3504b22bda79227a64a044210d61ecd0..272d1e53227218c68b75667f6811e55c8ba1d541 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 4c9d4bbd594380ad5df69577c53e5a47e79d19a8..09e12d8f6b919886ba7c774c9115fb5074c1c226 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 4774db7cf3d95bcafdf6c0f76325beec7371b296..6bee96d34422f07f12730efaf0a6db50cf0e9582 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 4c824e3051e26c165aba9245b49e203490e362ce..02f10c7d3747dbc32b67e448a47ef4dd27333371 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 1f8be901563f192b2e1e17ce673bd96d7e7bfa36..3f36252fdcf15df6a2cf53ff9b3c29799e0ed73a 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 a05f620966d5e96c7e99df609a03a47e6ca41122..6a4339b2f6a328014c0e8480d594ba41232b9996 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 c455537f6331c9311eacc0cd08e7372904cd2ac9..e9f3cd2c201836ac7f2427d5a758ca946f82917f 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 f39148c7a4e1bce8ee34ca4d0f5e3952add827b2..b1bc3daa1cb4c50e6d2ee79d9fda161a812c51dd 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 b3cfa25f2a49a20a092d9068e1c666aa06fa4012..20a5f9c84f02d993d74afef88ae6c78e3e6f6de3 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 8f2d737fe01fc315c3634b0e51181f437d87433d..0c4781e29fb4f91d0cea33415c18da1f8fa5d6ea 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 53a939256b6ce589b50f39479c1408fccca3580f..f341aa72088bfd8103067519953abf10633308d1 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 32c16c3e1f76cd3ab4b5e2b0d2af5e89086a3536..96036499a090f8e5cf091c9858bb0ac730fbc2d5 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 1f674ce438b17fb584d969af20556d664899ce8c..5ed89c14b310a1bec30d22b3d069e26c79e383a4 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 2ac0f1826fb32a0ca14e63cb994aa5b8e0b1d04b..c94a9d9efe6ba1dcefead41ec25d019d7aa8a9d0 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() diff --git a/plugins/API/API.php b/plugins/API/API.php index e7fdca482b0b9d26af75e4b5261e68b292643c9c..8348724cc483b2c6b8637e619bfafeaa390c9ed0 100644 --- a/plugins/API/API.php +++ b/plugins/API/API.php @@ -398,6 +398,10 @@ class Piwik_API_API * Returns metadata information about each report (category, name, dimension, metrics, etc.) * * @param string $idSites Comma separated list of website Ids + * @param bool|string $period + * @param bool|Piwik_Date $date + * @param bool $hideMetricsDoc + * @param bool $showSubtableReports * @return array */ public function getReportMetadata($idSites = '', $period = false, $date = false, $hideMetricsDoc = false, @@ -521,6 +525,18 @@ class Piwik_API_API * this function will query the API for the previous days/weeks/etc. and will return * a ready to use data structure containing the metrics for the requested Label, along with enriched information (min/max values, etc.) * + * @param int $idSite + * @param string $period + * @param Piwik_Date $date + * @param string $apiModule + * @param string $apiAction + * @param bool|string $label + * @param bool|string $segment + * @param bool|string $column + * @param bool|string $language + * @param bool|int $idGoal + * @param bool|string $legendAppendMetric + * @param bool|string $labelUseAbsoluteUrl * @return array */ public function getRowEvolution($idSite, $period, $date, $apiModule, $apiAction, $label = false, $segment = false, $column = false, $language = false, $idGoal = false, $legendAppendMetric = true, $labelUseAbsoluteUrl = true) @@ -534,6 +550,7 @@ class Piwik_API_API * Performs multiple API requests at once and returns every result. * * @param array $urls The array of API requests. + * @return array */ public function getBulkRequest($urls) { @@ -556,6 +573,7 @@ class Piwik_API_API * Given a segment, will return a list of the most used values for this particular segment. * @param $segmentName * @param $idSite + * @return array * @throws Exception */ public function getSuggestedValuesForSegment($segmentName, $idSite) diff --git a/plugins/API/ProcessedReport.php b/plugins/API/ProcessedReport.php index 63cc65bde35ccb6119c0f0d66df2a6ec0251f46a..a2a550b056f9aaaa4df8b9a5cd7ac644cbd3b003 100644 --- a/plugins/API/ProcessedReport.php +++ b/plugins/API/ProcessedReport.php @@ -53,6 +53,10 @@ class Piwik_API_ProcessedReport * Returns metadata information about each report (category, name, dimension, metrics, etc.) * * @param string $idSites Comma separated list of website Ids + * @param bool|string $period + * @param bool|Piwik_Date $date + * @param bool $hideMetricsDoc + * @param bool $showSubtableReports * @return array */ public function getReportMetadata($idSites, $period = false, $date = false, $hideMetricsDoc = false, $showSubtableReports = false) @@ -303,9 +307,9 @@ class Piwik_API_ProcessedReport * @param int $idSite enables monetary value formatting based on site currency * @param Piwik_DataTable|Piwik_DataTable_Array $dataTable * @param array $reportMetadata - * @param boolean $hasDimension + * @param bool $showRawMetrics * @return array Piwik_DataTable_Simple|Piwik_DataTable_Array $newReport with human readable format & array $columns list of translated column names & Piwik_DataTable_Simple|Piwik_DataTable_Array $rowsMetadata - **/ + */ private function handleTableReport($idSite, $dataTable, &$reportMetadata, $showRawMetrics = false) { $hasDimension = isset($reportMetadata['dimension']); diff --git a/plugins/API/RowEvolution.php b/plugins/API/RowEvolution.php index 2daac7083b51fb333b373fb4913f2a2b57a2f903..99e62a21b817616b7ce736b7911643d2bfe9538c 100644 --- a/plugins/API/RowEvolution.php +++ b/plugins/API/RowEvolution.php @@ -101,6 +101,12 @@ class Piwik_API_RowEvolution /** * Get row evolution for a single label + * @param Piwik_DataTable $dataTable + * @param array $metadata + * @param string $apiModule + * @param string $apiAction + * @param string $label + * @param bool $labelUseAbsoluteUrl * @return array containing report data, metadata, label, logo */ private function getSingleRowEvolution($dataTable, $metadata, $apiModule, $apiAction, $label, $labelUseAbsoluteUrl = true) diff --git a/plugins/Actions/Actions.php b/plugins/Actions/Actions.php index 505ecbb29d7ce007cdfe307cf420d6cefb5da25e..fdae02efd0c846be24954d27d4d03191d5e595f8 100644 --- a/plugins/Actions/Actions.php +++ b/plugins/Actions/Actions.php @@ -118,6 +118,7 @@ class Piwik_Actions extends Piwik_Plugin * @param string $valueToMatch * @param string $sqlField * @param string $matchType + * @param string $segmentName * @throws Exception * @return array|int|string */ diff --git a/plugins/Actions/Archiver.php b/plugins/Actions/Archiver.php index b677e29eece751d88df6e538afcf59903ec096c2..61f9cc3a8623d46635da5e88fdfe08029445867f 100644 --- a/plugins/Actions/Archiver.php +++ b/plugins/Actions/Archiver.php @@ -78,7 +78,6 @@ class Piwik_Actions_Archiver extends Piwik_PluginsArchiver /** * Archives Actions reports for a Day * - * @param Piwik_ArchiveProcessor $this->getProcessor() * @return bool */ public function archiveDay() diff --git a/plugins/Annotations/API.php b/plugins/Annotations/API.php index 7750c816e352e72a40cfc9d630cf7cd29f2b6bf4..3439946d2b8d4d95fe8975842a445087839b4a93 100755 --- a/plugins/Annotations/API.php +++ b/plugins/Annotations/API.php @@ -43,7 +43,7 @@ class Piwik_Annotations_API * @param string $idSite The site ID to add the annotation to. * @param string $date The date the annotation is attached to. * @param string $note The text of the annotation. - * @param string $starred Either 0 or 1. Whether the annotation should be starred. + * @param int $starred Either 0 or 1. Whether the annotation should be starred. * @return array Returns an array of two elements. The first element (indexed by * 'annotation') is the new annotation. The second element (indexed * by 'idNote' is the new note's ID). @@ -159,9 +159,9 @@ class Piwik_Annotations_API * * @param string $idSite The site ID to add the annotation to. Can be one ID or * a list of site IDs. - * @param string|false $date The date of the period. + * @param bool|string $date The date of the period. * @param string $period The period type. - * @param int|false $lastN Whether to include the last N number of periods in the + * @param bool|int $lastN Whether to include the last N number of periods in the * date range or not. * @return array An array that indexes arrays of annotations by site ID. ie, * array( @@ -189,9 +189,10 @@ class Piwik_Annotations_API * starred annotations. * * @param string $idSite The site ID to add the annotation to. - * @param string|false $date The date of the period. + * @param string|bool $date The date of the period. * @param string $period The period type. - * @param int|false $lastN Whether to get counts for the last N number of periods or not. + * @param int|bool $lastN Whether to get counts for the last N number of periods or not. + * @param bool $getAnnotationText * @return array An array mapping site IDs to arrays holding dates & the count of * annotations made for those dates. eg, * array( @@ -294,12 +295,13 @@ class Piwik_Annotations_API * Returns start & end dates for the range described by a period and optional lastN * argument. * - * @param string $date|false The start date of the period (or the date range of a range + * @param string|bool $date The start date of the period (or the date range of a range * period). - * @param string $period The period type ('day', 'week', 'month', 'year' or 'range'). - * @param int|false $lastN Whether to include the last N periods in the range or not. + * @param string $period The period type ('day', 'week', 'month', 'year' or 'range'). + * @param bool|int $lastN Whether to include the last N periods in the range or not. * Ignored if period == range. * + * @return array * @ignore */ public static function getDateRangeForPeriod($date, $period, $lastN = false) diff --git a/plugins/Annotations/AnnotationList.php b/plugins/Annotations/AnnotationList.php index daed59a5546b711965bc0f6e1e377925716557a3..feae8750020c395ae633cefe49a2a394f20f2e65 100755 --- a/plugins/Annotations/AnnotationList.php +++ b/plugins/Annotations/AnnotationList.php @@ -192,9 +192,9 @@ class Piwik_Annotations_AnnotationList * * @see self::get for info on what attributes stored within annotations. * - * @param Piwik_Date|false $startDate The start of the date range. - * @param Piwik_Date|false $endDate The end of the date range. - * @param string|int|array|false $idSite IDs of the sites whose annotations to + * @param Piwik_Date|bool $startDate The start of the date range. + * @param Piwik_Date|bool $endDate The end of the date range. + * @param array|bool|int|string $idSite IDs of the sites whose annotations to * search through. * @return array Array mapping site IDs with arrays of annotations, eg: * array( @@ -286,6 +286,7 @@ class Piwik_Annotations_AnnotationList * @param string $date * @param string $note * @param int $starred + * @return array */ private function makeAnnotation($date, $note, $starred = 0) { @@ -410,6 +411,7 @@ class Piwik_Annotations_AnnotationList * Returns true if the current user can add notes for a specific site. * * @param int $idSite The site to add notes to. + * @return bool */ public static function canUserAddNotesFor($idSite) { @@ -421,6 +423,7 @@ class Piwik_Annotations_AnnotationList * Returns the option name used to store annotations for a site. * * @param int $idSite The site ID. + * @return string */ public static function getAnnotationCollectionOptionName($idSite) { diff --git a/plugins/CoreAdminHome/API.php b/plugins/CoreAdminHome/API.php index e17fb2846712030609fda80e990ed7f1873bd9a6..27a2293bcd87bb27f064d11b45b114b7a0d46b7f 100644 --- a/plugins/CoreAdminHome/API.php +++ b/plugins/CoreAdminHome/API.php @@ -64,6 +64,7 @@ class Piwik_CoreAdminHome_API * * @param string $idSites Comma separated list of idSite that have had data imported for the specified dates * @param string $dates Comma separated list of dates to invalidate for all these websites + * @throws Exception * @return array */ public function invalidateArchivedReports($idSites, $dates) diff --git a/plugins/CoreHome/DataTableRowAction/RowEvolution.php b/plugins/CoreHome/DataTableRowAction/RowEvolution.php index 9a8ba5cc483112e60027f4bb7fa787244edc07bd..9b8d958c880ef257f030703f9d7fffbb9632d4e7 100644 --- a/plugins/CoreHome/DataTableRowAction/RowEvolution.php +++ b/plugins/CoreHome/DataTableRowAction/RowEvolution.php @@ -67,6 +67,7 @@ class Piwik_CoreHome_DataTableRowAction_RowEvolution * Initialize some local variables from the request * @param int $idSite * @param Piwik_Date $date ($this->date from controller) + * @param null|string $graphType * @throws Exception */ public function __construct($idSite, $date, $graphType = null) diff --git a/plugins/CustomVariables/Archiver.php b/plugins/CustomVariables/Archiver.php index 4b63845215b379272d74f3f23973d9938b2e59d0..8b2e0a516f462f82ec500a5406a204654b2e055f 100644 --- a/plugins/CustomVariables/Archiver.php +++ b/plugins/CustomVariables/Archiver.php @@ -113,6 +113,9 @@ class Piwik_CustomVariables_Archiver extends Piwik_PluginsArchiver } /** + * @param string $key + * @param string $value + * @param $row * @return bool True if the $row metrics were already added to the ->metrics */ protected function aggregateEcommerceCategories($key, $value, $row) diff --git a/plugins/DBStats/API.php b/plugins/DBStats/API.php index 693c7f2e1e75313c878c63c9d4f2d9c61689565b..35c64c670354d48d83a94e018be68be60177b79c 100644 --- a/plugins/DBStats/API.php +++ b/plugins/DBStats/API.php @@ -290,8 +290,8 @@ class Piwik_DBStats_API * Gets the year of an archive table from its name. * * @param string $tableName - * @param string The year. * + * @return string the year * @ignore */ public static function getArchiveTableYear($tableName) diff --git a/plugins/DBStats/MySQLMetadataProvider.php b/plugins/DBStats/MySQLMetadataProvider.php index be487346cbeb732c7a785fba66cf5adb8db8fedb..f9405b02ded0de8546982c11a88e7ceedde9e82d 100755 --- a/plugins/DBStats/MySQLMetadataProvider.php +++ b/plugins/DBStats/MySQLMetadataProvider.php @@ -35,6 +35,7 @@ class Piwik_DBStats_MySQLMetadataProvider /** * Gets general database info that is not specific to any table. * + * @throws Exception * @return array See http://dev.mysql.com/doc/refman/5.1/en/show-status.html . */ public function getDBStatus() diff --git a/plugins/DevicesDetection/API.php b/plugins/DevicesDetection/API.php index 8e82b494163ca75489c83fb3c9b5e3656800370f..6f638e7f723de4e05d93baefb66b063526cc630d 100644 --- a/plugins/DevicesDetection/API.php +++ b/plugins/DevicesDetection/API.php @@ -54,8 +54,8 @@ class Piwik_DevicesDetection_API * @param int $idSite * @param string $period * @param string $date - * @param string $segment - * @return DataTable + * @param bool|string $segment + * @return Piwik_DataTable */ public function getType($idSite, $period, $date, $segment = false) { @@ -71,8 +71,8 @@ class Piwik_DevicesDetection_API * @param int $idSite * @param string $period * @param string $date - * @param string $segment - * @return DataTable + * @param bool|string $segment + * @return Piwik_DataTable */ public function getBrand($idSite, $period, $date, $segment = false) { @@ -87,8 +87,8 @@ class Piwik_DevicesDetection_API * @param int $idSite * @param string $period * @param string $date - * @param string $segment - * @return DataTable + * @param bool|string $segment + * @return Piwik_DataTable */ public function getModel($idSite, $period, $date, $segment = false) { @@ -102,8 +102,8 @@ class Piwik_DevicesDetection_API * @param int $idSite * @param string $period * @param string $date - * @param string $segment - * @return DataTable + * @param bool|string $segment + * @return Piwik_DataTable */ public function getOsFamilies($idSite, $period, $date, $segment = false) { @@ -118,8 +118,8 @@ class Piwik_DevicesDetection_API * @param int $idSite * @param string $period * @param string $date - * @param string $segment - * @return DataTable + * @param bool|string $segment + * @return Piwik_DataTable */ public function getOsVersions($idSite, $period, $date, $segment = false) { @@ -132,11 +132,11 @@ class Piwik_DevicesDetection_API /** * Gets datatable displaying number of visits by Browser family (eg. Firefox, InternetExplorer) - * @param int $idSite + * @param int $idSite * @param string $period * @param string $date - * @param string $segment - * @return DataTable + * @param bool|string $segment + * @return Piwik_DataTable */ public function getBrowserFamilies($idSite, $period, $date, $segment = false) { @@ -151,8 +151,8 @@ class Piwik_DevicesDetection_API * @param int $idSite * @param string $period * @param string $date - * @param string $segment - * @return DataTable + * @param bool|string $segment + * @return Piwik_DataTable */ public function getBrowserVersions($idSite, $period, $date, $segment = false) { diff --git a/plugins/DevicesDetection/UserAgentParserEnhanced/UserAgentParserEnhanced.php b/plugins/DevicesDetection/UserAgentParserEnhanced/UserAgentParserEnhanced.php index 911c751221916d4601fcc2794a9b223899dbd993..335e9f46491f0020e69f97876a48f4202a116cba 100644 --- a/plugins/DevicesDetection/UserAgentParserEnhanced/UserAgentParserEnhanced.php +++ b/plugins/DevicesDetection/UserAgentParserEnhanced/UserAgentParserEnhanced.php @@ -536,17 +536,17 @@ class UserAgentParserEnhanced } /** - * This method is used in this class for processing results of pregmatch + * This method is used in this class for processing results of pregmatch * results into string containing recognized information. - * + * * General algorithm: * Parsing UserAgent string consists of trying to match it against list of - * regular expressions for three different information: + * regular expressions for three different information: * browser + version, - * OS + version, - * device manufacturer + model. - * - * After match has been found iteration stops, and results are processed + * OS + version, + * device manufacturer + model. + * + * After match has been found iteration stops, and results are processed * by buildByMatch. * As $item we get decoded name (name of browser, name of OS, name of manufacturer). * In array $match we recieve preg_match results containing whole string matched at index 0 @@ -556,29 +556,29 @@ class UserAgentParserEnhanced * In other cases, where whe know that preg_match may return more than 1 result, * we call buildByMatch with $nb = 2 or more, depending on what will be returned from * regular expression. - * + * * Example: - * We are parsing UserAgent of Firefox 20.0 browser. + * We are parsing UserAgent of Firefox 20.0 browser. * UserAgentParserEnhanced calls buildBrowserName() and buildBrowserVersion() in order * to retrieve those information. * In buildBrowserName() we only have one call of buildByMatch, where passed argument * is regular expression testing given string for browser name. In this case, we are only * interrested in first hit, so no $nb parameter will be set to 1. After finding match, and calling * buildByMatch - we will receive just the name of browser. - * + * * Also after decoding browser we will get list of regular expressions for this browser name * testing UserAgent string for version number. Again we iterate over this list, and after finding first * occurence - we break loop and proceed to build by match. Since browser regular expressions can * contain two hits (major version and minor version) in function buildBrowserVersion() we have * two calls to buildByMatch, one without 3rd parameter, and second with $nb set to 2. * This way we can retrieve version number, and assign it to object property. - * + * * In case of mobiles.yml this schema slightly varies, but general idea is the same. - * + * * @param string $item * @param array $matches - * @param int $nb - * @return type + * @param int|string $nb + * @return string type */ protected function buildByMatch($item, $matches, $nb = '1') { diff --git a/plugins/ExampleAPI/API.php b/plugins/ExampleAPI/API.php index cbae12e22a50410d708a7ad7c444e539a8ea8688..bdf133cbb4719b4b4fb2bc68d94f028d1e9636fb 100644 --- a/plugins/ExampleAPI/API.php +++ b/plugins/ExampleAPI/API.php @@ -89,8 +89,8 @@ class Piwik_ExampleAPI_API * when the API function is called. You can also use default values * as shown in this example. * - * @param float $a - * @param float $b + * @param float|int $a + * @param float|int $b * @return float */ public function getSum($a = 0, $b = 0) diff --git a/plugins/Goals/API.php b/plugins/Goals/API.php index 35563a7ed5a1c9d61e29a8beb51ed1002d5e2b2c..418f44fc887f2246146519148474dcd5073b0969 100644 --- a/plugins/Goals/API.php +++ b/plugins/Goals/API.php @@ -477,6 +477,7 @@ class Piwik_Goals_API * @param string $segment The segment. * @param int|bool $idGoal The id of the goal to get data for. If this is set to false, * data for every goal that belongs to $idSite is returned. + * @return false|Piwik_DataTable */ protected function getGoalSpecificDataTable($recordName, $idSite, $period, $date, $segment, $idGoal) { @@ -504,6 +505,7 @@ class Piwik_Goals_API * @param string|bool $segment The segment. * @param int|bool $idGoal The id of the goal to get data for. If this is set to false, * data for every goal that belongs to $idSite is returned. + * @return false|Piwik_DataTable */ public function getDaysToConversion($idSite, $period, $date, $segment = false, $idGoal = false) { @@ -527,6 +529,7 @@ class Piwik_Goals_API * @param string|bool $segment The segment. * @param int|bool $idGoal The id of the goal to get data for. If this is set to false, * data for every goal that belongs to $idSite is returned. + * @return bool|Piwik_DataTable */ public function getVisitsUntilConversion($idSite, $period, $date, $segment = false, $idGoal = false) { diff --git a/plugins/Goals/Archiver.php b/plugins/Goals/Archiver.php index 425a7050b9291087a6e60d9e1972e205b19bf9ec..70d4fb1932d0d94d0052901312f928b0bd730880 100644 --- a/plugins/Goals/Archiver.php +++ b/plugins/Goals/Archiver.php @@ -368,7 +368,7 @@ class Piwik_Goals_Archiver extends Piwik_PluginsArchiver } /** - * @param $this->getProcessor() + * @internal param $this->getProcessor() */ public function archivePeriod() { diff --git a/plugins/Goals/Controller.php b/plugins/Goals/Controller.php index 1ee47d1ca4974864e775121138eed1518f9d6ab9..ee4c39454b6489b30ddadc06a385899d926b9fed 100644 --- a/plugins/Goals/Controller.php +++ b/plugins/Goals/Controller.php @@ -502,6 +502,7 @@ class Piwik_Goals_Controller extends Piwik_Controller * @param bool $ecommerce Whether to show ecommerce reports or not. * @param bool $cartNbConversions Whether there are cart conversions or not for this * goal. + * @return string */ private function getGoalReportsByDimensionTable($conversions, $ecommerce = false, $cartNbConversions = false) { diff --git a/plugins/ImageGraph/ImageGraph.php b/plugins/ImageGraph/ImageGraph.php index 9ee7fa7f27b2ce643be14fc91b300e77a3b5e21c..4a37396357ec439148bd22c752ce79a66c5117bb 100644 --- a/plugins/ImageGraph/ImageGraph.php +++ b/plugins/ImageGraph/ImageGraph.php @@ -46,6 +46,8 @@ class Piwik_ImageGraph extends Piwik_Plugin const GRAPH_EVOLUTION_LAST_PERIODS = 30; /** + * @param array $reports + * @param array $info * @return mixed */ public function getReportMetadata(&$reports, $info) diff --git a/plugins/Installation/FormDatabaseSetup.php b/plugins/Installation/FormDatabaseSetup.php index 809c19c20ce1b23f8526dca270640236f7ad8c38..936aa9ad86a22c5919a20b17d52336ef9aa3b8cc 100644 --- a/plugins/Installation/FormDatabaseSetup.php +++ b/plugins/Installation/FormDatabaseSetup.php @@ -74,6 +74,7 @@ class Piwik_Installation_FormDatabaseSetup extends Piwik_QuickForm2 /** * Creates database object based on form data. * + * @throws Exception|Zend_Db_Adapter_Exception * @return array The database connection info. Can be passed into Piwik::createDatabaseObject. */ public function createDatabaseObject() diff --git a/plugins/Live/API.php b/plugins/Live/API.php index 0cccab5d1b11d918589aef9f34da2489da95bc80..62c0b5c7be36e7a6c1ea6bee1630c8cfe8d48d62 100644 --- a/plugins/Live/API.php +++ b/plugins/Live/API.php @@ -53,9 +53,9 @@ class Piwik_Live_API /** * This will return simple counters, for a given website ID, for visits over the last N minutes * - * @param int Id Site - * @param int Number of minutes to look back at - * + * @param int $idSite Id Site + * @param int $lastMinutes Number of minutes to look back at + * @param bool|string $segment * @return array( visits => N, actions => M, visitsConverted => P ) */ public function getCounters($idSite, $lastMinutes, $segment = false) @@ -120,7 +120,8 @@ class Piwik_Live_API * @param bool|int $filter_limit (optional) Only return X visits * @param bool|int $filter_offset (optional) Skip the first X visits (useful when paginating) * @param bool|int $minTimestamp (optional) Minimum timestamp to restrict the query to (useful when paginating or refreshing visits) - * + * @param bool $flat + * @param bool $doNotFetchActions * @return Piwik_DataTable */ public function getLastVisitsDetails($idSite, $period, $date, $segment = false, $filter_limit = false, $filter_offset = false, $minTimestamp = false, $flat = false, $doNotFetchActions = false) @@ -412,6 +413,8 @@ class Piwik_Live_API * Removes fields that are not meant to be displayed (md5 config hash) * Or that the user should only access if he is super user or admin (cookie, IP) * + * @param array $visitorDetails + * @param int $idSite * @return void */ private function cleanVisitorDetails(&$visitorDetails, $idSite) diff --git a/plugins/Login/Controller.php b/plugins/Login/Controller.php index 7b602d39e44088fa557cf3c7e9b924731d286b69..dede4bee21ea08cbf02fea80dafe4a7386630e23 100644 --- a/plugins/Login/Controller.php +++ b/plugins/Login/Controller.php @@ -19,7 +19,7 @@ class Piwik_Login_Controller extends Piwik_Controller /** * Generate hash on user info and password * - * @param string $userinfo User name, email, etc + * @param string $userInfo User name, email, etc * @param string $password * @return string */ @@ -200,6 +200,7 @@ class Piwik_Login_Controller extends Piwik_Controller /** * Saves password reset info and sends confirmation email. * + * @param Piwik_QuickForm2 $form * @return array Error message(s) if an error occurs. */ private function resetPasswordFirstStep($form) @@ -322,6 +323,7 @@ class Piwik_Login_Controller extends Piwik_Controller * * @param array $user User info. * @param string $passwordHash The hashed password to use. + * @throws Exception */ private function setNewUserPassword($user, $passwordHash) { diff --git a/plugins/MobileMessaging/API.php b/plugins/MobileMessaging/API.php index 1d1c591bbfcad67442931dee8805a449e44632c4..02843e568dd1b94078013c9111ef3629fd632d71 100644 --- a/plugins/MobileMessaging/API.php +++ b/plugins/MobileMessaging/API.php @@ -36,6 +36,7 @@ class Piwik_MobileMessaging_API } /** + * @param string $provider * @return Piwik_MobileMessaging_SMSProvider */ static private function getSMSProviderInstance($provider) @@ -157,7 +158,9 @@ class Piwik_MobileMessaging_API /** * send a SMS * + * @param string $content * @param string $phoneNumber + * @param string $from * @return bool true * @ignore */ diff --git a/plugins/MobileMessaging/SMSProvider.php b/plugins/MobileMessaging/SMSProvider.php index 9f173113499a3c3555d913aabfcb81f97d3c55c2..6abc527dcba5b220d411905358b847b202245598 100644 --- a/plugins/MobileMessaging/SMSProvider.php +++ b/plugins/MobileMessaging/SMSProvider.php @@ -166,6 +166,7 @@ abstract class Piwik_MobileMessaging_SMSProvider * @param string $apiKey * @param string $smsText * @param string $phoneNumber + * @param string $from * @return bool true */ abstract public function sendSMS($apiKey, $smsText, $phoneNumber, $from); diff --git a/plugins/MultiSites/API.php b/plugins/MultiSites/API.php index e3d398c2592fcda427675c6f7d3df40fdf1ab86a..02a825fd25af4fc0143a8395029656593994929c 100755 --- a/plugins/MultiSites/API.php +++ b/plugins/MultiSites/API.php @@ -314,8 +314,9 @@ class Piwik_MultiSites_API * * @param Piwik_DataTable|Piwik_DataTable_Array $currentData * @param Piwik_DataTable|Piwik_DataTable_Array $pastData - * @param array $fields The array of string fields to calculate evolution - * metrics for. + * @param array $apiMetrics The array of string fields to calculate evolution + * metrics for. + * @throws Exception */ private function calculateEvolutionPercentages($currentData, $pastData, $apiMetrics) { diff --git a/plugins/PDFReports/API.php b/plugins/PDFReports/API.php index 4858f62ebeeabe34d4e54d4842c18c4447042a2a..20d5567120bb9a7014a418af5223b0125a7a51f6 100644 --- a/plugins/PDFReports/API.php +++ b/plugins/PDFReports/API.php @@ -76,7 +76,7 @@ class Piwik_PDFReports_API * @param string $reportFormat 'pdf', 'html' or any other format provided via the PDFReports.getReportFormats hook * @param array $reports array of reports * @param array $parameters array of parameters - * @param int $idSegment Segment Identifier + * @param bool|int $idSegment Segment Identifier * * @return int idReport generated */ @@ -199,12 +199,13 @@ class Piwik_PDFReports_API /** * Returns the list of reports matching the passed parameters * - * @param int $idSite If specified, will filter reports that belong to a specific idsite - * @param string $period If specified, will filter reports that are scheduled for this period (day,week,month) - * @param int $idReport If specified, will filter the report that has the given idReport - * @param int $idSegment If specified, will filter the report that has the given idSegment + * @param bool|int $idSite If specified, will filter reports that belong to a specific idsite + * @param bool|string $period If specified, will filter reports that are scheduled for this period (day,week,month) + * @param bool|int $idReport If specified, will filter the report that has the given idReport + * @param bool $ifSuperUserReturnOnlySuperUserReports + * @param bool|int $idSegment If specified, will filter the report that has the given idSegment + * @throws Exception * @return array - * @throws Exception if $idReport was specified but the report wasn't found */ public function getReports($idSite = false, $period = false, $idReport = false, $ifSuperUserReturnOnlySuperUserReports = false, $idSegment = false) { diff --git a/plugins/PrivacyManager/ReportsPurger.php b/plugins/PrivacyManager/ReportsPurger.php index 2fbc3fb6b63a7326b0a11aa6e40aacc2ab0e9032..fc6d1287a8884e67c49583d786dc2e2dafa93035 100755 --- a/plugins/PrivacyManager/ReportsPurger.php +++ b/plugins/PrivacyManager/ReportsPurger.php @@ -357,7 +357,7 @@ class Piwik_PrivacyManager_ReportsPurger * Utility function that returns an array period values based on the 'delete_reports_keep_*' * settings. The period values returned are the integer values stored in the DB. * - * @param array $deleteReportSettings The settings to use. + * @param array $settings The settings to use. * @return array An array of period values that should be kept when purging old data. */ private static function getReportPeriodsToKeep($settings) diff --git a/plugins/Proxy/Controller.php b/plugins/Proxy/Controller.php index 1d714e3570143feb0837461fd977a7eee8d358c6..02f57a44cde541712a6dd01a402dd8b0d5df97c9 100644 --- a/plugins/Proxy/Controller.php +++ b/plugins/Proxy/Controller.php @@ -23,7 +23,7 @@ class Piwik_Proxy_Controller extends Piwik_Controller * * @deprecated 1.5.1 * - * @param string $imageData Base-64 encoded image data (via $_POST) + * @internal param string $imageData Base-64 encoded image data (via $_POST) */ static public function exportImageWindow() { @@ -44,7 +44,7 @@ class Piwik_Proxy_Controller extends Piwik_Controller * * @deprecated 1.5.1 * - * @param string $imageData Base-64 encoded image data (via $_POST) + * @internal param string $imageData Base-64 encoded image data (via $_POST) */ static public function outputBinaryImage() { @@ -113,7 +113,7 @@ class Piwik_Proxy_Controller extends Piwik_Controller * Output redirection page instead of linking directly to avoid * exposing the referrer on the Piwik demo. * - * @param string $url (via $_GET) + * @internal param string $url (via $_GET) */ public function redirect() { diff --git a/plugins/Referers/API.php b/plugins/Referers/API.php index b0f0d34dfaaebb5fd3818148360be85d79fbdc92..801528c467e57585e6366361f7b5013c5d6828ca 100644 --- a/plugins/Referers/API.php +++ b/plugins/Referers/API.php @@ -32,6 +32,13 @@ class Piwik_Referers_API } /** + * @param string $name + * @param int $idSite + * @param string $period + * @param Piwik_Date $date + * @param string $segment + * @param bool $expanded + * @param int|null $idSubtable * @return Piwik_DataTable */ protected function getDataTable($name, $idSite, $period, $date, $segment, $expanded = false, $idSubtable = null) @@ -53,10 +60,10 @@ class Piwik_Referers_API * @param string $period The period to get data for, either 'day', 'week', 'month', 'year', * or 'range'. * @param string $date The date of the period. - * @param string $segment The segment to use. - * @param int $typeReferer (deprecated) If you want to get data only for a specific referrer + * @param bool|string $segment The segment to use. + * @param bool|int $typeReferer (deprecated) If you want to get data only for a specific referrer * type, supply a type for this parameter. - * @param int $idSubtable For this report this value is a referrer type ID and not an actual + * @param bool|int $idSubtable For this report this value is a referrer type ID and not an actual * subtable ID. The result when using this parameter will be the * specific report for the given referrer type. * @param bool $expanded Whether to get report w/ subtables loaded or not. @@ -330,8 +337,8 @@ class Piwik_Referers_API * @param string $idSite * @param string $period * @param string $date - * @param string|false $segment - * @param int|false $idSubtable This ID does not reference a real DataTable record. Instead, it + * @param bool|string $segment + * @param bool|int $idSubtable This ID does not reference a real DataTable record. Instead, it * is the array index of an item in the /core/DataFiles/Socials.php file. * The urls are filtered by the social network at this index. * If false, no filtering is done and every social URL is returned. diff --git a/plugins/Referers/Archiver.php b/plugins/Referers/Archiver.php index 6e8152ed5e53d1846e0711da7ce28a2194c7dbe9..5d31a3d4210a98cbea4be6e79bf9c05dd410ab1b 100644 --- a/plugins/Referers/Archiver.php +++ b/plugins/Referers/Archiver.php @@ -188,8 +188,6 @@ class Piwik_Referers_Archiver extends Piwik_PluginsArchiver /** * Records the daily stats (numeric or datatable blob) into the archive tables. - * - * @param Piwik_ArchiveProcessor $this->getProcessor() */ protected function recordDayReports() { diff --git a/plugins/Referers/Controller.php b/plugins/Referers/Controller.php index 40d7ab3b6b32c7d7699e9e0361dbab8e91cb7f8f..85864e13dd7b9aaa83f23230294703a21c313fea 100644 --- a/plugins/Referers/Controller.php +++ b/plugins/Referers/Controller.php @@ -666,7 +666,7 @@ function DisplayTopKeywords($url = "") /** * Returns the URL for the sparkline of visits with a specific referrer type. * - * @param int $typeReferrer The referrer type. Referrer types are defined in Piwik_Common class. + * @param int $referrerType The referrer type. Referrer types are defined in Piwik_Common class. * @return string The URL that can be used to get a sparkline image. */ private function getReferrerUrlSparkline($referrerType) @@ -684,7 +684,7 @@ function DisplayTopKeywords($url = "") * Returns an array containing the number of distinct referrers for each * referrer type. * - * @param string|false $date The date to use when getting metrics. If false, the + * @param bool|string $date The date to use when getting metrics. If false, the * date query param is used. * @return array The metrics. */ @@ -715,7 +715,6 @@ function DisplayTopKeywords($url = "") * @param string $lastPeriodDate The date of the period in the past. * @param array $previousValues Array mapping view property names w/ past values. Keys * in this array should be the same as keys in $currentValues. - * @param bool $isVisits Whether the values are counting visits or something else. */ private function addEvolutionPropertiesToView($view, $date, $currentValues, $lastPeriodDate, $previousValues) { diff --git a/plugins/Referers/functions.php b/plugins/Referers/functions.php index 46d9e180007fa5fbcb3f421121e728b9a18679e0..572eaa64d7ed573d2b930f9da8ad10af6e0b3904 100644 --- a/plugins/Referers/functions.php +++ b/plugins/Referers/functions.php @@ -58,7 +58,7 @@ function Piwik_Referrers_getSocialNetworkFromDomain($url) * Returns true if a URL belongs to a social network, false if otherwise. * * @param string $url The URL to check. - * @param string|false $socialName The social network's name to check for, or false to check + * @param string|bool $socialName The social network's name to check for, or false to check * for any. * @return bool */ diff --git a/plugins/SegmentEditor/API.php b/plugins/SegmentEditor/API.php index 5d0aef113d4ba0f64bf75c8530f5c07c3d499212..c361d01626d612047e994d68875c1608dca73b26 100644 --- a/plugins/SegmentEditor/API.php +++ b/plugins/SegmentEditor/API.php @@ -121,6 +121,7 @@ class Piwik_SegmentEditor_API * Deletes a stored segment. * * @param $idSegment + * @return bool */ public function delete($idSegment) { @@ -145,6 +146,7 @@ class Piwik_SegmentEditor_API * @param bool $autoArchive Whether to automatically archive data with the segment or not. * @param bool $enabledAllUsers Whether the stored segment is viewable by all users or just the one that created it. * + * @return bool */ public function update($idSegment, $name, $definition, $idSite = false, $autoArchive = false, $enabledAllUsers = false) { @@ -213,6 +215,8 @@ class Piwik_SegmentEditor_API * Returns a stored segment by ID * * @param $idSegment + * @throws Exception + * @return bool */ public function get($idSegment) { diff --git a/plugins/SitesManager/API.php b/plugins/SitesManager/API.php index fcb5d7fbfef48cc83584c1c31a3cb9010fd15b3b..1f6c342af49728bb01a546e92ad03714d93f472c 100644 --- a/plugins/SitesManager/API.php +++ b/plugins/SitesManager/API.php @@ -56,7 +56,7 @@ class Piwik_SitesManager_API * This tag must be included on every page to be tracked by Piwik * * @param int $idSite - * @param string $customTitle Custom title given to the pageview + * @param string $piwikUrl * @return string The Javascript tag ready to be included on the HTML pages */ public function getJavascriptTag($idSite, $piwikUrl = '') @@ -109,7 +109,8 @@ class Piwik_SitesManager_API /** * Returns the website information : name, main_url * - * @exception if the site ID doesn't exist or the user doesn't have access to it + * @throws Exception if the site ID doesn't exist or the user doesn't have access to it + * @param int $idSite * @return array */ public function getSiteFromId($idSite) @@ -125,14 +126,15 @@ class Piwik_SitesManager_API * Returns the list of alias URLs registered for the given idSite. * The website ID must be valid when calling this method! * + * @param int $idSite * @return array list of alias URLs */ - private function getAliasSiteUrlsFromId($idsite) + private function getAliasSiteUrlsFromId($idSite) { $db = Zend_Registry::get('db'); $result = $db->fetchAll("SELECT url FROM " . Piwik_Common::prefixTable("site_url") . " - WHERE idsite = ?", $idsite); + WHERE idsite = ?", $idSite); $urls = array(); foreach ($result as $url) { $urls[] = $url['url']; @@ -143,7 +145,8 @@ class Piwik_SitesManager_API /** * Returns the list of all URLs registered for the given idSite (main_url + alias URLs). * - * @exception if the website ID doesn't exist or the user doesn't have access to it + * @throws Exception if the website ID doesn't exist or the user doesn't have access to it + * @param int $idSite * @return array list of URLs */ public function getSiteUrlsFromId($idSite) @@ -202,6 +205,7 @@ class Piwik_SitesManager_API * Returns the list of the website IDs that received some visits since the specified timestamp. * Requires super user access. * + * @param bool|int $timestamp * @return array The list of website IDs */ public function getSitesIdWithVisits($timestamp = false) @@ -260,7 +264,7 @@ class Piwik_SitesManager_API * Returns the list of websites with the 'view' or 'admin' access for the current user. * For the superUser it returns all the websites in the database. * - * @param int $limit Specify max number of sites to return + * @param bool|int $limit Specify max number of sites to return * @param bool $_restrictSitesToLogin Hack necessary when runnning scheduled tasks, where "Super User" is forced, but sometimes not desired, see #3017 * @return array array for each site, an array of information (idsite, name, main_url, etc.) */ @@ -297,6 +301,7 @@ class Piwik_SitesManager_API * Returns the list of websites ID with the 'view' or 'admin' access for the current user. * For the superUser it returns all the websites in the database. * + * @param bool $_restrictSitesToLogin * @return array list of websites ID */ public function getSitesIdWithAtLeastViewAccess($_restrictSitesToLogin = false) @@ -323,7 +328,9 @@ class Piwik_SitesManager_API * Returns the list of websites from the ID array in parameters. * The user access is not checked in this method so the ID have to be accessible by the user! * - * @param array list of website ID + * @param array $idSites list of website ID + * @param bool $limit + * @return array */ private function getSitesFromIds($idSites, $limit = false) { @@ -394,6 +401,7 @@ class Piwik_SitesManager_API * Returns all websites with a timezone matching one the specified timezones * * @param array $timezones + * @return array * @ignore */ public function getSitesIdFromTimezones($timezones) @@ -419,19 +427,21 @@ class Piwik_SitesManager_API * Requires Super User access. * * The website is defined by a name and an array of URLs. - * @param string Site name - * @param array|string The URLs array must contain at least one URL called the 'main_url' ; + * @param string $siteName Site name + * @param array|string $urls The URLs array must contain at least one URL called the 'main_url' ; * if several URLs are provided in the array, they will be recorded * as Alias URLs for this website. - * @param int Is Ecommerce Reporting enabled for this website? - * @param int $sitesearch Whether site search is enabled, 0 or 1 + * @param int $ecommerce Is Ecommerce Reporting enabled for this website? + * @param null $siteSearch * @param string $searchKeywordParameters Comma separated list of search keyword parameter names * @param string $searchCategoryParameters Comma separated list of search category parameter names - * @param string Comma separated list of IPs to exclude from the reports (allows wildcards) - * @param string Timezone string, eg. 'Europe/London' - * @param string Currency, eg. 'EUR' - * @param string Website group identifier - * @param string Date at which the statistics for this website will start. Defaults to today's date in YYYY-MM-DD format + * @param string $excludedIps Comma separated list of IPs to exclude from the reports (allows wildcards) + * @param null $excludedQueryParameters + * @param string $timezone Timezone string, eg. 'Europe/London' + * @param string $currency Currency, eg. 'EUR' + * @param string $group Website group identifier + * @param string $startDate Date at which the statistics for this website will start. Defaults to today's date in YYYY-MM-DD format + * @param null|string $excludedUserAgents * @param int $keepURLFragments If 1, URL fragments will be kept when tracking. If 2, they * will be removed. If 0, the default global behavior will be used. * @see getKeepURLFragmentsGlobal. @@ -634,6 +644,8 @@ class Piwik_SitesManager_API * If some URLs given in parameter are already recorded as alias URLs for this website, * they won't be duplicated. The 'main_url' of the website won't be affected by this method. * + * @param int $idSite + * @param array|string $urls * @return int the number of inserted URLs */ public function addSiteAliasUrls($idSite, $urls) @@ -922,21 +934,22 @@ class Piwik_SitesManager_API * @param string $siteName website name * @param string|array $urls the website URLs * @param int $ecommerce Whether Ecommerce is enabled, 0 or 1 - * @param int $sitesearch Whether site search is enabled, 0 or 1 + * @param null|int $siteSearch Whether site search is enabled, 0 or 1 * @param string $searchKeywordParameters Comma separated list of search keyword parameter names * @param string $searchCategoryParameters Comma separated list of search category parameter names * @param string $excludedIps Comma separated list of IPs to exclude from being tracked (allows wildcards) - * @param null $excludedQueryParameters + * @param null|string $excludedQueryParameters * @param string $timezone Timezone * @param string $currency Currency code * @param string $group Group name where this website belongs * @param string $startDate Date at which the statistics for this website will start. Defaults to today's date in YYYY-MM-DD format + * @param null|string $excludedUserAgents * @param int|null $keepURLFragments If 1, URL fragments will be kept when tracking. If 2, they * will be removed. If 0, the default global behavior will be used. + * @throws Exception * @see getKeepURLFragmentsGlobal. If null, the existing value will * not be modified. * - * @throws Exception * @return bool true on success */ public function updateSite($idSite, @@ -1180,6 +1193,7 @@ class Piwik_SitesManager_API /** * Remove the final slash in the URLs if found * + * @param string $url * @return string the URL without the trailing slash */ private function removeTrailingSlash($url) @@ -1196,6 +1210,7 @@ class Piwik_SitesManager_API /** * Tests if the URL is a valid URL * + * @param string $url * @return bool */ private function isValidUrl($url) diff --git a/plugins/SitesManager/SitesManager.php b/plugins/SitesManager/SitesManager.php index 81f7c8a60ba2bf840c3f25f9bc1af3423bedbf3d..c7ddbb55ba06b2db7a22ad8f6a3148b36217163a 100644 --- a/plugins/SitesManager/SitesManager.php +++ b/plugins/SitesManager/SitesManager.php @@ -68,7 +68,9 @@ class Piwik_SitesManager extends Piwik_Plugin /** * Hooks when a website tracker cache is flushed (website updated, cache deleted, or empty cache) * Will record in the tracker config file all data needed for this website in Tracker. - * + * + * @param array $array + * @param int $idSite * @return void */ public function recordWebsiteDataInCache(&$array, $idSite) @@ -126,6 +128,7 @@ class Piwik_SitesManager extends Piwik_Plugin /** * Returns the array of excluded IPs to save in the config file * + * @param array $website * @return array */ private function getTrackerExcludedIps($website) @@ -164,6 +167,7 @@ class Piwik_SitesManager extends Piwik_Plugin /** * Returns the array of URL query parameters to exclude from URLs * + * @param array $website * @return array */ public static function getTrackerExcludedQueryParameters($website) diff --git a/plugins/UserCountry/API.php b/plugins/UserCountry/API.php index 261fda8f06b1a3639bb7b34291bed208048dfecc..3cab1401d88dafa4bae95f789c77d6e3fe3d7711 100644 --- a/plugins/UserCountry/API.php +++ b/plugins/UserCountry/API.php @@ -160,8 +160,10 @@ class Piwik_UserCountry_API * of the result of this function. * * @param string $ip The IP address. - * @param string|false $provider The ID of the provider to use or false to use the + * @param bool|string $provider The ID of the provider to use or false to use the * currently configured one. + * @throws Exception + * @return array|false */ public function getLocationFromIP($ip, $provider = false) { diff --git a/plugins/UserCountry/GeoIPAutoUpdater.php b/plugins/UserCountry/GeoIPAutoUpdater.php index a9aab90c6341f06721d9d203493b5e329e9e4e33..23e543acfddb560017afc8e8c5e901946b185280 100755 --- a/plugins/UserCountry/GeoIPAutoUpdater.php +++ b/plugins/UserCountry/GeoIPAutoUpdater.php @@ -79,8 +79,10 @@ class Piwik_UserCountry_GeoIPAutoUpdater * If something happens that causes the download to fail, no exception is thrown, but * an error is logged. * + * @param string $dbType * @param string $url URL to the database to download. The type of database is determined * from this URL. + * @throws Exception */ private function downloadFile($dbType, $url) { @@ -119,6 +121,7 @@ class Piwik_UserCountry_GeoIPAutoUpdater * * @param string $path Path to zipped file. * @param bool $unlink Whether to unlink archive or not. + * @throws Exception */ public static function unzipDownloadedFile($path, $unlink = false) { @@ -286,6 +289,7 @@ class Piwik_UserCountry_GeoIPAutoUpdater * 'period' - 'weekly' or 'monthly'. When to run the updates. * * @param array $options + * @throws Exception */ public static function setUpdaterOptions($options) { @@ -350,6 +354,7 @@ class Piwik_UserCountry_GeoIPAutoUpdater * Returns the confiured URL (if any) for a type of database. * * @param string $key 'loc', 'isp' or 'org' + * @throws Exception * @return string|false */ public static function getConfiguredUrl($key) diff --git a/plugins/UserCountry/LocationProvider.php b/plugins/UserCountry/LocationProvider.php index 34dfac6dfcad54d5ae8932ab9bba8c1ff389f2cd..0274f2b7fce976f27aaa2f002525c76ab81fa9c2 100755 --- a/plugins/UserCountry/LocationProvider.php +++ b/plugins/UserCountry/LocationProvider.php @@ -432,7 +432,7 @@ abstract class Piwik_UserCountry_LocationProvider * will return an IPv4 address or false if the address is IPv6 (IPv6 is not * supported yet). * - * @param array $ip Must have 'ip' key. + * @param array $info Must have 'ip' key. * @return string|bool */ protected function getIpFromInfo($info) diff --git a/plugins/UserCountry/LocationProvider/GeoIp/Php.php b/plugins/UserCountry/LocationProvider/GeoIp/Php.php index 7e60ac520a08ba2dcb3394ef1b7e1fa0271fe26e..6508fbeba548f942b7a919d1c77351e50b3ddc75 100755 --- a/plugins/UserCountry/LocationProvider/GeoIp/Php.php +++ b/plugins/UserCountry/LocationProvider/GeoIp/Php.php @@ -46,7 +46,7 @@ class Piwik_UserCountry_LocationProvider_GeoIp_Php extends Piwik_UserCountry_Loc /** * Constructor. * - * @param array|false $customDbNames The possible filenames for each type of GeoIP database. + * @param array|bool $customDbNames The possible filenames for each type of GeoIP database. * eg array( * 'loc' => array('GeoLiteCity.dat'), * 'isp' => array('GeoIP.dat', 'GeoIPISP.dat') diff --git a/plugins/UsersManager/API.php b/plugins/UsersManager/API.php index 65ca931704f68db80c39f2775fb3da201454c542..dd009bbcaf4223b25e94be858119706adc8cecff 100644 --- a/plugins/UsersManager/API.php +++ b/plugins/UsersManager/API.php @@ -474,6 +474,7 @@ class Piwik_UsersManager_API /** * Returns true if the given userLogin is known in the database * + * @param string $userLogin * @return bool true if the user is known */ public function userExists($userLogin) @@ -487,6 +488,7 @@ class Piwik_UsersManager_API /** * Returns true if user with given email (userEmail) is known in the database, or the super user * + * @param string $userEmail * @return bool true if the user is known */ public function userEmailExists($userEmail) diff --git a/plugins/UsersManager/UsersManager.php b/plugins/UsersManager/UsersManager.php index 1eea389e7ed0e2b9a0cf850db9eb4a166ccbeb3f..59c46b911e773bccfa22a3f2cd07b5fb16657ff6 100644 --- a/plugins/UsersManager/UsersManager.php +++ b/plugins/UsersManager/UsersManager.php @@ -62,6 +62,8 @@ class Piwik_UsersManager extends Piwik_Plugin * Will record in the tracker config file the list of Admin token_auth for this website. This * will be used when the Tracking API is used with setIp(), setForceDateTime(), setVisitorId(), etc. * + * @param $array + * @param $idSite * @return void */ public function recordAdminUsersInCache(&$array, $idSite) diff --git a/plugins/VisitTime/API.php b/plugins/VisitTime/API.php index 2f4aaee06b208296361de533a50e9067960d747e..895c62c698dc98ebede30b98dcbdc8d6be794397 100644 --- a/plugins/VisitTime/API.php +++ b/plugins/VisitTime/API.php @@ -57,7 +57,8 @@ class Piwik_VisitTime_API * @param string $idSite The site ID. Cannot refer to multiple sites. * @param string $period The period type: day, week, year, range... * @param string $date The start date of the period. Cannot refer to multiple dates. - * @param string $segment The segment. + * @param bool|string $segment The segment. + * @throws Exception * @return Piwik_DataTable */ public function getByDayOfWeek($idSite, $period, $date, $segment = false) diff --git a/tests/PHPUnit/BaseFixture.php b/tests/PHPUnit/BaseFixture.php index aa84e1b013cc9e330107c83830e8946974cf67ce..dad1e559e7caa9cb38b6602094e6a8b74c8de8ea 100644 --- a/tests/PHPUnit/BaseFixture.php +++ b/tests/PHPUnit/BaseFixture.php @@ -40,6 +40,10 @@ abstract class Test_Piwik_BaseFixture extends PHPUnit_Framework_Assert * @param int $ecommerce * @param string $siteName * + * @param bool|string $siteUrl + * @param int $siteSearch + * @param null|string $searchKeywordParameters + * @param null|string $searchCategoryParameters * @return int idSite of website created */ public static function createWebsite($dateTime, $ecommerce = 0, $siteName = 'Piwik test', $siteUrl = false, @@ -105,9 +109,10 @@ abstract class Test_Piwik_BaseFixture extends PHPUnit_Framework_Assert /** * Returns a PiwikTracker object that you can then use to track pages or goals. * - * @param $idSite - * @param $dateTime + * @param int $idSite + * @param string $dateTime * @param boolean $defaultInit If set to true, the tracker object will have default IP, user agent, time, resolution, etc. + * @param bool $useLocal * * @return PiwikTracker */ diff --git a/tests/PHPUnit/IntegrationTestCase.php b/tests/PHPUnit/IntegrationTestCase.php index 1d88c5e5a3b2bf1b20c3f7040dfad4541c4defba..7cb0228c5ca67630d1c6f515ba36a691c0b8eafa 100755 --- a/tests/PHPUnit/IntegrationTestCase.php +++ b/tests/PHPUnit/IntegrationTestCase.php @@ -55,7 +55,7 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase } /** - * @param $createEmptyDatabase + * @param bool $installPlugins */ protected static function installAndLoadPlugins($installPlugins) { @@ -314,6 +314,7 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase * * @param string $dateTime eg '2010-01-01 12:34:56' * @param string $period eg 'day', 'week', 'month', 'year' + * @return array */ protected static function getApiForTestingScheduledReports($dateTime, $period) { @@ -453,13 +454,13 @@ abstract class IntegrationTestCase extends PHPUnit_Framework_TestCase * @param array $parametersToSet Parameters to set in api call * @param array $formats Array of 'format' to fetch from API * @param array $periods Array of 'period' to query API - * @param bool $supertableApi - * @param bool $setDateLastN If set to true, the 'date' parameter will be rewritten to query instead a range of dates, rather than one period only. + * @param bool $supertableApi + * @param bool $setDateLastN If set to true, the 'date' parameter will be rewritten to query instead a range of dates, rather than one period only. * @param bool|string $language 2 letter language code, defaults to default piwik language - * @param bool|string $segment * @param bool|string $fileExtension * * @throws Exception + * * @return array of API URLs query strings */ protected function generateUrlsApi($parametersToSet, $formats, $periods, $supertableApi = false, $setDateLastN = false, $language = false, $fileExtension = false)