Created
November 17, 2015 15:48
-
-
Save lorenzo/4a36e489df4683f46ee0 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$date = new DateTime(); | |
$someClass->findTimeFrame($date); | |
$otherClass->doStuff($date); | |
function findTimeFrame($fromDate) { | |
$this->conditions('from_date', '>=', $date); | |
... | |
} | |
// 3 months later... We need to restrict the time frame because REASONS | |
function findTimeFrame($fromDate) { | |
$this->conditions('from_date', '>=', $date); | |
$this->conditions('from_date', '<=', $date->modify('+1 week')); | |
... | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment