diff options
author | mattab <matthieu.aubry@gmail.com> | 2013-08-02 17:59:33 +0400 |
---|---|---|
committer | mattab <matthieu.aubry@gmail.com> | 2013-08-02 17:59:33 +0400 |
commit | a96ec40e983a8b64f4c25def541a519ff3670e6a (patch) | |
tree | bef2a5f7b1e9532dc96161334e23a553cdff7ea1 /core/Period.php | |
parent | 61997f45e4c39360000e815c9e0853ae04e2f56f (diff) |
Refs #4059 Converting dozens of plugins/* classes to use Namespaces, \Piwik\Plugins\*
Added namespaces to functions.php files in the five plugins that had one
Work in progress
Diffstat (limited to 'core/Period.php')
-rw-r--r-- | core/Period.php | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/core/Period.php b/core/Period.php index 3c04d54308..f846ef6006 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(); |