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:
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();