From 86850ebd9c5a8ab41c367d0c8084ce87bccb87ef Mon Sep 17 00:00:00 2001
From: sgiehl <stefan@piwik.org>
Date: Sat, 3 Aug 2013 22:59:20 +0200
Subject: [PATCH] doc blocks

---
 plugins/API/ProcessedReport.php                  |  2 +-
 plugins/API/RowEvolution.php                     | 14 +++++++++++++-
 plugins/Actions/API.php                          | 14 ++++++++++++--
 plugins/Actions/Actions.php                      |  6 +++++-
 plugins/Annotations/API.php                      |  2 +-
 plugins/ExampleRssWidget/Controller.php          |  3 +++
 plugins/Installation/FormDatabaseSetup.php       |  2 +-
 plugins/MultiSites/API.php                       |  4 ++--
 plugins/UserCountry/LocationProvider.php         |  2 +-
 plugins/UserCountry/LocationProvider/Default.php |  4 ++--
 plugins/UsersManager/API.php                     |  2 +-
 11 files changed, 42 insertions(+), 13 deletions(-)

diff --git a/plugins/API/ProcessedReport.php b/plugins/API/ProcessedReport.php
index b30a3d7901..80a31b83f9 100644
--- a/plugins/API/ProcessedReport.php
+++ b/plugins/API/ProcessedReport.php
@@ -318,7 +318,7 @@ class Piwik_API_ProcessedReport
      * - translate metric names to a separate array : $columns
      *
      * @param int $idSite enables monetary value formatting based on site currency
-     * @param \Piwik\DataTable\Set $dataTable
+     * @param \Piwik\DataTable\Map $dataTable
      * @param array $reportMetadata
      * @param bool $showRawMetrics
      * @return array Simple|Set $newReport with human readable format & array $columns list of translated column names & Simple|Set $rowsMetadata
diff --git a/plugins/API/RowEvolution.php b/plugins/API/RowEvolution.php
index 21ab108c8d..f8ff5e2235 100644
--- a/plugins/API/RowEvolution.php
+++ b/plugins/API/RowEvolution.php
@@ -91,6 +91,11 @@ class Piwik_API_RowEvolution
         return $dataTable;
     }
 
+    /**
+     * @param DataTable\Map  $dataTable
+     * @param array          $labels
+     * @return array
+     */
     protected function getLabelsFromDataTable($dataTable, $labels)
     {
         // if no labels specified, use all possible labels as list
@@ -112,7 +117,7 @@ class Piwik_API_RowEvolution
 
     /**
      * Get row evolution for a single label
-     * @param DataTable $dataTable
+     * @param DataTable\Map $dataTable
      * @param array $metadata
      * @param string $apiModule
      * @param string $apiAction
@@ -173,6 +178,13 @@ class Piwik_API_RowEvolution
         return $return;
     }
 
+    /**
+     * @param Row     $row
+     * @param string  $apiModule
+     * @param string  $apiAction
+     * @param bool    $labelUseAbsoluteUrl
+     * @return bool|string
+     */
     private function getRowUrlForEvolutionLabel($row, $apiModule, $apiAction, $labelUseAbsoluteUrl)
     {
         $url = $row->getMetadata('url');
diff --git a/plugins/Actions/API.php b/plugins/Actions/API.php
index 263e3e4a6b..768389f8c0 100644
--- a/plugins/Actions/API.php
+++ b/plugins/Actions/API.php
@@ -288,7 +288,12 @@ class Piwik_Actions_API
         return $dataTable;
     }
 
-    //Visitors can search, and then click "next" to view more results. This is the average number of search results pages viewed for this keyword.
+    /**
+     * Visitors can search, and then click "next" to view more results. This is the average number of search results pages viewed for this keyword.
+     *
+     * @param DataTable|DataTable\Simple|DataTable\Map $dataTable
+     * @param string $columnToRead
+     */
     protected function addPagesPerSearchColumn($dataTable, $columnToRead = 'nb_hits')
     {
         $dataTable->filter('ColumnCallbackAddColumnQuotient', array('nb_pages_per_search', $columnToRead, 'nb_visits', $precision = 1));
@@ -463,6 +468,8 @@ class Piwik_Actions_API
 
     /**
      * Common filters for Page URLs and Page Titles
+     *
+     * @param DataTable|DataTable\Simple|DataTable\Map $dataTable
      */
     protected function filterPageDatatable($dataTable)
     {
@@ -507,7 +514,10 @@ class Piwik_Actions_API
     }
 
     /**
-     * Common filters for all Actions API getters
+     * Common filters for all Actions API
+     *
+     * @param DataTable|DataTable\Simple|DataTable\Map $dataTable
+     * @param bool $expanded
      */
     protected function filterActionsDataTable($dataTable, $expanded = false)
     {
diff --git a/plugins/Actions/Actions.php b/plugins/Actions/Actions.php
index fdd116c671..2d78cf9959 100644
--- a/plugins/Actions/Actions.php
+++ b/plugins/Actions/Actions.php
@@ -669,7 +669,11 @@ class Piwik_Actions extends Plugin
         
         return $result;
     }
-    
+
+    /**
+     * @param \Piwik\DataTable $dataTable
+     * @param int $level
+     */
     public static function setDataTableRowLevels($dataTable, $level = 0)
     {
         foreach ($dataTable->getRows() as $row) {
diff --git a/plugins/Annotations/API.php b/plugins/Annotations/API.php
index e0c62e8390..b1abd3c480 100755
--- a/plugins/Annotations/API.php
+++ b/plugins/Annotations/API.php
@@ -305,7 +305,7 @@ class Piwik_Annotations_API
      * @param bool|int $lastN  Whether to include the last N periods in the range or not.
      *                         Ignored if period == range.
      *
-     * @return array
+     * @return Date[]   array of Date objects or array(false, false)
      * @ignore
      */
     public static function getDateRangeForPeriod($date, $period, $lastN = false)
diff --git a/plugins/ExampleRssWidget/Controller.php b/plugins/ExampleRssWidget/Controller.php
index aaa53a7ef1..ce1806b632 100644
--- a/plugins/ExampleRssWidget/Controller.php
+++ b/plugins/ExampleRssWidget/Controller.php
@@ -40,6 +40,9 @@ class Piwik_ExampleRssWidget_Controller extends Controller
         }
     }
 
+    /**
+     * @param \Exception $e
+     */
     protected function error($e)
     {
         echo '<div class="pk-emptyDataTable">'
diff --git a/plugins/Installation/FormDatabaseSetup.php b/plugins/Installation/FormDatabaseSetup.php
index f4d1f99247..cd55df856a 100644
--- a/plugins/Installation/FormDatabaseSetup.php
+++ b/plugins/Installation/FormDatabaseSetup.php
@@ -283,7 +283,7 @@ class Piwik_Installation_FormDatabaseSetup_Rule_checkUserPrivileges extends HTML
     /**
      * Drops the tables created by the privilege checking queries, if they exist.
      *
-     * @param $db The database object to use.
+     * @param \Piwik\Db $db The database object to use.
      */
     private function dropExtraTables($db)
     {
diff --git a/plugins/MultiSites/API.php b/plugins/MultiSites/API.php
index 6e4feeba76..dbaf64e0a4 100755
--- a/plugins/MultiSites/API.php
+++ b/plugins/MultiSites/API.php
@@ -396,8 +396,8 @@ class Piwik_MultiSites_API
      * Sets the total evolution metadata for a datatable returned by $this->buildDataTable
      * given data for the last period.
      *
-     * @param DataTable $dataTable
-     * @param DataTable $pastData
+     * @param DataTable|DataTable\Map $dataTable
+     * @param DataTable|DataTable\Map $pastData
      * @param array $apiMetrics Metrics info.
      */
     private function setPastDataMetadata($dataTable, $pastData, $apiMetrics)
diff --git a/plugins/UserCountry/LocationProvider.php b/plugins/UserCountry/LocationProvider.php
index 40751b7247..bb82ebc9f5 100755
--- a/plugins/UserCountry/LocationProvider.php
+++ b/plugins/UserCountry/LocationProvider.php
@@ -132,7 +132,7 @@ abstract class Piwik_UserCountry_LocationProvider
     /**
      * Returns every available provider instance.
      *
-     * @return array
+     * @return Piwik_UserCountry_LocationProvider[]
      */
     public static function getAllProviders()
     {
diff --git a/plugins/UserCountry/LocationProvider/Default.php b/plugins/UserCountry/LocationProvider/Default.php
index a7798a5ca0..f5956076b6 100755
--- a/plugins/UserCountry/LocationProvider/Default.php
+++ b/plugins/UserCountry/LocationProvider/Default.php
@@ -48,7 +48,7 @@ class Piwik_UserCountry_LocationProvider_Default extends Piwik_UserCountry_Locat
      *
      * This implementation is always available.
      *
-     * @return true
+     * @return bool  always true
      */
     public function isAvailable()
     {
@@ -60,7 +60,7 @@ class Piwik_UserCountry_LocationProvider_Default extends Piwik_UserCountry_Locat
      *
      * This implementation is always working correctly.
      *
-     * @return true
+     * @return bool  always true
      */
     public function isWorking()
     {
diff --git a/plugins/UsersManager/API.php b/plugins/UsersManager/API.php
index 9c9c1a776e..104961c951 100644
--- a/plugins/UsersManager/API.php
+++ b/plugins/UsersManager/API.php
@@ -201,7 +201,7 @@ class Piwik_UsersManager_API
      * If a user doesn't have any access to the $idSite ('noaccess'),
      * the user will not be in the returned array.
      *
-     * @param int website ID
+     * @param int $idSite website ID
      *
      * @return array    The returned array has the format
      *                    array(
-- 
GitLab