| @@ 145-149 (lines=5) @@ | ||
| 142 | { |
|
| 143 | $randomUser = count($this->users) - 1; |
|
| 144 | ||
| 145 | foreach ($this->leads as $lead) { |
|
| 146 | $user = $this->users[mt_rand(0, $randomUser)]; |
|
| 147 | $this->setSecurityContext($user); |
|
| 148 | $this->loadSalesFlows($lead, $user); |
|
| 149 | } |
|
| 150 | $this->flush($this->em); |
|
| 151 | ||
| 152 | foreach ($this->opportunities as $opportunity) { |
|
| @@ 152-156 (lines=5) @@ | ||
| 149 | } |
|
| 150 | $this->flush($this->em); |
|
| 151 | ||
| 152 | foreach ($this->opportunities as $opportunity) { |
|
| 153 | $user = $this->users[mt_rand(0, $randomUser)]; |
|
| 154 | $this->setSecurityContext($user); |
|
| 155 | $this->loadSalesFlows($opportunity, $user); |
|
| 156 | } |
|
| 157 | $this->flush($this->em); |
|
| 158 | } |
|
| 159 | ||