@@ -18,7 +18,7 @@ |
||
| 18 | 18 | */ |
| 19 | 19 | class AcceptanceTester extends \Codeception\Actor |
| 20 | 20 | { |
| 21 | - use _generated\AcceptanceTesterActions; |
|
| 21 | + use _generated\AcceptanceTesterActions; |
|
| 22 | 22 | |
| 23 | 23 | /** |
| 24 | 24 | * Define custom actions here |
@@ -34,8 +34,8 @@ |
||
| 34 | 34 | $I->wantTo('login to admin'); |
| 35 | 35 | $I->amOnPage('admin/'); |
| 36 | 36 | $I->seeInCurrentUrl('admin/'); |
| 37 | - $I->fillField('username','tester'); |
|
| 38 | - $I->fillField('password','tester'); |
|
| 37 | + $I->fillField('username', 'tester'); |
|
| 38 | + $I->fillField('password', 'tester'); |
|
| 39 | 39 | $I->checkOption('persistent'); |
| 40 | 40 | $I->click('Přihlásit', '#content'); |
| 41 | 41 | $I->see('Úvod'); |
@@ -41,8 +41,8 @@ |
||
| 41 | 41 | { |
| 42 | 42 | $I->amOnPage('admin/'); |
| 43 | 43 | $I->seeInCurrentUrl('admin/'); |
| 44 | - $I->fillField('username','tester'); |
|
| 45 | - $I->fillField('password','tester'); |
|
| 44 | + $I->fillField('username', 'tester'); |
|
| 45 | + $I->fillField('password', 'tester'); |
|
| 46 | 46 | $I->checkOption('persistent'); |
| 47 | 47 | $I->click('Přihlásit', '#content'); |
| 48 | 48 | $I->see('Úvod'); |
@@ -42,7 +42,7 @@ discard block |
||
| 42 | 42 | $I->see('úprava bloku'); |
| 43 | 43 | $I->click('Náhled anotace', '#content'); |
| 44 | 44 | $I->seeInCurrentUrl('/srazvs/block/annotation/382ff1c792c7980aa0b1950259a518e8'); |
| 45 | - foreach ($this->annotationBlock['fields'] as $field => $value) { |
|
| 45 | + foreach($this->annotationBlock['fields'] as $field => $value) { |
|
| 46 | 46 | $I->seeInField($field, $value); |
| 47 | 47 | } |
| 48 | 48 | } |
@@ -55,7 +55,7 @@ discard block |
||
| 55 | 55 | $I->see('úprava programu'); |
| 56 | 56 | $I->click('Náhled anotace', '#content'); |
| 57 | 57 | $I->seeInCurrentUrl('/srazvs/program/annotation/524888c93f896f388d563f68682cf41c'); |
| 58 | - foreach ($this->annotationProgram['fields'] as $field => $value) { |
|
| 58 | + foreach($this->annotationProgram['fields'] as $field => $value) { |
|
| 59 | 59 | $I->seeInField($field, $value); |
| 60 | 60 | } |
| 61 | 61 | } |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | { |
| 65 | 65 | $I->wantTo('Ensure that blocks annotation is accesible by public'); |
| 66 | 66 | $I->amOnPage('/srazvs/block/annotation/382ff1c792c7980aa0b1950259a518e8'); |
| 67 | - foreach ($this->annotationBlock['fields'] as $field => $value) { |
|
| 67 | + foreach($this->annotationBlock['fields'] as $field => $value) { |
|
| 68 | 68 | $I->seeInField($field, $value); |
| 69 | 69 | } |
| 70 | 70 | } |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | { |
| 74 | 74 | $I->wantTo('Ensure that programs annotation is accesible by public'); |
| 75 | 75 | $I->amOnPage('/srazvs/program/annotation/524888c93f896f388d563f68682cf41c'); |
| 76 | - foreach ($this->annotationProgram['fields'] as $field => $value) { |
|
| 76 | + foreach($this->annotationProgram['fields'] as $field => $value) { |
|
| 77 | 77 | $I->seeInField($field, $value); |
| 78 | 78 | } |
| 79 | 79 | } |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | { |
| 13 | 13 | |
| 14 | 14 | /** @var integer */ |
| 15 | - private $categoryId = NULL; |
|
| 15 | + private $categoryId = null; |
|
| 16 | 16 | |
| 17 | 17 | /** |
| 18 | 18 | * @param CategoryModel $model |
@@ -35,7 +35,7 @@ |
||
| 35 | 35 | Debugger::log('Destroying of category successfull, result: ' . json_encode($result), Debugger::INFO); |
| 36 | 36 | $this->flashMessage('Položka byla úspěšně smazána', 'ok'); |
| 37 | 37 | } catch(Exception $e) { |
| 38 | - Debugger::log('Destroying of category failed, result: ' . $e->getMessage(), Debugger::ERROR); |
|
| 38 | + Debugger::log('Destroying of category failed, result: ' . $e->getMessage(), Debugger::ERROR); |
|
| 39 | 39 | $this->flashMessage('Destroying of category failed, result: ' . $e->getMessage(), 'error'); |
| 40 | 40 | } |
| 41 | 41 | |
@@ -4,7 +4,6 @@ |
||
| 4 | 4 | |
| 5 | 5 | use \Exception; |
| 6 | 6 | use Tracy\Debugger; |
| 7 | -use Nette\Database\Context; |
|
| 8 | 7 | use App\Models\CategoryModel; |
| 9 | 8 | |
| 10 | 9 | class CategoryPresenter extends BasePresenter |
@@ -417,7 +417,7 @@ |
||
| 417 | 417 | |
| 418 | 418 | $this->getPdf()->setMargins(15, 15, 10, 5); |
| 419 | 419 | $this->getPdf()->SetWatermarkImage(IMG_DIR . 'logos/watermark-waves.jpg', 0.1, ''); |
| 420 | - $this->getPdf()->showWatermarkImage = TRUE; |
|
| 420 | + $this->getPdf()->showWatermarkImage = true; |
|
| 421 | 421 | |
| 422 | 422 | $parameters = [ |
| 423 | 423 | 'result' => $badges, |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | $this->redirect('Export:listing'); |
| 110 | 110 | } |
| 111 | 111 | |
| 112 | - switch($type){ |
|
| 112 | + switch($type) { |
|
| 113 | 113 | case "summary": |
| 114 | 114 | $templateName = 'evidence_summary'; |
| 115 | 115 | // specific mPDF settings |
@@ -151,7 +151,7 @@ discard block |
||
| 151 | 151 | $attendanceHeader = $attendances[0]['place'] . ' ' . $attendances[0]['year']; |
| 152 | 152 | |
| 153 | 153 | // set header |
| 154 | - $this->getPdf()->SetHeader($attendanceHeader.'|sraz VS|Prezenční listina'); |
|
| 154 | + $this->getPdf()->SetHeader($attendanceHeader . '|sraz VS|Prezenční listina'); |
|
| 155 | 155 | |
| 156 | 156 | $parameters = [ |
| 157 | 157 | 'result' => $attendances, |
@@ -170,7 +170,7 @@ discard block |
||
| 170 | 170 | public function renderMealTicket() |
| 171 | 171 | { |
| 172 | 172 | // output file name |
| 173 | - $this->filename= 'vlastni_stravenky.pdf'; |
|
| 173 | + $this->filename = 'vlastni_stravenky.pdf'; |
|
| 174 | 174 | $templateName = 'meal_ticket'; |
| 175 | 175 | |
| 176 | 176 | $mealTickets = $this->getModel()->mealTicket(); |
@@ -201,7 +201,7 @@ discard block |
||
| 201 | 201 | $namelistHeader = $nameList[0]['place'] . " " . $nameList[0]['year']; |
| 202 | 202 | |
| 203 | 203 | // set header |
| 204 | - $this->getPdf()->SetHeader($namelistHeader.'|sraz VS|Jméno, Příjmení, Přezdívka'); |
|
| 204 | + $this->getPdf()->SetHeader($namelistHeader . '|sraz VS|Jméno, Příjmení, Přezdívka'); |
|
| 205 | 205 | |
| 206 | 206 | $parameters = [ |
| 207 | 207 | 'result' => $nameList, |
@@ -258,7 +258,7 @@ discard block |
||
| 258 | 258 | $this->filename = Strings::toAscii($largeProgram['place'] . $largeProgram['year'] . '-program') . '.pdf'; |
| 259 | 259 | $templateName = 'program_large'; |
| 260 | 260 | |
| 261 | - $meetingHeader = $largeProgram['place']." ".$largeProgram['year']; |
|
| 261 | + $meetingHeader = $largeProgram['place'] . " " . $largeProgram['year']; |
|
| 262 | 262 | |
| 263 | 263 | $this->getPdf()->paperFormat = 'B1'; |
| 264 | 264 | |
@@ -319,7 +319,7 @@ discard block |
||
| 319 | 319 | ]; |
| 320 | 320 | |
| 321 | 321 | $exportBlocks = []; |
| 322 | - foreach ($days as $day) { |
|
| 322 | + foreach($days as $day) { |
|
| 323 | 323 | $exportBlocks[$day] = $this->getBlockModel()->getExportBlocks($this->meetingId, $day); |
| 324 | 324 | } |
| 325 | 325 | |
@@ -349,7 +349,7 @@ discard block |
||
| 349 | 349 | |
| 350 | 350 | $programHeader = $programs[0]['program']; |
| 351 | 351 | |
| 352 | - $this->getPdf()->SetHeader($programHeader.'|sraz VS|Účastnící programu'); |
|
| 352 | + $this->getPdf()->SetHeader($programHeader . '|sraz VS|Účastnící programu'); |
|
| 353 | 353 | |
| 354 | 354 | $parameters = [ |
| 355 | 355 | 'result' => $programs, |
@@ -406,9 +406,9 @@ discard block |
||
| 406 | 406 | if(!$namesStringified) { |
| 407 | 407 | $badges = $this->getModel()->nameBadges(); |
| 408 | 408 | } else { |
| 409 | - $namesStringified = preg_replace('/\s+/','',$namesStringified); |
|
| 409 | + $namesStringified = preg_replace('/\s+/', '', $namesStringified); |
|
| 410 | 410 | |
| 411 | - $names = explode(',',$namesStringified); |
|
| 411 | + $names = explode(',', $namesStringified); |
|
| 412 | 412 | foreach($names as $name) { |
| 413 | 413 | $badge['nick'] = $name; |
| 414 | 414 | $badges[] = $badge; |
@@ -530,17 +530,17 @@ discard block |
||
| 530 | 530 | } |
| 531 | 531 | |
| 532 | 532 | // stahnuti souboru |
| 533 | - $filename = 'export-MS-'.date('Y-m-d',time()).'.xlsx'; |
|
| 533 | + $filename = 'export-MS-' . date('Y-m-d', time()) . '.xlsx'; |
|
| 534 | 534 | |
| 535 | 535 | $excel->setActiveSheetIndex(0); |
| 536 | 536 | |
| 537 | 537 | header('Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'); |
| 538 | - header('Content-Disposition: attachment;filename="'.$filename.'"'); |
|
| 538 | + header('Content-Disposition: attachment;filename="' . $filename . '"'); |
|
| 539 | 539 | header('Cache-Control: max-age=0'); |
| 540 | 540 | |
| 541 | 541 | // If you're serving to IE over SSL, then the following may be needed |
| 542 | 542 | header('Expires: Mon, 26 Jul 1997 05:00:00 GMT'); // Date in the past |
| 543 | - header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT'); // always modified |
|
| 543 | + header('Last-Modified: ' . gmdate('D, d M Y H:i:s') . ' GMT'); // always modified |
|
| 544 | 544 | header('Cache-Control: cache, must-revalidate'); // HTTP/1.1 |
| 545 | 545 | header('Pragma: public'); // HTTP/1.0 |
| 546 | 546 | |
@@ -558,7 +558,7 @@ discard block |
||
| 558 | 558 | { |
| 559 | 559 | $template = $this->getTemplate(); |
| 560 | 560 | |
| 561 | - foreach ($parameters as $parameter => $value) { |
|
| 561 | + foreach($parameters as $parameter => $value) { |
|
| 562 | 562 | $template->{$parameter} = $value; |
| 563 | 563 | } |
| 564 | 564 | |
@@ -580,7 +580,7 @@ discard block |
||
| 580 | 580 | $template = $this->getTemplate(); |
| 581 | 581 | |
| 582 | 582 | /* debugging */ |
| 583 | - if($this->debugMode){ |
|
| 583 | + if($this->debugMode) { |
|
| 584 | 584 | echo $template; |
| 585 | 585 | exit('DEBUG_MODE'); |
| 586 | 586 | } else { |
@@ -633,7 +633,7 @@ discard block |
||
| 633 | 633 | } |
| 634 | 634 | |
| 635 | 635 | /** |
| 636 | - * @return MaterialControl |
|
| 636 | + * @return MaterialsControl |
|
| 637 | 637 | */ |
| 638 | 638 | protected function createComponentMaterials() |
| 639 | 639 | { |
@@ -641,7 +641,7 @@ discard block |
||
| 641 | 641 | } |
| 642 | 642 | |
| 643 | 643 | /** |
| 644 | - * @param MaterialControl $control |
|
| 644 | + * @param MaterialsControl $control |
|
| 645 | 645 | * @return $this |
| 646 | 646 | */ |
| 647 | 647 | protected function setMaterialControl(MaterialsControl $control) |
@@ -726,7 +726,7 @@ discard block |
||
| 726 | 726 | |
| 727 | 727 | |
| 728 | 728 | /** |
| 729 | - * @return PHPExcel |
|
| 729 | + * @return \PHPExcel |
|
| 730 | 730 | */ |
| 731 | 731 | protected function getExcel() |
| 732 | 732 | { |
@@ -734,7 +734,7 @@ discard block |
||
| 734 | 734 | } |
| 735 | 735 | |
| 736 | 736 | /** |
| 737 | - * @param PHPExcel $excel |
|
| 737 | + * @param \PHPExcel $excel |
|
| 738 | 738 | * @return $this |
| 739 | 739 | */ |
| 740 | 740 | protected function setExcel(\PHPExcel $excel) |
@@ -9,11 +9,11 @@ |
||
| 9 | 9 | * Never let user to set his ID himself. |
| 10 | 10 | * @author Hána František <[email protected]> |
| 11 | 11 | */ |
| 12 | -class SkautisAuthenticator extends Nette\Object implements Nette\Security\IAuthenticator |
|
| 13 | -{
|
|
| 12 | +class SkautisAuthenticator extends Nette\Object implements Nette\Security\IAuthenticator |
|
| 13 | +{ |
|
| 14 | 14 | |
| 15 | - public function authenticate(array $credentials) |
|
| 16 | - {
|
|
| 15 | + public function authenticate(array $credentials) |
|
| 16 | + { |
|
| 17 | 17 | $data = $credentials[0]; |
| 18 | 18 | return new Nette\Security\Identity($data->ID_User); |
| 19 | 19 | } |
@@ -39,7 +39,7 @@ |
||
| 39 | 39 | * @param array bcc |
| 40 | 40 | * @return bool true | false (log the exception) |
| 41 | 41 | */ |
| 42 | - public function sendMail(array $recipient, $subject, $body, array $bccMail = NULL) |
|
| 42 | + public function sendMail(array $recipient, $subject, $body, array $bccMail = null) |
|
| 43 | 43 | { |
| 44 | 44 | $message = new Message; |
| 45 | 45 | $message->setFrom('[email protected]', 'Srazy VS'); |
@@ -50,7 +50,7 @@ |
||
| 50 | 50 | } |
| 51 | 51 | // add bcc |
| 52 | 52 | if(!empty($bccMail)) { |
| 53 | - foreach ($bccMail as $bccMail => $bccName) { |
|
| 53 | + foreach($bccMail as $bccMail => $bccName) { |
|
| 54 | 54 | $message->addBcc($bccMail, $bccName); |
| 55 | 55 | } |
| 56 | 56 | } |
@@ -37,6 +37,7 @@ discard block |
||
| 37 | 37 | * @param string subject |
| 38 | 38 | * @param string message |
| 39 | 39 | * @param array bcc |
| 40 | + * @param string $body |
|
| 40 | 41 | * @return bool true | false (log the exception) |
| 41 | 42 | */ |
| 42 | 43 | public function sendMail(array $recipient, $subject, $body, array $bccMail = NULL) |
@@ -95,7 +96,8 @@ discard block |
||
| 95 | 96 | * @param array recipient mail and name |
| 96 | 97 | * @param string guid |
| 97 | 98 | * @param string program | block |
| 98 | - * @return mixed true | error information |
|
| 99 | + * @param string $type |
|
| 100 | + * @return boolean true | error information |
|
| 99 | 101 | */ |
| 100 | 102 | public function tutor(array $recipients, $guid, $type) |
| 101 | 103 | { |
@@ -124,7 +126,7 @@ discard block |
||
| 124 | 126 | * @param array recipient mail |
| 125 | 127 | * @param int check hash code |
| 126 | 128 | * @param string code for recognition of bank transaction |
| 127 | - * @return mixed true | error information |
|
| 129 | + * @return boolean true | error information |
|
| 128 | 130 | */ |
| 129 | 131 | public function sendRegistrationSummary(array $recipientMail, $hash, $code4bank) |
| 130 | 132 | { |
@@ -146,7 +148,8 @@ discard block |
||
| 146 | 148 | * |
| 147 | 149 | * @param mixed id numbers in row |
| 148 | 150 | * @param string type of template |
| 149 | - * @return array subject and message |
|
| 151 | + * @param string $type |
|
| 152 | + * @return boolean subject and message |
|
| 150 | 153 | */ |
| 151 | 154 | public function sendPaymentInfo($recipients, $type) |
| 152 | 155 | { |
@@ -30,14 +30,14 @@ discard block |
||
| 30 | 30 | public function __construct(array $configuration) |
| 31 | 31 | { |
| 32 | 32 | $this->encoding = $configuration['encoding']; |
| 33 | - $this->paperFormat = $configuration['paperFormat']; |
|
| 33 | + $this->paperFormat = $configuration['paperFormat']; |
|
| 34 | 34 | $this->fontSize = $configuration['fontSize']; |
| 35 | - $this->font = $configuration['font']; |
|
| 36 | - $this->marginLeft = $configuration['marginLeft']; |
|
| 35 | + $this->font = $configuration['font']; |
|
| 36 | + $this->marginLeft = $configuration['marginLeft']; |
|
| 37 | 37 | $this->marginRight = $configuration['marginRight']; |
| 38 | - $this->marginTop = $configuration['marginTop']; |
|
| 38 | + $this->marginTop = $configuration['marginTop']; |
|
| 39 | 39 | $this->marginBottom = $configuration['marginBottom']; |
| 40 | - $this->debugMode = $configuration['debugMode']; |
|
| 40 | + $this->debugMode = $configuration['debugMode']; |
|
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | /** |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | ); |
| 60 | 60 | |
| 61 | 61 | // debugging on demand |
| 62 | - if($this->debugMode){ |
|
| 62 | + if($this->debugMode) { |
|
| 63 | 63 | $this->pdf->debug = true; |
| 64 | 64 | } |
| 65 | 65 | $this->pdf->useOnlyCoreFonts = true; |
@@ -76,9 +76,9 @@ discard block |
||
| 76 | 76 | */ |
| 77 | 77 | public function setMargins($left, $right, $top, $bottom) |
| 78 | 78 | { |
| 79 | - $this->marginLeft = $left; |
|
| 79 | + $this->marginLeft = $left; |
|
| 80 | 80 | $this->marginRight = $right; |
| 81 | - $this->marginTop = $top; |
|
| 81 | + $this->marginTop = $top; |
|
| 82 | 82 | $this->marginBottom = $bottom; |
| 83 | 83 | } |
| 84 | 84 | |