Conditions | 2 |
Paths | 2 |
Total Lines | 16 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
56 | private function fetchUsers(Guild $guild, $usersList): void |
||
57 | { |
||
58 | $this->removeUsers($guild); |
||
59 | |||
60 | foreach ($usersList as $user) { |
||
61 | preg_match('/\/u\/(.*)\//', $user->getAttribute('href'), $matchCode); |
||
62 | |||
63 | $entity = UserFactory::create([ |
||
64 | 'uuid' => $matchCode[1], |
||
65 | 'title' => trim($user->nodeValue), |
||
66 | 'guild' => $guild, |
||
67 | ]); |
||
68 | $this->em->persist($entity); |
||
69 | } |
||
70 | $this->em->flush(); |
||
71 | } |
||
72 | } |
||
73 |