Completed
Push — master ( 1eb1d9...f12af0 )
by Markus
03:08
created
src/BCRM/BackendBundle/Command/MailChimpUpdateParticipantsListCommand.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -105,7 +105,7 @@
 block discarded – undo
105 105
      */
106 106
     protected function toBatch(ArrayCollection $emails, $deep = true)
107 107
     {
108
-        return $emails->map(function ($email) use($deep) {
108
+        return $emails->map(function($email) use($deep) {
109 109
             return array(
110 110
                 'email'      => $deep ? array('email' => $email) : $email,
111 111
                 'email_type' => 'html'
Please login to merge, or discard this patch.
src/BCRM/BackendBundle/Service/Payment.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -100,11 +100,11 @@
 block discarded – undo
100 100
             $event->payment                  = $payment;
101 101
             $payment->setPayload(new ArrayCollection($data));
102 102
             $this->eventMessageBus->publish($event);
103
-            Option::fromValue($this->logger)->map(function (LoggerInterface $logger) use ($payment) {
103
+            Option::fromValue($this->logger)->map(function(LoggerInterface $logger) use ($payment) {
104 104
                 $logger->info(sprintf('Payment "%s" is verified.', $payment->getId()), array($payment));
105 105
             });
106 106
         } else {
107
-            Option::fromValue($this->logger)->map(function (LoggerInterface $logger) use ($payment) {
107
+            Option::fromValue($this->logger)->map(function(LoggerInterface $logger) use ($payment) {
108 108
                 $logger->alert(sprintf('Payment "%s" could not be verified.', $payment->getId()), array($payment));
109 109
             });
110 110
         }
Please login to merge, or discard this patch.
src/BCRM/BackendBundle/Service/Ticket.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
     {
87 87
         $payment      = $event->payment;
88 88
         $registration = $event->registration;
89
-        Option::fromValue($this->logger)->map(function (LoggerInterface $logger) use ($registration, $payment) {
89
+        Option::fromValue($this->logger)->map(function(LoggerInterface $logger) use ($registration, $payment) {
90 90
             $logger->alert(sprintf('Registration "%s" has been paid with payment "%s".', $registration->getId(), $payment->getId()));
91 91
         });
92 92
         foreach ($this->ticketRepo->getTicketsForEmail(
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
             $updateCommand->id    = $ticket->getId();
99 99
             $updateCommand->data  = array('payment' => $payment);
100 100
             $this->commandBus->handle($updateCommand);
101
-            Option::fromValue($this->logger)->map(function (LoggerInterface $logger) use ($payment, $ticket) {
101
+            Option::fromValue($this->logger)->map(function(LoggerInterface $logger) use ($payment, $ticket) {
102 102
                 $logger->alert(sprintf('Assigning payment "%s" to ticket "%s"', $payment->getId(), $ticket->getCode()));
103 103
             });
104 104
         }
Please login to merge, or discard this patch.
src/BCRM/WebBundle/Controller/ConciergeController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -168,7 +168,7 @@
 block discarded – undo
168 168
         $end->setTime(23, 59, 59);
169 169
         $day = $now->between($start, $end) ? Ticket::DAY_SATURDAY : Ticket::DAY_SUNDAY;
170 170
 
171
-        $tickets  = array_map(function (Ticket $ticket) {
171
+        $tickets = array_map(function(Ticket $ticket) {
172 172
             return array(
173 173
                 'code'      => $ticket->getCode(),
174 174
                 'email'     => $ticket->getEmail(),
Please login to merge, or discard this patch.
src/BCRM/WebBundle/Controller/StatsController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -123,7 +123,7 @@  discard block
 block discarded – undo
123 123
      */
124 124
     protected function getCheckinsPerDay(array $tickets, $day)
125 125
     {
126
-        return array_reduce($tickets, function ($count, Ticket $ticket) use ($day) {
126
+        return array_reduce($tickets, function($count, Ticket $ticket) use ($day) {
127 127
             return $count + ($ticket->getType() === Registration::TYPE_NORMAL && $ticket->isCheckedIn() && $ticket->getDay() == $day ? 1 : 0);
128 128
         }, 0);
129 129
     }
@@ -140,10 +140,10 @@  discard block
 block discarded – undo
140 140
     protected function getUniqueDayCheckins(array $tickets, $day, $both = false)
141 141
     {
142 142
         $otherDayCheckins = array_map(
143
-            function (Ticket $ticket) {
143
+            function(Ticket $ticket) {
144 144
                 return $ticket->getEmail();
145 145
             },
146
-            array_filter($tickets, function (Ticket $ticket) use ($day) {
146
+            array_filter($tickets, function(Ticket $ticket) use ($day) {
147 147
                 return
148 148
                     $ticket->getType() === Registration::TYPE_NORMAL
149 149
                     && $ticket->isCheckedIn()
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
             })
152 152
         );
153 153
 
154
-        return array_reduce($tickets, function ($count, Ticket $ticket) use ($otherDayCheckins, $day, $both) {
154
+        return array_reduce($tickets, function($count, Ticket $ticket) use ($otherDayCheckins, $day, $both) {
155 155
             return $count + (
156 156
             $ticket->getType() === Registration::TYPE_NORMAL
157 157
             && $ticket->isCheckedIn()
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 
164 164
     protected function getNoShows(array $tickets, $day)
165 165
     {
166
-        return array_reduce($tickets, function ($count, Ticket $ticket) use ($day) {
166
+        return array_reduce($tickets, function($count, Ticket $ticket) use ($day) {
167 167
             return $count + (
168 168
             $ticket->getType() === Registration::TYPE_NORMAL
169 169
             && !$ticket->isCheckedIn()
Please login to merge, or discard this patch.
src/BCRM/WebBundle/Tests/Functional/ConciergeControllerTest.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
         $ticket = $em->getRepository('BCRMBackendBundle:Event\Ticket')->findOneBy(array('code' => 'WOOT'));
49 49
         $this->assertEquals(false, $ticket->isCheckedIn());
50 50
 
51
-        $client   = static::createClient(array(), array(
51
+        $client = static::createClient(array(), array(
52 52
             'PHP_AUTH_USER' => 'concierge',
53 53
             'PHP_AUTH_PW'   => 'letmein',
54 54
         ));
@@ -172,7 +172,7 @@  discard block
 block discarded – undo
172 172
      */
173 173
     public function theTicketSearchApiShouldWork()
174 174
     {
175
-        $client    = static::createClient(array(), array(
175
+        $client = static::createClient(array(), array(
176 176
             'PHP_AUTH_USER' => 'concierge',
177 177
             'PHP_AUTH_PW'   => 'letmein',
178 178
         ));
Please login to merge, or discard this patch.
src/BCRM/BackendBundle/Service/Event.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
         $emailCommand->template     = 'RegistrationPayment';
137 137
         $emailCommand->templateData = array(
138 138
             'registration' => $command->registration,
139
-            'payment_link' => rtrim($command->schemeAndHost, '/') . $this->router->generate('bcrmweb_registration_payment', array('id' => $command->registration->getUuid()))
139
+            'payment_link' => rtrim($command->schemeAndHost, '/').$this->router->generate('bcrmweb_registration_payment', array('id' => $command->registration->getUuid()))
140 140
         );
141 141
         $this->commandBus->handle($emailCommand);
142 142
     }
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
     {
170 170
         $qrCode = new QrCode();
171 171
         $qrCode->setText(
172
-            rtrim($command->schemeAndHost, '/') . $this->router->generate(
172
+            rtrim($command->schemeAndHost, '/').$this->router->generate(
173 173
                 'bcrmweb_event_checkin',
174 174
                 array('id' => $command->ticket->getId(), 'code' => $command->ticket->getCode())
175 175
             )
@@ -177,7 +177,7 @@  discard block
 block discarded – undo
177 177
 
178 178
         $qrCode->setSize(300);
179 179
         $qrCode->setPadding(10);
180
-        $qrfile = tempnam(sys_get_temp_dir(), 'qrcode-') . '.png';
180
+        $qrfile = tempnam(sys_get_temp_dir(), 'qrcode-').'.png';
181 181
         $qrCode->render($qrfile);
182 182
 
183 183
         $emailCommand               = new SendTemplateMailCommand();
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
         $emailCommand->templateData = array(
187 187
             'ticket'      => $command->ticket,
188 188
             'event'       => $command->event,
189
-            'cancel_link' => rtrim($command->schemeAndHost, '/') . $this->router->generate(
189
+            'cancel_link' => rtrim($command->schemeAndHost, '/').$this->router->generate(
190 190
                     'bcrmweb_event_cancel_ticket',
191 191
                     array('id' => $command->ticket->getId(), 'code' => $command->ticket->getCode())
192 192
                 )
@@ -233,7 +233,7 @@  discard block
 block discarded – undo
233 233
         $emailCommand->template     = 'UnregistrationConfirmation';
234 234
         $emailCommand->templateData = array(
235 235
             'unregistration'    => $command->unregistration,
236
-            'confirmation_link' => rtrim($command->schemeAndHost, '/') . $this->router->generate('bcrm_unregistration_confirm', array('id' => $command->unregistration->getId(), 'key' => $key))
236
+            'confirmation_link' => rtrim($command->schemeAndHost, '/').$this->router->generate('bcrm_unregistration_confirm', array('id' => $command->unregistration->getId(), 'key' => $key))
237 237
         );
238 238
         $this->commandBus->handle($emailCommand);
239 239
     }
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
         $payment              = $event->payment;
319 319
         $registrationOptional = $this->registrationRepo->findByUuid($payment->getPayload()->get('item_number'));
320 320
         if ($registrationOptional->isEmpty()) {
321
-            Option::fromValue($this->logger)->map(function (LoggerInterface $logger) use ($payment) {
321
+            Option::fromValue($this->logger)->map(function(LoggerInterface $logger) use ($payment) {
322 322
                 $logger->alert(sprintf('No registration found with uuid "%s"', $payment->getPayload()->get('item_number')), array($payment));
323 323
             });
324 324
             return;
Please login to merge, or discard this patch.
src/BCRM/BackendBundle/Service/Mail.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -51,11 +51,11 @@  discard block
 block discarded – undo
51 51
     {
52 52
         $message       = \Swift_Message::newInstance();
53 53
         $ext           = $command->format === 'text/html' ? 'html' : 'txt';
54
-        $tplIdentifier = 'Email/' . $command->template . '.' . $ext;
54
+        $tplIdentifier = 'Email/'.$command->template.'.'.$ext;
55 55
         $template      = $this->cr->getContent($tplIdentifier);
56 56
         $templateData  = $command->templateData;
57 57
         if ($command->image !== null) {
58
-            $templateData['image'] = $message->embed(\Swift_Image::fromPath($command->image));;
58
+            $templateData['image'] = $message->embed(\Swift_Image::fromPath($command->image)); ;
59 59
         }
60 60
 
61 61
         // Subject
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
         $subject = $env->render($subject, $templateData);
65 65
 
66 66
         // Body
67
-        $body = $this->templating->render('bcrm_content:' . $tplIdentifier, $templateData);
67
+        $body = $this->templating->render('bcrm_content:'.$tplIdentifier, $templateData);
68 68
         $message->setCharset('UTF-8');
69 69
         $message->setFrom($this->mailFromEmail, $this->mailFromName)
70 70
             ->setSubject($subject)
Please login to merge, or discard this patch.
src/BCRM/BackendBundle/Entity/Event/DoctrineTicketRepository.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -148,7 +148,7 @@
 block discarded – undo
148 148
                 $qb->expr()->like('t.name', ':term'),
149 149
                 $qb->expr()->like('t.code', ':term'),
150 150
                 $qb->expr()->like('t.email', ':term')
151
-            ))->setParameter('term', '%' . $term . '%')
151
+            ))->setParameter('term', '%'.$term.'%')
152 152
             ->getQuery()
153 153
             ->getResult();
154 154
     }
Please login to merge, or discard this patch.