@@ -61,6 +61,9 @@ |
||
61 | 61 | $this->addRow($row); |
62 | 62 | } |
63 | 63 | |
64 | + /** |
|
65 | + * @param integer $quantity |
|
66 | + */ |
|
64 | 67 | public function setMeal(Meal $meal, $quantity) |
65 | 68 | { |
66 | 69 | if ($quantity == 0) { |
@@ -2,17 +2,11 @@ |
||
2 | 2 | |
3 | 3 | namespace AppBundle\Controller; |
4 | 4 | |
5 | -use AppBundle\Cart\Cart; |
|
6 | -use AppBundle\Cart\CartSerializer; |
|
7 | 5 | use AppBundle\Entity\Order; |
8 | -use AppBundle\Event\OrderEvent; |
|
9 | -use AppBundle\Event\OrderEvents; |
|
10 | -use AppBundle\Form\Type\OrderType; |
|
11 | 6 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; |
12 | 7 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
13 | 8 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
14 | 9 | use Symfony\Component\HttpFoundation\Request; |
15 | -use Symfony\Component\HttpFoundation\Response; |
|
16 | 10 | |
17 | 11 | class AdminOrderController extends Controller |
18 | 12 | { |
@@ -40,6 +40,9 @@ discard block |
||
40 | 40 | ); |
41 | 41 | } |
42 | 42 | |
43 | + /** |
|
44 | + * @param string $template |
|
45 | + */ |
|
43 | 46 | private function sendMail($recipient, $template, array $parameters = array()) |
44 | 47 | { |
45 | 48 | $message = $this->getMessage($template, $parameters); |
@@ -47,6 +50,9 @@ discard block |
||
47 | 50 | $this->mailer->send($message); |
48 | 51 | } |
49 | 52 | |
53 | + /** |
|
54 | + * @return \Swift_Mime_Message |
|
55 | + */ |
|
50 | 56 | public function getMessage($template, $parameters = array()) |
51 | 57 | { |
52 | 58 | $template = $this->twig->loadTemplate($template); |
@@ -51,7 +51,7 @@ |
||
51 | 51 | { |
52 | 52 | $template = $this->twig->loadTemplate($template); |
53 | 53 | |
54 | - $subject = $template->renderBlock('subject', $parameters); |
|
54 | + $subject = $template->renderBlock('subject', $parameters); |
|
55 | 55 | $bodyHtml = $template->renderBlock('body_html', $parameters); |
56 | 56 | $bodyText = $template->renderBlock('body_text', $parameters); |
57 | 57 |
@@ -167,7 +167,10 @@ discard block |
||
167 | 167 | <?php if (count($minorProblems)): ?> |
168 | 168 | <h2>Recommendations</h2> |
169 | 169 | <p> |
170 | - <?php if (count($majorProblems)): ?>Additionally, to<?php else: ?>To<?php endif; ?> enhance your Symfony experience, |
|
170 | + <?php if (count($majorProblems)): ?>Additionally, to<?php else { |
|
171 | + : ?>To<?php endif; |
|
172 | +} |
|
173 | +?> enhance your Symfony experience, |
|
171 | 174 | it’s recommended that you fix the following: |
172 | 175 | </p> |
173 | 176 | <ol> |
@@ -181,9 +184,12 @@ discard block |
||
181 | 184 | <p id="phpini">* |
182 | 185 | <?php if ($symfonyRequirements->getPhpIniConfigPath()): ?> |
183 | 186 | Changes to the <strong>php.ini</strong> file must be done in "<strong><?php echo $symfonyRequirements->getPhpIniConfigPath() ?></strong>". |
184 | - <?php else: ?> |
|
187 | + <?php else { |
|
188 | + : ?> |
|
185 | 189 | To change settings, create a "<strong>php.ini</strong>". |
186 | - <?php endif; ?> |
|
190 | + <?php endif; |
|
191 | +} |
|
192 | +?> |
|
187 | 193 | </p> |
188 | 194 | <?php endif; ?> |
189 | 195 |
@@ -40,7 +40,7 @@ |
||
40 | 40 | $hours = $this->workDayHours; |
41 | 41 | } |
42 | 42 | |
43 | - $vals = array_map(function ($val) use ($date) { |
|
43 | + $vals = array_map(function($val) use ($date) { |
|
44 | 44 | return $date.' // '.$val; |
45 | 45 | }, $hours); |
46 | 46 | $result[$date] = array_combine($vals, $vals); |
@@ -2,7 +2,6 @@ |
||
2 | 2 | |
3 | 3 | namespace AppBundle\Service; |
4 | 4 | |
5 | -use AppBundle\Entity\Holiday; |
|
6 | 5 | use AppBundle\Service\Loader\HolidayLoaderInterface; |
7 | 6 | |
8 | 7 | class Planning |
@@ -6,24 +6,24 @@ |
||
6 | 6 | { |
7 | 7 | static public function generateV4() |
8 | 8 | { |
9 | - return sprintf( '%04x%04x-%04x-%04x-%04x-%04x%04x%04x', |
|
9 | + return sprintf('%04x%04x-%04x-%04x-%04x-%04x%04x%04x', |
|
10 | 10 | // 32 bits for "time_low" |
11 | - mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), |
|
11 | + mt_rand(0, 0xffff), mt_rand(0, 0xffff), |
|
12 | 12 | |
13 | 13 | // 16 bits for "time_mid" |
14 | - mt_rand( 0, 0xffff ), |
|
14 | + mt_rand(0, 0xffff), |
|
15 | 15 | |
16 | 16 | // 16 bits for "time_hi_and_version", |
17 | 17 | // four most significant bits holds version number 4 |
18 | - mt_rand( 0, 0x0fff ) | 0x4000, |
|
18 | + mt_rand(0, 0x0fff) | 0x4000, |
|
19 | 19 | |
20 | 20 | // 16 bits, 8 bits for "clk_seq_hi_res", |
21 | 21 | // 8 bits for "clk_seq_low", |
22 | 22 | // two most significant bits holds zero and one for variant DCE1.1 |
23 | - mt_rand( 0, 0x3fff ) | 0x8000, |
|
23 | + mt_rand(0, 0x3fff) | 0x8000, |
|
24 | 24 | |
25 | 25 | // 48 bits for "node" |
26 | - mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ), mt_rand( 0, 0xffff ) |
|
26 | + mt_rand(0, 0xffff), mt_rand(0, 0xffff), mt_rand(0, 0xffff) |
|
27 | 27 | ); |
28 | 28 | } |
29 | 29 | } |
@@ -9,7 +9,6 @@ |
||
9 | 9 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\ParamConverter; |
10 | 10 | use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route; |
11 | 11 | use Symfony\Bundle\FrameworkBundle\Controller\Controller; |
12 | -use Symfony\Component\Form\Extension\Core\Type\SubmitType; |
|
13 | 12 | use Symfony\Component\HttpFoundation\Request; |
14 | 13 | |
15 | 14 | class AdminMenuController extends Controller |
@@ -62,7 +62,7 @@ |
||
62 | 62 | } |
63 | 63 | } |
64 | 64 | |
65 | - usort($meals, function ($left, $right) { |
|
65 | + usort($meals, function($left, $right) { |
|
66 | 66 | return $left->getPosition() > $right->getPosition(); |
67 | 67 | }); |
68 | 68 |
@@ -31,7 +31,7 @@ |
||
31 | 31 | { |
32 | 32 | $resolver->setDefaults(array( |
33 | 33 | 'data_class' => Price::class, |
34 | - 'empty_data' => function (FormInterface $form) { |
|
34 | + 'empty_data' => function(FormInterface $form) { |
|
35 | 35 | return new Price( |
36 | 36 | $form->get('amount')->getData() |
37 | 37 | ); |