@@ -13,7 +13,7 @@ |
||
| 13 | 13 | |
| 14 | 14 | public function __construct(EntityManager $manager, TokenStorage $tokenStorage) |
| 15 | 15 | { |
| 16 | - $this->manager = $manager; |
|
| 16 | + $this->manager = $manager; |
|
| 17 | 17 | $this->tokenStorage = $tokenStorage; |
| 18 | 18 | } |
| 19 | 19 | |
@@ -25,9 +25,9 @@ |
||
| 25 | 25 | } |
| 26 | 26 | |
| 27 | 27 | return [ |
| 28 | - 'version' => $out[1][count($out[0])-1], |
|
| 29 | - 'major' => $out[2][count($out[0])-1], |
|
| 30 | - 'minor' => $out[3][count($out[0])-1], |
|
| 28 | + 'version' => $out[1][count($out[0]) - 1], |
|
| 29 | + 'major' => $out[2][count($out[0]) - 1], |
|
| 30 | + 'minor' => $out[3][count($out[0]) - 1], |
|
| 31 | 31 | 'build' => shell_exec('git log --pretty=format:"%h" -n 1'), |
| 32 | 32 | 'date' => (int)shell_exec('git log -1 --pretty=format:%ct') |
| 33 | 33 | ]; |
@@ -375,7 +375,7 @@ discard block |
||
| 375 | 375 | // Si on est l'auteur du shotgun, on peut récupérer la liste d'attente |
| 376 | 376 | if ($event->getAuthorUser() == $user) { |
| 377 | 377 | // It's a trap |
| 378 | - if (time() >= $event->getShotgunDate()){ |
|
| 378 | + if (time() >= $event->getShotgunDate()) { |
|
| 379 | 379 | $result['success'] = $success; |
| 380 | 380 | $result['fail'] = $fail; |
| 381 | 381 | } else { |
@@ -384,7 +384,7 @@ discard block |
||
| 384 | 384 | } |
| 385 | 385 | } |
| 386 | 386 | |
| 387 | - if ($this->is('ADMIN')){ |
|
| 387 | + if ($this->is('ADMIN')) { |
|
| 388 | 388 | $result['success'] = $success; |
| 389 | 389 | $result['fail'] = $fail; |
| 390 | 390 | } |
@@ -48,14 +48,14 @@ discard block |
||
| 48 | 48 | |
| 49 | 49 | $promoBalances = $this->manager->getRepository('KIFoyerBundle:Transaction')->getPromoBalances(); |
| 50 | 50 | |
| 51 | - foreach ($promoBalances as $promoBalance){ |
|
| 51 | + foreach ($promoBalances as $promoBalance) { |
|
| 52 | 52 | $statistics['promoBalances']['labels'][] = trim($promoBalance['promo']); |
| 53 | 53 | $statistics['promoBalances']['data'][] = round($promoBalance['promoBalance'], 2); |
| 54 | 54 | } |
| 55 | 55 | |
| 56 | 56 | $soldBeers = $this->manager->getRepository('KIFoyerBundle:Transaction')->getSoldBeers(); |
| 57 | 57 | |
| 58 | - foreach ($soldBeers as $soldBeer){ |
|
| 58 | + foreach ($soldBeers as $soldBeer) { |
|
| 59 | 59 | $statistics['soldBeers']['labels'][] = trim($soldBeer['name']); |
| 60 | 60 | $statistics['soldBeers']['data'][] = $soldBeer['soldBeer']; |
| 61 | 61 | } |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | { |
| 136 | 136 | $this->trust($this->isFoyerMember()); |
| 137 | 137 | |
| 138 | - $response = new StreamedResponse(function () { |
|
| 138 | + $response = new StreamedResponse(function() { |
|
| 139 | 139 | $results = $this->repository->getDebtsIterator(); |
| 140 | 140 | $handle = fopen('php://output', 'r+'); |
| 141 | 141 | |
@@ -172,7 +172,7 @@ discard block |
||
| 172 | 172 | { |
| 173 | 173 | $this->trust($this->isFoyerMember()); |
| 174 | 174 | |
| 175 | - $response = new StreamedResponse(function () { |
|
| 175 | + $response = new StreamedResponse(function() { |
|
| 176 | 176 | $results = $this->repository->getPromoBalance(); |
| 177 | 177 | $handle = fopen('php://output', 'r+'); |
| 178 | 178 | |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | ->setReplyTo([$from->getEmail() => $from->getFirstName().' '.$from->getLastName()]) |
| 28 | 28 | ; |
| 29 | 29 | |
| 30 | - foreach($attachments as $attachment){ |
|
| 30 | + foreach ($attachments as $attachment) { |
|
| 31 | 31 | $message->attach(Swift_Attachment::fromPath($attachment['path'])->setFilename($attachment['name'])); |
| 32 | 32 | } |
| 33 | 33 | |
@@ -139,10 +139,10 @@ discard block |
||
| 139 | 139 | array_multisort($ids, SORT_ASC, $locked); |
| 140 | 140 | |
| 141 | 141 | // On renvoie pas mal de données utiles |
| 142 | - $response = Achievement::getLevel($factor * $points); |
|
| 142 | + $response = Achievement::getLevel($factor*$points); |
|
| 143 | 143 | $return = [ |
| 144 | 144 | 'number' => $response['number'], |
| 145 | - 'points' => ceil($factor * $points), |
|
| 145 | + 'points' => ceil($factor*$points), |
|
| 146 | 146 | 'current_level' => $response['current'], |
| 147 | 147 | 'next_level' => isset($response['next']) ? $response['next'] : null, |
| 148 | 148 | 'unlocked' => $unlocked, |
@@ -299,7 +299,7 @@ discard block |
||
| 299 | 299 | if (!$notification->getReads()->contains($user) && !$notification->getRecipients()->contains($user)) |
| 300 | 300 | $return[] = $notification; |
| 301 | 301 | } else |
| 302 | - throw new \Exception('Notification : mode d\'envoi inconnu (' . $mode . ')'); |
|
| 302 | + throw new \Exception('Notification : mode d\'envoi inconnu ('.$mode.')'); |
|
| 303 | 303 | } |
| 304 | 304 | |
| 305 | 305 | // On marque chaque notification récupérée comme lue |
@@ -36,7 +36,7 @@ |
||
| 36 | 36 | $this->swiftMailer->send($message); |
| 37 | 37 | |
| 38 | 38 | $message = Swift_Message::newInstance() |
| 39 | - ->setSubject('[uPont] Nouvelle inscription (' . $username . ')') |
|
| 39 | + ->setSubject('[uPont] Nouvelle inscription ('.$username.')') |
|
| 40 | 40 | ->setFrom('[email protected]') |
| 41 | 41 | ->setTo('[email protected]') |
| 42 | 42 | ->setBody($this->twigEngine->render('KIUserBundle::registration-ki.txt.twig', $attributes)); |
@@ -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 | } |
@@ -12,14 +12,14 @@ discard block |
||
| 12 | 12 | |
| 13 | 13 | class DepartmentUpdateCommandTest extends KernelTestCase |
| 14 | 14 | { |
| 15 | - /** |
|
| 16 | - * @var \Doctrine\ORM\EntityManager |
|
| 17 | - */ |
|
| 15 | + /** |
|
| 16 | + * @var \Doctrine\ORM\EntityManager |
|
| 17 | + */ |
|
| 18 | 18 | private $em; |
| 19 | 19 | |
| 20 | - /** |
|
| 21 | - * {@inheritDoc} |
|
| 22 | - */ |
|
| 20 | + /** |
|
| 21 | + * {@inheritDoc} |
|
| 22 | + */ |
|
| 23 | 23 | protected function setUp() |
| 24 | 24 | { |
| 25 | 25 | self::bootKernel(); |
@@ -49,9 +49,9 @@ discard block |
||
| 49 | 49 | $this->assertEquals('IMI', $dreveton->getDepartment()); |
| 50 | 50 | } |
| 51 | 51 | |
| 52 | - /** |
|
| 53 | - * {@inheritDoc} |
|
| 54 | - */ |
|
| 52 | + /** |
|
| 53 | + * {@inheritDoc} |
|
| 54 | + */ |
|
| 55 | 55 | protected function tearDown() |
| 56 | 56 | { |
| 57 | 57 | parent::tearDown(); |