Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/matomo-org/matomo.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormattab <matthieu.aubry@gmail.com>2013-08-11 21:28:30 +0400
committermattab <matthieu.aubry@gmail.com>2013-08-11 21:28:30 +0400
commitd293408450bc8b0c0f79934da6a43914626935ae (patch)
treee50c0df2f698b6033e13f963b9a16a01ef5bf020 /core/Period.php
parent3b74ae5cdac37e16315c3a24ecf2591f742ca3c7 (diff)
parent2340530c1109a37527f3b8ad0b82e54e7a6eb137 (diff)
Merge branch 'plugin_namespaces'
Conflicts: plugins/UserCountryMap/Controller.php
Diffstat (limited to 'core/Period.php')
-rw-r--r--core/Period.php12
1 files changed, 2 insertions, 10 deletions
diff --git a/core/Period.php b/core/Period.php
index 725bc71ba5..b8867cbea5 100644
--- a/core/Period.php
+++ b/core/Period.php
@@ -19,16 +19,6 @@ use Piwik\Period\Week;
use Piwik\Period\Year;
/**
- * Creating a new Period subclass:
- *
- * Every overloaded method must start with the code
- * if(!$this->subperiodsProcessed)
- * {
- * $this->generate();
- * }
- * that checks whether the subperiods have already been computed.
- * This is for performance improvements, computing the subperiods is done a per demand basis.
- *
* @package Piwik
* @subpackage Period
*/
@@ -174,6 +164,7 @@ abstract class Period
return $this->getDate();
}
$periods = $this->getSubperiods();
+ /** @var $currentPeriod Period */
$currentPeriod = $periods[0];
while ($currentPeriod->getNumberOfSubperiods() > 0) {
$periods = $currentPeriod->getSubperiods();
@@ -196,6 +187,7 @@ abstract class Period
return $this->getDate();
}
$periods = $this->getSubperiods();
+ /** @var $currentPeriod Period */
$currentPeriod = $periods[count($periods) - 1];
while ($currentPeriod->getNumberOfSubperiods() > 0) {
$periods = $currentPeriod->getSubperiods();