@@ -146,7 +146,7 @@ |
||
146 | 146 | /** |
147 | 147 | * Read the CSV-file |
148 | 148 | * @param string $file Path to the CSV-file |
149 | - * @return array All course-information read from the file |
|
149 | + * @return Ddeboer\DataImport\Reader\CsvReader All course-information read from the file |
|
150 | 150 | */ |
151 | 151 | function parse_csv_courses_data($file) |
152 | 152 | { |
@@ -435,6 +435,12 @@ |
||
435 | 435 | |
436 | 436 | /** |
437 | 437 | * Additional functions needed for fast integration |
438 | + * @param integer $status |
|
439 | + * @param string $section |
|
440 | + * @param string $title |
|
441 | + * @param string $url |
|
442 | + * @param string|null $formatter |
|
443 | + * @param string $comment |
|
438 | 444 | */ |
439 | 445 | public function build_setting( |
440 | 446 | $status, |
@@ -492,19 +492,19 @@ |
||
492 | 492 | |
493 | 493 | public function format_yes_no_optional($value) |
494 | 494 | { |
495 | - $return = ''; |
|
496 | - switch ($value) { |
|
497 | - case 0: |
|
498 | - $return = get_lang('No'); |
|
499 | - break; |
|
500 | - case 1: |
|
501 | - $return = get_lang('Yes'); |
|
502 | - break; |
|
503 | - case 2: |
|
504 | - $return = get_lang('Optional'); |
|
505 | - break; |
|
506 | - } |
|
507 | - return $return; |
|
495 | + $return = ''; |
|
496 | + switch ($value) { |
|
497 | + case 0: |
|
498 | + $return = get_lang('No'); |
|
499 | + break; |
|
500 | + case 1: |
|
501 | + $return = get_lang('Yes'); |
|
502 | + break; |
|
503 | + case 2: |
|
504 | + $return = get_lang('Optional'); |
|
505 | + break; |
|
506 | + } |
|
507 | + return $return; |
|
508 | 508 | |
509 | 509 | } |
510 | 510 |
@@ -232,8 +232,9 @@ discard block |
||
232 | 232 | $array[] = $this->build_setting($status, '[INI]', 'display_errors', 'http://www.php.net/manual/en/ini.core.php#ini.display_errors', $setting, $req_setting, 'on_off', get_lang('DisplayErrorsInfo')); |
233 | 233 | |
234 | 234 | $setting = ini_get('default_charset'); |
235 | - if ($setting == '') |
|
236 | - $setting = null; |
|
235 | + if ($setting == '') { |
|
236 | + $setting = null; |
|
237 | + } |
|
237 | 238 | $req_setting = null; |
238 | 239 | $status = $setting == $req_setting ? self::STATUS_OK : self::STATUS_ERROR; |
239 | 240 | $array[] = $this->build_setting($status, '[INI]', 'default_charset', 'http://www.php.net/manual/en/ini.core.php#ini.default-charset', $setting, $req_setting, null, get_lang('DefaultCharsetInfo')); |
@@ -251,22 +252,25 @@ discard block |
||
251 | 252 | $setting = ini_get('memory_limit'); |
252 | 253 | $req_setting = '>= '.REQUIRED_MIN_MEMORY_LIMIT.'M'; |
253 | 254 | $status = self::STATUS_ERROR; |
254 | - if ((float) $setting >= REQUIRED_MIN_MEMORY_LIMIT) |
|
255 | - $status = self::STATUS_OK; |
|
255 | + if ((float) $setting >= REQUIRED_MIN_MEMORY_LIMIT) { |
|
256 | + $status = self::STATUS_OK; |
|
257 | + } |
|
256 | 258 | $array[] = $this->build_setting($status, '[INI]', 'memory_limit', 'http://www.php.net/manual/en/ini.core.php#ini.memory-limit', $setting, $req_setting, null, get_lang('MemoryLimitInfo')); |
257 | 259 | |
258 | 260 | $setting = ini_get('post_max_size'); |
259 | 261 | $req_setting = '>= '.REQUIRED_MIN_POST_MAX_SIZE.'M'; |
260 | 262 | $status = self::STATUS_ERROR; |
261 | - if ((float) $setting >= REQUIRED_MIN_POST_MAX_SIZE) |
|
262 | - $status = self::STATUS_OK; |
|
263 | + if ((float) $setting >= REQUIRED_MIN_POST_MAX_SIZE) { |
|
264 | + $status = self::STATUS_OK; |
|
265 | + } |
|
263 | 266 | $array[] = $this->build_setting($status, '[INI]', 'post_max_size', 'http://www.php.net/manual/en/ini.core.php#ini.post-max-size', $setting, $req_setting, null, get_lang('PostMaxSizeInfo')); |
264 | 267 | |
265 | 268 | $setting = ini_get('upload_max_filesize'); |
266 | 269 | $req_setting = '>= '.REQUIRED_MIN_UPLOAD_MAX_FILESIZE.'M'; |
267 | 270 | $status = self::STATUS_ERROR; |
268 | - if ((float) $setting >= REQUIRED_MIN_UPLOAD_MAX_FILESIZE) |
|
269 | - $status = self::STATUS_OK; |
|
271 | + if ((float) $setting >= REQUIRED_MIN_UPLOAD_MAX_FILESIZE) { |
|
272 | + $status = self::STATUS_OK; |
|
273 | + } |
|
270 | 274 | $array[] = $this->build_setting($status, '[INI]', 'upload_max_filesize', 'http://www.php.net/manual/en/ini.core.php#ini.upload_max_filesize', $setting, $req_setting, null, get_lang('UploadMaxFilesizeInfo')); |
271 | 275 | |
272 | 276 | $setting = ini_get('variables_order'); |
@@ -13,7 +13,7 @@ |
||
13 | 13 | /** |
14 | 14 | * @param string $event_name |
15 | 15 | * @param array $event_data |
16 | - * @return bool |
|
16 | + * @return false|null |
|
17 | 17 | */ |
18 | 18 | public static function events($event_name, $event_data = array()) |
19 | 19 | { |
@@ -306,7 +306,7 @@ |
||
306 | 306 | * @param bool $add_to_calendar |
307 | 307 | * @param bool $sendEmailTest |
308 | 308 | * |
309 | - * @return mixed insert_id on success, false on failure |
|
309 | + * @return false|string insert_id on success, false on failure |
|
310 | 310 | */ |
311 | 311 | public static function add_announcement( |
312 | 312 | $title, |
@@ -457,10 +457,10 @@ |
||
457 | 457 | } |
458 | 458 | |
459 | 459 | /** |
460 | - * Gets the groups of this announce |
|
461 | - * @param int announcement id |
|
462 | - * @return array array of group id |
|
463 | - **/ |
|
460 | + * Gets the groups of this announce |
|
461 | + * @param int announcement id |
|
462 | + * @return array array of group id |
|
463 | + **/ |
|
464 | 464 | public static function get_announcement_groups($announcement_id) |
465 | 465 | { |
466 | 466 | $tbl_announcement_group = Database::get_main_table(TABLE_MAIN_SYSTEM_ANNOUNCEMENTS_GROUPS); |
@@ -592,7 +592,7 @@ discard block |
||
592 | 592 | $table = Database::get_main_table(TABLE_MAIN_SYSTEM_ANNOUNCEMENTS); |
593 | 593 | foreach ($list as $key => $title) { |
594 | 594 | $value = isset($visibility[$key]) && $visibility[$key] ? 1 : 0; |
595 | - $sql = "UPDATE $table SET $key = '$value' WHERE id = $id"; |
|
595 | + $sql = "update $table SET $key = '$value' WHERE id = $id"; |
|
596 | 596 | Database::query($sql); |
597 | 597 | } |
598 | 598 | return true; |
@@ -675,7 +675,7 @@ discard block |
||
675 | 675 | } |
676 | 676 | |
677 | 677 | $field = $user; |
678 | - $sql = "UPDATE $table SET ".$field." = '".$visible."' |
|
678 | + $sql = "update $table SET ".$field." = '".$visible."' |
|
679 | 679 | WHERE id='".$id."'"; |
680 | 680 | $res = Database::query($sql); |
681 | 681 |
@@ -9,7 +9,7 @@ |
||
9 | 9 | /** |
10 | 10 | * Start a timer and hand it back to the JS by assigning the current time (of start) to |
11 | 11 | * var asset_timer |
12 | - * @return string JavaScript time intializer |
|
12 | + * @return integer JavaScript time intializer |
|
13 | 13 | */ |
14 | 14 | function start_timer() |
15 | 15 | { |
@@ -327,7 +327,7 @@ |
||
327 | 327 | * @param array $arr1 first array |
328 | 328 | * @param array $arr2 second array |
329 | 329 | * |
330 | - * @return array difference between the two arrays |
|
330 | + * @return string difference between the two arrays |
|
331 | 331 | */ |
332 | 332 | function diff($arr1, $arr2) |
333 | 333 | { |
@@ -25,7 +25,7 @@ |
||
25 | 25 | * @Route("/", name="contact") |
26 | 26 | * |
27 | 27 | * @param Request $request |
28 | - * @return mixed |
|
28 | + * @return Response |
|
29 | 29 | */ |
30 | 30 | public function indexAction(Request $request) |
31 | 31 | { |
@@ -212,7 +212,7 @@ |
||
212 | 212 | |
213 | 213 | /** |
214 | 214 | * @param array $file |
215 | - * @return bool|string |
|
215 | + * @return string|false |
|
216 | 216 | */ |
217 | 217 | public static function importUploadedFile($file) |
218 | 218 | { |
@@ -18,7 +18,7 @@ |
||
18 | 18 | * Asset constructor. |
19 | 19 | * @param int $id |
20 | 20 | * @param int $path |
21 | - * @param $title |
|
21 | + * @param string $title |
|
22 | 22 | */ |
23 | 23 | public function __construct($id, $path, $title) |
24 | 24 | { |