@@ -108,8 +108,7 @@ |
||
| 108 | 108 | if($newBalance < 0){ |
| 109 | 109 | if($balance >= 0) { |
| 110 | 110 | $negativeBalance = new UserNegativeBalanceEvent($user, true); |
| 111 | - } |
|
| 112 | - else { |
|
| 111 | + } else { |
|
| 113 | 112 | $negativeBalance = new UserNegativeBalanceEvent($user, false); |
| 114 | 113 | } |
| 115 | 114 | $this->eventDispatcher->dispatch('upont.negative_balance', $negativeBalance); |
@@ -32,8 +32,7 @@ discard block |
||
| 32 | 32 | $list = fopen($input->getArgument('usernames'), 'r+'); |
| 33 | 33 | $usernames = str_replace(["\r", "\n"], ['', ''], fgets($list)); |
| 34 | 34 | $usernameArray = explode(',', $usernames); |
| 35 | - } |
|
| 36 | - else { |
|
| 35 | + } else { |
|
| 37 | 36 | $usernameArray = explode(',', $input->getArgument('usernames')); |
| 38 | 37 | } |
| 39 | 38 | |
@@ -42,8 +41,7 @@ discard block |
||
| 42 | 41 | if ($user) { |
| 43 | 42 | $user->setDepartment($input->getArgument('department')); |
| 44 | 43 | $successCount++; |
| 45 | - } |
|
| 46 | - else { |
|
| 44 | + } else { |
|
| 47 | 45 | $output->writeln('<error>Username '.$username.' n\'existe pas</error>'); |
| 48 | 46 | } |
| 49 | 47 | } |
@@ -112,12 +112,10 @@ discard block |
||
| 112 | 112 | if (!$noPhoto) { |
| 113 | 113 | $updateExistingPhoto++; |
| 114 | 114 | } |
| 115 | - } |
|
| 116 | - else { |
|
| 115 | + } else { |
|
| 117 | 116 | $notUpdatedInteractivelyCount++; |
| 118 | 117 | } |
| 119 | - } |
|
| 120 | - else { |
|
| 118 | + } else { |
|
| 121 | 119 | $unfoundCount++; |
| 122 | 120 | } |
| 123 | 121 | |
@@ -137,8 +135,7 @@ discard block |
||
| 137 | 135 | 'Non-updated photos: '.($unfoundCount+$notUpdatedInteractivelyCount), |
| 138 | 136 | 'Replaced photos: '.$updateExistingPhoto |
| 139 | 137 | ]); |
| 140 | - } |
|
| 141 | - else { |
|
| 138 | + } else { |
|
| 142 | 139 | $output->writeln( |
| 143 | 140 | ['Missing photos in promo '.$userSpecification.': '.($updateCount+$unfoundCount+$notUpdatedInteractivelyCount), |
| 144 | 141 | ($input->getOption('preview') && !$input->getOption('interactive') ? 'To be i' : 'I').'mported missing photos: '.$updateCount, |
@@ -33,8 +33,7 @@ discard block |
||
| 33 | 33 | |
| 34 | 34 | if ($input->getOption('all')) { |
| 35 | 35 | $clubsToUpdate = $userRepo->findAll(); |
| 36 | - } |
|
| 37 | - else { |
|
| 36 | + } else { |
|
| 38 | 37 | $clubsToUpdate = array_map([$userRepo, 'findOneBySlug'], $clubSlugs); |
| 39 | 38 | } |
| 40 | 39 | |
@@ -50,17 +49,14 @@ discard block |
||
| 50 | 49 | if ($countUsers == 0 && $clubToUpdate->getActive()) { |
| 51 | 50 | if ($input->getOption('preview')) { |
| 52 | 51 | $output->writeln('<comment>'.$clubToUpdate->getFullName().' to be disabled'.'</comment>'); |
| 53 | - } |
|
| 54 | - else { |
|
| 52 | + } else { |
|
| 55 | 53 | $clubToUpdate->setActive(false); |
| 56 | 54 | $output->writeln('<comment>'.$clubToUpdate->getFullName().' disabled'.'</comment>'); |
| 57 | 55 | } |
| 58 | - } |
|
| 59 | - else if ($countUsers > 0 && !$clubToUpdate->getActive()) { |
|
| 56 | + } else if ($countUsers > 0 && !$clubToUpdate->getActive()) { |
|
| 60 | 57 | if ($input->getOption('preview')) { |
| 61 | 58 | $output->writeln('<info>'.$clubToUpdate->getFullName().' to be enabled'.'</info>'); |
| 62 | - } |
|
| 63 | - else { |
|
| 59 | + } else { |
|
| 64 | 60 | $clubToUpdate->setActive(true); |
| 65 | 61 | $output->writeln('<info>'.$clubToUpdate->getFullName().' enabled'.'</info>'); |
| 66 | 62 | } |