| Conditions | 3 |
| Paths | 3 |
| Total Lines | 29 |
| Code Lines | 19 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 34 | public function load(ObjectManager $manager) : void |
||
| 35 | { |
||
| 36 | $i = 0; |
||
| 37 | while ($i < $this->amount()) { |
||
| 38 | $this->queryBus()->handle( |
||
| 39 | new FilterOrganizationsQuery( |
||
| 40 | $this->getRandomUserByIndex($i), |
||
| 41 | 0, |
||
| 42 | 1 |
||
| 43 | ), |
||
| 44 | $organizations |
||
| 45 | ); |
||
| 46 | |||
| 47 | if (empty($organizations)) { |
||
| 48 | ++$i; |
||
| 49 | continue; |
||
| 50 | } |
||
| 51 | |||
| 52 | $this->commandBus()->handle( |
||
| 53 | new CreateProjectCommand( |
||
| 54 | 'Project ' . $i, |
||
| 55 | $organizations[0]['id'], |
||
| 56 | $organizations[0]['owners'][0]['id'], |
||
| 57 | $this->fakeIds()[$i] |
||
| 58 | ) |
||
| 59 | ); |
||
| 60 | ++$i; |
||
| 61 | } |
||
| 62 | } |
||
| 63 | } |
||
| 64 |