Completed
Push — master ( 1ce70a...0adf65 )
by Litera
11:25 queued 21s
created
app/presenters/RegistrationPresenter.php 3 patches
Doc Comments   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -251,7 +251,7 @@  discard block
 block discarded – undo
251 251
 	}
252 252
 
253 253
 	/**
254
-	 * @return RegistrationFormControl
254
+	 * @return RegistrationForm
255 255
 	 */
256 256
 	protected function createComponentRegistrationForm(): RegistrationForm
257 257
 	{
@@ -444,7 +444,6 @@  discard block
 block discarded – undo
444 444
 	}
445 445
 
446 446
 	/**
447
-	 * @param EventService $skautisEvent
448 447
 	 *
449 448
 	 * @return self
450 449
 	 */
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -109,9 +109,9 @@
 block discarded – undo
109 109
 	 * @param  IRegistrationFormFactory $factory
110 110
 	 */
111 111
 
112
-	protected $error = FALSE;
112
+	protected $error = false;
113 113
 
114
-	protected $hash = NULL;
114
+	protected $hash = null;
115 115
 	private $item;
116 116
 	private $mealData;
117 117
 	private $user;
Please login to merge, or discard this patch.
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -171,10 +171,10 @@  discard block
 block discarded – undo
171 171
 			$guid = $this->getVisitorService()->create($postData);
172 172
 			$result = $this->sendRegistrationSummary($postData, $guid);
173 173
 
174
-			Debugger::log('Creation of registration('. $guid .') successfull, result: ' . json_encode($result), Debugger::INFO);
174
+			Debugger::log('Creation of registration(' . $guid . ') successfull, result: ' . json_encode($result), Debugger::INFO);
175 175
 			$this->flashMessage('Registrace(' . $guid . ') byla úspěšně založena.', self::FLASH_TYPE_OK);
176 176
 		} catch(Exception $e) {
177
-			Debugger::log('Creation of registration('. $guid .') failed, result: ' .  $e->getMessage(), Debugger::ERROR);
177
+			Debugger::log('Creation of registration(' . $guid . ') failed, result: ' . $e->getMessage(), Debugger::ERROR);
178 178
 			$this->flashMessage('Creation of registration failed, result: ' . $e->getMessage(), self::FLASH_TYPE_ERROR);
179 179
 		}
180 180
 
@@ -193,10 +193,10 @@  discard block
 block discarded – undo
193 193
 			$result = $this->getVisitorService()->update($guid, $postData);
194 194
 			$result = $this->sendRegistrationSummary($postData, $guid);
195 195
 
196
-			Debugger::log('Modification of registration('. $guid .') successfull, result: ' . json_encode($result), Debugger::INFO);
196
+			Debugger::log('Modification of registration(' . $guid . ') successfull, result: ' . json_encode($result), Debugger::INFO);
197 197
 			$this->flashMessage('Registrace(' . $guid . ') byla úspěšně upravena.', self::FLASH_TYPE_OK);
198 198
 		} catch(Exception $e) {
199
-			Debugger::log('Modification of registration('. $guid .') failed, result: ' .  $e->getMessage(), Debugger::ERROR);
199
+			Debugger::log('Modification of registration(' . $guid . ') failed, result: ' . $e->getMessage(), Debugger::ERROR);
200 200
 			$this->flashMessage('Modification of registration(' . $guid . ') failed, result: ' . $e->getMessage(), self::FLASH_TYPE_ERROR);
201 201
 		}
202 202
 
@@ -281,13 +281,13 @@  discard block
 block discarded – undo
281 281
 */
282 282
 				$result = $this->sendRegistrationSummary((array) $newVisitor, $guid);
283 283
 
284
-				Debugger::log('Storage of visitor('. $guid .') successfull, result: ' . json_encode($result), Debugger::INFO);
284
+				Debugger::log('Storage of visitor(' . $guid . ') successfull, result: ' . json_encode($result), Debugger::INFO);
285 285
 				$this->flashMessage('Účastník(' . $guid . ') byl úspěšně uložen.', self::FLASH_TYPE_OK);
286 286
 			} catch(WsdlException $e) {
287
-				Debugger::log('Storage of visitor('. $guid .') failed, result: ' . $e->getMessage(), Debugger::WARNING);
287
+				Debugger::log('Storage of visitor(' . $guid . ') failed, result: ' . $e->getMessage(), Debugger::WARNING);
288 288
 				$this->flashMessage('Uložení účastníka (' . $guid . ') selhalo. Účastník je již zaregistrován.', self::FLASH_TYPE_ERROR);
289 289
 			} catch(Exception $e) {
290
-				Debugger::log('Storage of visitor('. $guid .') failed, result: ' .  $e->getMessage(), Debugger::ERROR);
290
+				Debugger::log('Storage of visitor(' . $guid . ') failed, result: ' . $e->getMessage(), Debugger::ERROR);
291 291
 				$this->flashMessage('Uložení účastníka selhalo, chyba: ' . $e->getMessage(), self::FLASH_TYPE_ERROR);
292 292
 			}
293 293
 
Please login to merge, or discard this patch.
app/services/SkautIS/SkautisService.php 2 patches
Doc Comments   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -70,7 +70,7 @@  discard block
 block discarded – undo
70 70
 	/**
71 71
 	 * Save value to local storage
72 72
 	 *
73
-	 * @param   mixed  $id
73
+	 * @param   string  $id
74 74
 	 * @param   mixed  $val
75 75
 	 * @return  mixed
76 76
 	 */
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
 	/**
87 87
 	 * Get object from local storage
88 88
 	 *
89
-	 * @param   string|int   $id
89
+	 * @param   string   $id
90 90
 	 * @return  mixed|FALSE
91 91
 	 */
92 92
 	protected function load($id)
@@ -98,7 +98,7 @@  discard block
 block discarded – undo
98 98
 	}
99 99
 
100 100
 	/**
101
-	 * @return Skautis\Skautis
101
+	 * @return Skautis
102 102
 	 */
103 103
 	public function getSkautis(): Skautis
104 104
 	{
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 	}
107 107
 
108 108
 	/**
109
-	 * @param Skautis\Skautis $skautis
109
+	 * @param Skautis $skautis
110 110
 	 *
111 111
 	 * @return self
112 112
 	 */
Please login to merge, or discard this patch.
Upper-Lower-Casing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	 * Use local storage (cache)?
30 30
 	 * @var bool
31 31
 	 */
32
-	private $useCache = TRUE;
32
+	private $useCache = true;
33 33
 
34 34
 
35 35
 	/**
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 	/**
43 43
 	 * Construct
44 44
 	 */
45
-	public function __construct(Skautis $skautIS = NULL)
45
+	public function __construct(Skautis $skautIS = null)
46 46
 	{
47 47
 		$this->setSkautis($skautIS);
48 48
 		self::$storage = array();
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 		if ($this->useCache && array_key_exists($id, self::$storage)) {
95 95
 			return self::$storage[$id];
96 96
 		}
97
-		return FALSE;
97
+		return false;
98 98
 	}
99 99
 
100 100
 	/**
Please login to merge, or discard this patch.
app/services/SkautIS/UserService.php 2 patches
Spacing   +7 added lines, -7 removed lines patch added patch discarded remove patch
@@ -47,7 +47,7 @@  discard block
 block discarded – undo
47 47
 	{
48 48
 		$id = __FUNCTION__;
49 49
 		// cache by the request
50
-		if (!($res = $this->load($id))) {
50
+		if(!($res = $this->load($id))) {
51 51
 			$res = $this->save($id, $this->getSkautis()->user->UserDetail());
52 52
 		}
53 53
 		return $res;
@@ -71,7 +71,7 @@  discard block
 block discarded – undo
71 71
 				'ID'          => $skautis->getToken(),
72 72
 			]);
73 73
 
74
-		if ($unitId) {
74
+		if($unitId) {
75 75
 			$skautis->setRoleId($id);
76 76
 			$skautis->setUnitId($unitId->ID_Unit);
77 77
 		}
@@ -174,17 +174,17 @@  discard block
 block discarded – undo
174 174
 		]);
175 175
 
176 176
 		// returns boolean if certain function for verifying is set
177
-		if ($ID_Action !== NULL) {
178
-			if ($res instanceof stdClass) {
177
+		if($ID_Action !== NULL) {
178
+			if($res instanceof stdClass) {
179 179
 				return false;
180 180
 			}
181
-			if (is_array($res)) {
181
+			if(is_array($res)) {
182 182
 				return true;
183 183
 			}
184 184
 		}
185
-		if (is_array($res)) {
185
+		if(is_array($res)) {
186 186
 			$tmp = array();
187
-			foreach ($res as $v) {
187
+			foreach($res as $v) {
188 188
 				$tmp[$v->ID] = $v;
189 189
 			}
190 190
 			return $tmp;
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 	 * @param   type  $ID_Action  tabulka v DB skautisu
166 166
 	 * @return  BOOL|stdClass|array
167 167
 	 */
168
-	public function actionVerify($table, $id = NULL, $ID_Action = NULL)
168
+	public function actionVerify($table, $id = null, $ID_Action = null)
169 169
 	{
170 170
 		$res = $this->getSkautis()->user->ActionVerify([
171 171
 			'ID'        => $id,
@@ -174,7 +174,7 @@  discard block
 block discarded – undo
174 174
 		]);
175 175
 
176 176
 		// returns boolean if certain function for verifying is set
177
-		if ($ID_Action !== NULL) {
177
+		if ($ID_Action !== null) {
178 178
 			if ($res instanceof stdClass) {
179 179
 				return false;
180 180
 			}
Please login to merge, or discard this patch.
app/models/MeetingModel.php 3 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -262,7 +262,7 @@
 block discarded – undo
262 262
 			$html = "<table>\n";
263 263
 			$html .= " <tr>\n";
264 264
 			foreach($result as $data) {
265
-				$html .= "<td class='category cat-".$data['style']."' style='text-align:center;'>\n";
265
+				$html .= "<td class='category cat-" . $data['style'] . "' style='text-align:center;'>\n";
266 266
 				$html .= "<a class='programLink' rel='programDetail' href='#' rel='programDetail' title='" . $this->program->getDetail($data['id'], 'program', $this->httpEncoding) . "'>" . $data['name'] . "</a>\n";
267 267
 				$html .= "</td>\n";
268 268
 			}
Please login to merge, or discard this patch.
Upper-Lower-Casing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,12 +35,12 @@
 block discarded – undo
35 35
 	/**
36 36
 	 * @var DateTime
37 37
 	 */
38
-	public $regOpening = NULL;
38
+	public $regOpening = null;
39 39
 
40 40
 	/**
41 41
 	 * @var DateTime
42 42
 	 */
43
-	public $regClosing = NULL;
43
+	public $regClosing = null;
44 44
 
45 45
 	/** @var string registration heading text */
46 46
 	public $regHeading = '';
Please login to merge, or discard this patch.
Doc Comments   +9 added lines, -6 removed lines patch added patch discarded remove patch
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	}
118 118
 
119 119
 	/**
120
-	 * @return Nette\Database\Table\IRow
120
+	 * @return \Nette\Database\IRow[]
121 121
 	 */
122 122
 	public function all()
123 123
 	{
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
 	 * Create a new record
144 144
 	 *
145 145
 	 * @param	mixed	array of data
146
-	 * @return	boolean
146
+	 * @return	\Nette\Database\ResultSet
147 147
 	 */
148 148
 	public function create(array $data)
149 149
 	{
@@ -157,8 +157,8 @@  discard block
 block discarded – undo
157 157
 	 * Modify record
158 158
 	 *
159 159
 	 * @param	int		$id			ID of record
160
-	 * @param	array	$db_data	array of data
161
-	 * @return	bool
160
+	 * @param	array	$data	array of data
161
+	 * @return	integer|null
162 162
 	 */
163 163
 	public function update($id, array $data)
164 164
 	{
@@ -171,7 +171,7 @@  discard block
 block discarded – undo
171 171
 	 * Delete one or multiple record/s
172 172
 	 *
173 173
 	 * @param	int		ID/s of record
174
-	 * @return	boolean
174
+	 * @return	integer|null
175 175
 	 */
176 176
 	public function delete($ids)
177 177
 	{
@@ -272,6 +272,9 @@  discard block
 block discarded – undo
272 272
 		return $html;
273 273
 	}
274 274
 
275
+	/**
276
+	 * @param integer $meetingId
277
+	 */
275 278
 	public function renderPublicProgramOverview($meetingId)
276 279
 	{
277 280
 		$days = array("pátek", "sobota", "neděle");
@@ -472,7 +475,7 @@  discard block
 block discarded – undo
472 475
 	}
473 476
 
474 477
 	/**
475
-	 * @return ActiveRow
478
+	 * @return \Nette\Database\IRow[]
476 479
 	 */
477 480
 	public function getMenuItems()
478 481
 	{
Please login to merge, or discard this patch.
app/models/SettingsModel.php 1 patch
Doc Comments   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -31,7 +31,7 @@  discard block
 block discarded – undo
31 31
 	}
32 32
 
33 33
 	/**
34
-	 * @return	Nette\Database\Table\ActiveRow
34
+	 * @return	\Nette\Database\IRow[]
35 35
 	 */
36 36
 	public function allOrFail()
37 37
 	{
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 	 *
50 50
 	 * @param	string 	$subject 	e-mail subject
51 51
 	 * @param	string	$message 	e-mail message
52
-	 * @return	string 				error code
52
+	 * @return	integer 				error code
53 53
 	 */
54 54
 	public function modifyMailJSON($type, $subject, $message)
55 55
 	{
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
 	}
78 78
 
79 79
 	/**
80
-	 * @return ActiveRow
80
+	 * @return \Nette\Database\IRow[]
81 81
 	 */
82 82
 	public function all()
83 83
 	{
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 	/**
105 105
 	 * @param  mixed  $value
106 106
 	 * @param  string $name
107
-	 * @return ActiveRow
107
+	 * @return integer|null
108 108
 	 */
109 109
 	public function updateByName($value, $name)
110 110
 	{
@@ -116,7 +116,7 @@  discard block
 block discarded – undo
116 116
 
117 117
 	/**
118 118
 	 * @param  mixed $data
119
-	 * @return Row
119
+	 * @return integer|null
120 120
 	 */
121 121
 	public function updateDebugRegime($data)
122 122
 	{
Please login to merge, or discard this patch.
app/presenters/VisitorPresenter.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -99,10 +99,10 @@  discard block
 block discarded – undo
99 99
 			$guid = $this->getVisitorService()->create($postData);
100 100
 			$result = $this->sendRegistrationSummary($postData, $guid);
101 101
 
102
-			Debugger::log('Creation of visitor('. $guid .') successfull, result: ' . json_encode($result), Debugger::INFO);
102
+			Debugger::log('Creation of visitor(' . $guid . ') successfull, result: ' . json_encode($result), Debugger::INFO);
103 103
 			$this->flashMessage('Účastník(' . $guid . ') byl úspěšně vytvořen.', 'ok');
104 104
 		} catch(Exception $e) {
105
-			Debugger::log('Creation of visitor('. $guid .') failed, result: ' .  $e->getMessage(), Debugger::ERROR);
105
+			Debugger::log('Creation of visitor(' . $guid . ') failed, result: ' . $e->getMessage(), Debugger::ERROR);
106 106
 			$this->flashMessage('Creation of visitor failed, result: ' . $e->getMessage(), 'error');
107 107
 		}
108 108
 
@@ -126,10 +126,10 @@  discard block
 block discarded – undo
126 126
 
127 127
 			//$result = $this->sendRegistrationSummary($visitor, $guid);
128 128
 
129
-			Debugger::log('Modification of visitor('. $id .') successfull, result: ' . json_encode($result), Debugger::INFO);
129
+			Debugger::log('Modification of visitor(' . $id . ') successfull, result: ' . json_encode($result), Debugger::INFO);
130 130
 			$this->flashMessage('Účastník(' . $id . ') byl úspěšně upraven.', 'ok');
131 131
 		} catch(Exception $e) {
132
-			Debugger::log('Modification of visitor('. $id .') failed, result: ' .  $e->getMessage(), Debugger::ERROR);
132
+			Debugger::log('Modification of visitor(' . $id . ') failed, result: ' . $e->getMessage(), Debugger::ERROR);
133 133
 			$this->flashMessage('Modification of visitor failed, result: ' . $e->getMessage(), 'error');
134 134
 		}
135 135
 
@@ -145,10 +145,10 @@  discard block
 block discarded – undo
145 145
 		try {
146 146
 			$result = $this->getVisitorService()->delete($id);
147 147
 
148
-			Debugger::log('Destroying of visitor('. $id .') successfull, result: ' . json_encode($result), Debugger::INFO);
148
+			Debugger::log('Destroying of visitor(' . $id . ') successfull, result: ' . json_encode($result), Debugger::INFO);
149 149
 			$this->flashMessage('Položka byla úspěšně smazána', 'ok');
150 150
 		} catch(Exception $e) {
151
-			Debugger::log('Destroying of visitor('. $id .') failed, result: ' .  $e->getMessage(), Debugger::ERROR);
151
+			Debugger::log('Destroying of visitor(' . $id . ') failed, result: ' . $e->getMessage(), Debugger::ERROR);
152 152
 			$this->flashMessage('Destroying of visitor failed, result: ' . $e->getMessage(), 'error');
153 153
 		}
154 154
 
@@ -184,7 +184,7 @@  discard block
 block discarded – undo
184 184
 			Debugger::log('E-mail was send successfully, result: ' . json_encode($result), Debugger::INFO);
185 185
 			$this->flashMessage('E-mail byl úspěšně odeslán', 'ok');
186 186
 		} catch(Exception $e) {
187
-			Debugger::log('Sending of e-mail failed, result: ' .  $e->getMessage(), Debugger::ERROR);
187
+			Debugger::log('Sending of e-mail failed, result: ' . $e->getMessage(), Debugger::ERROR);
188 188
 			$this->flashMessage('Sending of e-mail failed, result: ' . $e->getMessage(), 'error');
189 189
 		}
190 190
 
@@ -245,10 +245,10 @@  discard block
 block discarded – undo
245 245
 	{
246 246
 		try {
247 247
 			$result = $this->getModel()->checked($id, '1');
248
-			Debugger::log('Check of visitor('. $id .') successfull, result: ' . json_encode($result), Debugger::INFO);
248
+			Debugger::log('Check of visitor(' . $id . ') successfull, result: ' . json_encode($result), Debugger::INFO);
249 249
 			$this->flashMessage('Položka byla úspěšně zkontrolována', 'ok');
250 250
 		} catch(Exception $e) {
251
-			Debugger::log('Check of visitor('. $id .') failed, result: ' .  $e->getMessage(), Debugger::ERROR);
251
+			Debugger::log('Check of visitor(' . $id . ') failed, result: ' . $e->getMessage(), Debugger::ERROR);
252 252
 			$this->flashMessage('Check of visitor failed, result: ' . $e->getMessage(), 'error');
253 253
 		}
254 254
 
@@ -265,10 +265,10 @@  discard block
 block discarded – undo
265 265
 	{
266 266
 		try {
267 267
 			$result = $this->getModel()->checked($id, 0);
268
-			Debugger::log('Uncheck of visitor('. $id .') successfull, result: ' . json_encode($result), Debugger::INFO);
268
+			Debugger::log('Uncheck of visitor(' . $id . ') successfull, result: ' . json_encode($result), Debugger::INFO);
269 269
 			$this->flashMessage('Položka byla nastavena jako nekontrolována', 'ok');
270 270
 		} catch(Exception $e) {
271
-			Debugger::log('Uncheck of visitor('. $id .') failed, result: ' .  $e->getMessage(), Debugger::ERROR);
271
+			Debugger::log('Uncheck of visitor(' . $id . ') failed, result: ' . $e->getMessage(), Debugger::ERROR);
272 272
 			$this->flashMessage('Uncheck of visitor failed, result: ' . $e->getMessage(), 'error');
273 273
 		}
274 274
 
@@ -381,7 +381,7 @@  discard block
 block discarded – undo
381 381
 	protected function sendRegistrationSummary(array $visitor, $guid)
382 382
 	{
383 383
 		$recipient = [
384
-			$visitor['email'] => $visitor['name']. ' ' . $visitor['surname'],
384
+			$visitor['email'] => $visitor['name'] . ' ' . $visitor['surname'],
385 385
 		];
386 386
 
387 387
 		$code4bank = $this->getVisitorService()->calculateCode4Bank(
Please login to merge, or discard this patch.
app/models/BlockModel.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -84,7 +84,7 @@
 block discarded – undo
84 84
 
85 85
 		$htmlSelect = "<select style='width: 300px; font-size: 10px' name='block'>\n";
86 86
 
87
-		foreach($blocks as $block){
87
+		foreach($blocks as $block) {
88 88
 			if($block->id == $blockId) {
89 89
 				$selected = 'selected';
90 90
 			} else {
Please login to merge, or discard this patch.