@@ -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) { |
@@ -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 | |
@@ -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); |
@@ -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 | } |
@@ -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 | ); |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | |
| 23 | 23 | private $sizes = array( |
| 24 | 24 | '300' => array(300, 100), |
| 25 | - '800' => array(800, 600), |
|
| 25 | + '800' => array(800, 600), |
|
| 26 | 26 | ); |
| 27 | 27 | |
| 28 | 28 | public function __construct($uploadsDir, $uploadsUriPrefix) |
@@ -60,7 +60,7 @@ |
||
| 60 | 60 | )) |
| 61 | 61 | ; |
| 62 | 62 | |
| 63 | - $builder->addEventListener(FormEvents::POST_SUBMIT, function (FormEvent $event) { |
|
| 63 | + $builder->addEventListener(FormEvents::POST_SUBMIT, function(FormEvent $event) { |
|
| 64 | 64 | $form = $event->getForm(); |
| 65 | 65 | |
| 66 | 66 | $meal = $form->getData(); |