diff options
author | sgiehl <stefan@piwik.org> | 2013-08-10 17:55:28 +0400 |
---|---|---|
committer | sgiehl <stefan@piwik.org> | 2013-08-10 17:55:28 +0400 |
commit | 8386cf448f2f395622245567903b0715ef14dd32 (patch) | |
tree | 5038e141ff2fb25a7dcf298c5e3e20a71f71fb86 /core | |
parent | 64ca5d548c0cf0c4eef9f5f104901fbf14800127 (diff) |
added some inline variable type hints / fixed some doc blocks
Diffstat (limited to 'core')
-rw-r--r-- | core/API/DataTableManipulator/LabelFilter.php | 3 | ||||
-rw-r--r-- | core/Controller.php | 4 | ||||
-rw-r--r-- | core/DataTableVisualization.php | 3 | ||||
-rw-r--r-- | core/Db.php | 1 | ||||
-rw-r--r-- | core/Log.php | 1 | ||||
-rw-r--r-- | core/Period.php | 2 | ||||
-rw-r--r-- | core/PluginsArchiver.php | 1 | ||||
-rw-r--r-- | core/PluginsManager.php | 7 | ||||
-rw-r--r-- | core/TaskScheduler.php | 6 | ||||
-rw-r--r-- | core/Tracker/Db/Pdo/Mysql.php | 3 | ||||
-rw-r--r-- | core/Visualization/Sparkline.php | 5 |
11 files changed, 30 insertions, 6 deletions
diff --git a/core/API/DataTableManipulator/LabelFilter.php b/core/API/DataTableManipulator/LabelFilter.php index 45ca278fc1..90065e3175 100644 --- a/core/API/DataTableManipulator/LabelFilter.php +++ b/core/API/DataTableManipulator/LabelFilter.php @@ -143,6 +143,9 @@ class LabelFilter extends DataTableManipulator /** * Filter a DataTable instance. See @filter for more info. + * + * @param DataTable\Simple|DataTable\Map $dataTable + * @return mixed */ protected function manipulateDataTable($dataTable) { diff --git a/core/Controller.php b/core/Controller.php index 9b02395d81..ee5b5ada1b 100644 --- a/core/Controller.php +++ b/core/Controller.php @@ -628,9 +628,9 @@ abstract class Controller } /** - * Returns default website that Piwik should load + * Returns default website id that Piwik should load * - * @return Site + * @return bool|int */ protected function getDefaultWebsiteId() { diff --git a/core/DataTableVisualization.php b/core/DataTableVisualization.php index e0be29e8d1..9e409d8fdc 100644 --- a/core/DataTableVisualization.php +++ b/core/DataTableVisualization.php @@ -137,7 +137,7 @@ abstract class DataTableVisualization * * @param string $klass The visualization class. * - * @return DataTableVisualization[] + * @return array */ public static function getVisualizationIdsWithInheritance($klass) { @@ -160,6 +160,7 @@ abstract class DataTableVisualization */ public static function getAvailableVisualizations() { + /** @var self[] $visualizations */ $visualizations = array(); Piwik_PostEvent(self::GET_AVAILABLE_EVENT, array(&$visualizations)); diff --git a/core/Db.php b/core/Db.php index 706c7c5f2b..e4d09e4bbb 100644 --- a/core/Db.php +++ b/core/Db.php @@ -46,6 +46,7 @@ class Db */ static public function exec($sql) { + /** @var \Zend_Db_Adapter_Abstract $db */ $db = \Zend_Registry::get('db'); $profiler = $db->getProfiler(); $q = $profiler->queryStart($sql, \Zend_Db_Profiler::INSERT); diff --git a/core/Log.php b/core/Log.php index 7b048d851c..48a9f6c429 100644 --- a/core/Log.php +++ b/core/Log.php @@ -161,6 +161,7 @@ abstract class Log extends \Zend_Log { $configAPI = Config::getInstance()->log; + /** @var Log[] $aLoggers */ $aLoggers = array( 'logger_api_call' => new APICall, 'logger_exception' => new Exception, diff --git a/core/Period.php b/core/Period.php index 3c04d54308..725bc71ba5 100644 --- a/core/Period.php +++ b/core/Period.php @@ -261,7 +261,7 @@ abstract class Period * Returns Period_Day for a period made of days (week, month), * Period_Month for a period made of months (year) * - * @return array Period + * @return Period[] */ public function getSubperiods() { diff --git a/core/PluginsArchiver.php b/core/PluginsArchiver.php index 475e4bb106..1fa0be8ed0 100644 --- a/core/PluginsArchiver.php +++ b/core/PluginsArchiver.php @@ -14,6 +14,7 @@ use Piwik\Config; use Piwik\Common; use Piwik\ArchiveProcessor; use Piwik\ArchiveProcessor\Day; +use Piwik\ArchiveProcessor\Period; use Piwik\DataAccess\LogAggregator; /** diff --git a/core/PluginsManager.php b/core/PluginsManager.php index e61b7195fc..0b8bcabe58 100644 --- a/core/PluginsManager.php +++ b/core/PluginsManager.php @@ -31,6 +31,9 @@ class PluginsManager protected $pluginsToLoad = array(); protected $doLoadPlugins = true; + /** + * @var Plugin[] + */ protected $loadedPlugins = array(); /** * Default theme used in Piwik. @@ -417,7 +420,7 @@ class PluginsManager * 'UserSettings' => Plugin $pluginObject, * ); * - * @return array,Plugin + * @return Plugin[] */ public function getLoadedPlugins() { @@ -429,7 +432,7 @@ class PluginsManager * * @param string $name * @throws \Exception - * @return array + * @return Plugin */ public function getLoadedPlugin($name) { diff --git a/core/TaskScheduler.php b/core/TaskScheduler.php index 6ca306bcde..8bc1a7b3c7 100644 --- a/core/TaskScheduler.php +++ b/core/TaskScheduler.php @@ -171,6 +171,12 @@ class TaskScheduler return self::getTimetableFromOptionValue(Piwik_GetOption(self::TIMETABLE_OPTION_STRING)); } + /** + * Executes the given taks + * + * @param ScheduledTask $task + * @return string + */ static private function executeTask($task) { try { diff --git a/core/Tracker/Db/Pdo/Mysql.php b/core/Tracker/Db/Pdo/Mysql.php index da77824aab..f42ebdc70c 100644 --- a/core/Tracker/Db/Pdo/Mysql.php +++ b/core/Tracker/Db/Pdo/Mysql.php @@ -25,6 +25,9 @@ use Piwik\Tracker\Db\DbException; */ class Mysql extends Db { + /** + * @var PDO + */ protected $connection = null; protected $dsn; protected $username; diff --git a/core/Visualization/Sparkline.php b/core/Visualization/Sparkline.php index d781e8a95d..38679027dd 100644 --- a/core/Visualization/Sparkline.php +++ b/core/Visualization/Sparkline.php @@ -150,6 +150,11 @@ class Sparkline implements ViewInterface $this->sparkline->Output(); } + /** + * Sets the sparkline colors + * + * @param Sparkline_Line $sparkline + */ private function setSparklineColors($sparkline) { $colors = Common::getRequestVar('colors', false, 'json'); |