| @@ 22-35 (lines=14) @@ | ||
| 19 | * @var ObjectManager |
|
| 20 | */ |
|
| 21 | protected $em; |
|
| 22 | protected function createLeads() |
|
| 23 | { |
|
| 24 | $createdAt = new \DateTime('2016-12-28 12:03:10', new \DateTimeZone('UTC')); |
|
| 25 | for ($i = 1; $i < 4; $i++) { |
|
| 26 | $this->createLead($createdAt, $i); |
|
| 27 | $createdAt->add(new \DateInterval('P1D')); |
|
| 28 | } |
|
| 29 | ||
| 30 | //insert one lead for previous months |
|
| 31 | $createdAt = new \DateTime('now', new \DateTimeZone('UTC')); |
|
| 32 | $this->createLead($createdAt, ++$i); |
|
| 33 | $createdAt->sub(new \DateInterval('P2M')); |
|
| 34 | $this->createLead($createdAt, ++$i); |
|
| 35 | } |
|
| 36 | ||
| 37 | public function createLead($createdAt, $id) |
|
| 38 | { |
|
| @@ 24-36 (lines=13) @@ | ||
| 21 | */ |
|
| 22 | protected $em; |
|
| 23 | ||
| 24 | protected function createOpportunities() |
|
| 25 | { |
|
| 26 | $createdAt = new \DateTime('2016-12-28 12:03:10', new \DateTimeZone('UTC')); |
|
| 27 | for ($i = 1; $i < 4; $i++) { |
|
| 28 | $this->createOpportunity($createdAt, $i); |
|
| 29 | $createdAt->add(new \DateInterval('P1D')); |
|
| 30 | } |
|
| 31 | //insert one opportunity for previous months |
|
| 32 | $createdAt = new \DateTime('now', new \DateTimeZone('UTC')); |
|
| 33 | $this->createOpportunity($createdAt, ++$i); |
|
| 34 | $createdAt->sub(new \DateInterval('P2M')); |
|
| 35 | $this->createOpportunity($createdAt, ++$i); |
|
| 36 | } |
|
| 37 | ||
| 38 | /** |
|
| 39 | * @param $createdAt |
|