@@ -168,7 +168,7 @@ |
||
| 168 | 168 | */ |
| 169 | 169 | protected function convertToDateTime($datetime): DateTime |
| 170 | 170 | { |
| 171 | - if (is_string($datetime)) { |
|
| 171 | + if(is_string($datetime)) { |
|
| 172 | 172 | $datetime = new DateTime($datetime); |
| 173 | 173 | } |
| 174 | 174 | |
@@ -153,7 +153,7 @@ discard block |
||
| 153 | 153 | // visitor's id is empty and i must add one |
| 154 | 154 | $meals_data['visitor'] = $ID_visitor; |
| 155 | 155 | |
| 156 | - if($ID_visitor){ |
|
| 156 | + if($ID_visitor) { |
|
| 157 | 157 | // gets data from database |
| 158 | 158 | $program_blocks = $this->Blocks->getProgramBlocks($DB_data['meeting']); |
| 159 | 159 | |
@@ -432,7 +432,7 @@ discard block |
||
| 432 | 432 | */ |
| 433 | 433 | protected function convertToDateTime($datetime): DateTime |
| 434 | 434 | { |
| 435 | - if (is_string($datetime)) { |
|
| 435 | + if(is_string($datetime)) { |
|
| 436 | 436 | $datetime = new DateTime($datetime); |
| 437 | 437 | } |
| 438 | 438 | |
@@ -454,14 +454,14 @@ discard block |
||
| 454 | 454 | $programBlocks = $this->Blocks->getProgramBlocks($meetingId); |
| 455 | 455 | |
| 456 | 456 | // table is empty |
| 457 | - if(!$programBlocks){ |
|
| 457 | + if(!$programBlocks) { |
|
| 458 | 458 | $html .= "<div class='emptyTable' style='width:400px;'>Nejsou žádná aktuální data.</div>\n"; |
| 459 | 459 | } else { |
| 460 | 460 | foreach($programBlocks as $block) { |
| 461 | - $html .= "<div class='block-" . $block->id . " ".Strings::webalize($block['day'])."'>".$block['day'].", ".$block['from']." - ".$block['to']." : ".$block['name']."</div>\n"; |
|
| 461 | + $html .= "<div class='block-" . $block->id . " " . Strings::webalize($block['day']) . "'>" . $block['day'] . ", " . $block['from'] . " - " . $block['to'] . " : " . $block['name'] . "</div>\n"; |
|
| 462 | 462 | // rendering programs in block |
| 463 | 463 | if($block['program'] == 1) { |
| 464 | - $html .= "<div class='block-" . $block->id . " programs ".Strings::webalize($block['day'])." ".Strings::webalize($block['name'])."'>".$this->Programs->getPrograms($block['id'], $visitorId)."</div>"; |
|
| 464 | + $html .= "<div class='block-" . $block->id . " programs " . Strings::webalize($block['day']) . " " . Strings::webalize($block['name']) . "'>" . $this->Programs->getPrograms($block['id'], $visitorId) . "</div>"; |
|
| 465 | 465 | } |
| 466 | 466 | $html .= "<br />"; |
| 467 | 467 | } |
@@ -534,7 +534,7 @@ discard block |
||
| 534 | 534 | ->group('email') |
| 535 | 535 | ->fetchAll(); |
| 536 | 536 | |
| 537 | - foreach($emails as $item){ |
|
| 537 | + foreach($emails as $item) { |
|
| 538 | 538 | $recipientMailAddresses .= $item['email'] . ",\n"; |
| 539 | 539 | } |
| 540 | 540 | |
@@ -30,7 +30,6 @@ |
||
| 30 | 30 | protected $meetingModel; |
| 31 | 31 | |
| 32 | 32 | /** |
| 33 | - * @param ProvinceModel $model |
|
| 34 | 33 | */ |
| 35 | 34 | public function __construct( |
| 36 | 35 | AnnotationService $annotation, |
@@ -45,7 +45,6 @@ discard block |
||
| 45 | 45 | } |
| 46 | 46 | |
| 47 | 47 | /** |
| 48 | - * @param string $id |
|
| 49 | 48 | * @param string $type |
| 50 | 49 | */ |
| 51 | 50 | public function renderEdit(string $guid, string $type) |
@@ -63,7 +62,7 @@ discard block |
||
| 63 | 62 | } |
| 64 | 63 | |
| 65 | 64 | /** |
| 66 | - * @return AnnotationFormControl |
|
| 65 | + * @return AnnotationForm |
|
| 67 | 66 | */ |
| 68 | 67 | protected function createComponentAnnotationForm(): AnnotationForm |
| 69 | 68 | { |
@@ -74,7 +74,7 @@ |
||
| 74 | 74 | try { |
| 75 | 75 | $result = $this->getAnnotationService()->updateByType($type, $annotation); |
| 76 | 76 | |
| 77 | - $this->logInfo('Modification of annotation id %s with data %s successfull, result: %s', [ |
|
| 77 | + $this->logInfo('Modification of annotation id %s with data %s successfull, result: %s', [ |
|
| 78 | 78 | $annotation->guid, |
| 79 | 79 | json_encode($annotation), |
| 80 | 80 | json_encode($result), |
@@ -31,9 +31,8 @@ discard block |
||
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | /** |
| 34 | - * @param string $id |
|
| 35 | 34 | * @param string $type |
| 36 | - * @return Row |
|
| 35 | + * @return ActiveRow |
|
| 37 | 36 | */ |
| 38 | 37 | public function findByType(string $guid, string $type) |
| 39 | 38 | { |
@@ -58,7 +57,7 @@ discard block |
||
| 58 | 57 | /** |
| 59 | 58 | * @param string $type |
| 60 | 59 | * @param ArrayHash $annotation |
| 61 | - * @return Row |
|
| 60 | + * @return integer|null |
|
| 62 | 61 | */ |
| 63 | 62 | public function updateByType(string $type, ArrayHash $annotation) |
| 64 | 63 | { |
@@ -71,7 +71,7 @@ |
||
| 71 | 71 | */ |
| 72 | 72 | protected function getModelByType(string $type) |
| 73 | 73 | { |
| 74 | - switch ($type) { |
|
| 74 | + switch($type) { |
|
| 75 | 75 | case 'block': |
| 76 | 76 | $model = $this->getBlockModel(); |
| 77 | 77 | break; |
@@ -213,7 +213,7 @@ discard block |
||
| 213 | 213 | { |
| 214 | 214 | $programBlocks = $this->fetchProgramBlocks(); |
| 215 | 215 | |
| 216 | - foreach ($programBlocks as $block) { |
|
| 216 | + foreach($programBlocks as $block) { |
|
| 217 | 217 | |
| 218 | 218 | $programsInBlock = $this->getProgramModel()->findByBlockId($block->id); |
| 219 | 219 | |
@@ -221,12 +221,12 @@ discard block |
||
| 221 | 221 | 0 => 'Nebudu přítomen' |
| 222 | 222 | ]; |
| 223 | 223 | |
| 224 | - foreach ($programsInBlock as $program) { |
|
| 224 | + foreach($programsInBlock as $program) { |
|
| 225 | 225 | $programs[$program->id] = $program->name; |
| 226 | 226 | } |
| 227 | 227 | |
| 228 | 228 | $form->addRadioList( |
| 229 | - 'blck_' . $block->id, $block->day . ', ' . $block->from .' - ' . $block->to .' : ' . $block->name, |
|
| 229 | + 'blck_' . $block->id, $block->day . ', ' . $block->from . ' - ' . $block->to . ' : ' . $block->name, |
|
| 230 | 230 | $programs |
| 231 | 231 | )->setDefaultValue(0) |
| 232 | 232 | ->setDisabled($this->filterFilledCapacity($programs)); |
@@ -246,7 +246,7 @@ discard block |
||
| 246 | 246 | 'ano' => 'ano', |
| 247 | 247 | ]; |
| 248 | 248 | |
| 249 | - foreach ($this->fetchMeals() as $name => $label) { |
|
| 249 | + foreach($this->fetchMeals() as $name => $label) { |
|
| 250 | 250 | $this->setMealField($name); |
| 251 | 251 | $form->addSelect($name, $label . ':', $yesNoArray); |
| 252 | 252 | } |
@@ -377,7 +377,7 @@ discard block |
||
| 377 | 377 | { |
| 378 | 378 | $programBlocks = $this->fetchProgramBlocks(); |
| 379 | 379 | |
| 380 | - foreach ($programBlocks as $block) { |
|
| 380 | + foreach($programBlocks as $block) { |
|
| 381 | 381 | $programFieldName = 'blck_' . $block->id; |
| 382 | 382 | $this->setProgramField($programFieldName); |
| 383 | 383 | } |
@@ -392,7 +392,7 @@ discard block |
||
| 392 | 392 | { |
| 393 | 393 | $meals = $this->fetchMeals(); |
| 394 | 394 | |
| 395 | - foreach ($meals as $name => $label) { |
|
| 395 | + foreach($meals as $name => $label) { |
|
| 396 | 396 | $this->setMealField($name); |
| 397 | 397 | } |
| 398 | 398 | |
@@ -442,7 +442,7 @@ discard block |
||
| 442 | 442 | { |
| 443 | 443 | return array_keys( |
| 444 | 444 | array_filter($programs, function($name, $id) { |
| 445 | - if ($id) { |
|
| 445 | + if($id) { |
|
| 446 | 446 | $visitorsOnProgram = $this->getProgramModel()->countProgramVisitors($id); |
| 447 | 447 | $programCapacity = $this->getProgramModel()->findByProgramId($id)->capacity; |
| 448 | 448 | |
@@ -26,19 +26,19 @@ |
||
| 26 | 26 | |
| 27 | 27 | // make form and controls compatible with Twitter Bootstrap |
| 28 | 28 | $form->getElementPrototype()->class('form-horizontal'); |
| 29 | - foreach ($form->getControls() as $control) { |
|
| 30 | - if ($control instanceof Controls\Button) { |
|
| 29 | + foreach($form->getControls() as $control) { |
|
| 30 | + if($control instanceof Controls\Button) { |
|
| 31 | 31 | $control->getControlPrototype() |
| 32 | 32 | ->addClass(empty($usedPrimary) ? 'btn btn-default' : ''); |
| 33 | 33 | $usedPrimary = TRUE; |
| 34 | - } elseif ( |
|
| 34 | + } elseif( |
|
| 35 | 35 | $control instanceof Controls\TextBase || |
| 36 | 36 | $control instanceof Controls\SelectBox || |
| 37 | 37 | $control instanceof Controls\MultiSelectBox |
| 38 | 38 | ) { |
| 39 | 39 | $control->getControlPrototype() |
| 40 | 40 | ->addClass('form-control'); |
| 41 | - } elseif ( |
|
| 41 | + } elseif( |
|
| 42 | 42 | $control instanceof Controls\Checkbox || |
| 43 | 43 | $control instanceof Controls\CheckboxList || |
| 44 | 44 | $control instanceof Controls\RadioList |
@@ -10,9 +10,9 @@ |
||
| 10 | 10 | interface IAnnotationFormFactory |
| 11 | 11 | { |
| 12 | 12 | |
| 13 | - /** |
|
| 14 | - * @return \App\Forms\AnnotationForm |
|
| 15 | - */ |
|
| 16 | - public function create(): AnnotationForm; |
|
| 13 | + /** |
|
| 14 | + * @return \App\Forms\AnnotationForm |
|
| 15 | + */ |
|
| 16 | + public function create(): AnnotationForm; |
|
| 17 | 17 | |
| 18 | 18 | } |