@@ -131,7 +131,9 @@ |
||
131 | 131 | } |
132 | 132 | |
133 | 133 | $p = $this->reader->getPage($path . '.md'); |
134 | - if ($p->isHidden()) throw new NotFoundHttpException(); |
|
134 | + if ($p->isHidden()) { |
|
135 | + throw new NotFoundHttpException(); |
|
136 | + } |
|
135 | 137 | |
136 | 138 | return $this->renderer->renderResponse('BCRMWebBundle:Web:page.html.twig', array( |
137 | 139 | 'page' => $p, |
@@ -48,7 +48,7 @@ discard block |
||
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 |
||
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 | )); |
@@ -313,7 +313,7 @@ discard block |
||
313 | 313 | 'day' => Ticket::DAY_SATURDAY, |
314 | 314 | )); |
315 | 315 | $this->assertEquals(3, count($tickets)); |
316 | - $this->assertInArray('[email protected]', array_map(function (Ticket $t) { |
|
316 | + $this->assertInArray('[email protected]', array_map(function(Ticket $t) { |
|
317 | 317 | return $t->getEmail(); |
318 | 318 | }, $tickets)); |
319 | 319 | |
@@ -340,7 +340,7 @@ discard block |
||
340 | 340 | 'day' => Ticket::DAY_SATURDAY, |
341 | 341 | )); |
342 | 342 | $this->assertEquals(3, count($tickets)); |
343 | - $this->assertNotInArray('[email protected]', array_map(function (Ticket $t) { |
|
343 | + $this->assertNotInArray('[email protected]', array_map(function(Ticket $t) { |
|
344 | 344 | return $t->getEmail(); |
345 | 345 | }, $tickets)); |
346 | 346 | } |
@@ -67,8 +67,12 @@ |
||
67 | 67 | |
68 | 68 | protected function createTicket($day, $checkedIn = null, $email = null) |
69 | 69 | { |
70 | - if ($email === null) $email = sprintf('stats.doe.198%[email protected]', $this->ticketCounter); |
|
71 | - if ($checkedIn === null) $checkedIn = true; |
|
70 | + if ($email === null) { |
|
71 | + $email = sprintf('stats.doe.198%[email protected]', $this->ticketCounter); |
|
72 | + } |
|
73 | + if ($checkedIn === null) { |
|
74 | + $checkedIn = true; |
|
75 | + } |
|
72 | 76 | $client = static::createClient(); |
73 | 77 | $container = $client->getContainer(); |
74 | 78 |
@@ -66,6 +66,9 @@ |
||
66 | 66 | |
67 | 67 | protected $ticketCounter = 1; |
68 | 68 | |
69 | + /** |
|
70 | + * @param false $checkedIn |
|
71 | + */ |
|
69 | 72 | protected function createTicket($day, $checkedIn = null, $email = null) |
70 | 73 | { |
71 | 74 | if ($email === null) $email = sprintf('stats.doe.198%[email protected]', $this->ticketCounter); |
@@ -7,11 +7,8 @@ |
||
7 | 7 | |
8 | 8 | namespace BCRM\WebBundle\Tests\Functional; |
9 | 9 | |
10 | -use BCRM\BackendBundle\Entity\Event\Registration; |
|
11 | 10 | use BCRM\BackendBundle\Entity\Event\Ticket; |
12 | 11 | use BCRM\BackendBundle\Entity\Payment; |
13 | -use Symfony\Component\BrowserKit\Cookie; |
|
14 | -use Symfony\Component\DependencyInjection\ContainerInterface; |
|
15 | 12 | |
16 | 13 | class StatsControllerTest extends Base |
17 | 14 | { |
@@ -80,7 +80,7 @@ |
||
80 | 80 | |
81 | 81 | // Create a payment |
82 | 82 | $txId = sha1('someid' . $email); |
83 | - $payment = $em->getRepository('BCRMBackendBundle:Payment')->findOneByTxId($txId); |
|
83 | + $payment = $em->getRepository('BCRMBackendBundle:Payment')->findOneByTxId($txId); |
|
84 | 84 | if (!$payment) { |
85 | 85 | $payment = new Payment(); |
86 | 86 | $payment->setTransactionId($txId); |