@@ -151,7 +151,7 @@ |
||
| 151 | 151 | /** |
| 152 | 152 | * Read the CSV-file |
| 153 | 153 | * @param string $file Path to the CSV-file |
| 154 | - * @return array All course-information read from the file |
|
| 154 | + * @return Ddeboer\DataImport\Reader\CsvReader All course-information read from the file |
|
| 155 | 155 | */ |
| 156 | 156 | function parse_csv_data($file) |
| 157 | 157 | { |
@@ -15,13 +15,13 @@ discard block |
||
| 15 | 15 | */ |
| 16 | 16 | function validate_data($courses) |
| 17 | 17 | { |
| 18 | - $errors = array (); |
|
| 19 | - $coursecodes = array (); |
|
| 18 | + $errors = array(); |
|
| 19 | + $coursecodes = array(); |
|
| 20 | 20 | foreach ($courses as $index => $course) { |
| 21 | - $course['line'] = $index +1; |
|
| 21 | + $course['line'] = $index + 1; |
|
| 22 | 22 | |
| 23 | 23 | // 1. Check whether mandatory fields are set. |
| 24 | - $mandatory_fields = array ('Code', 'Title', 'CourseCategory'); |
|
| 24 | + $mandatory_fields = array('Code', 'Title', 'CourseCategory'); |
|
| 25 | 25 | foreach ($mandatory_fields as $field) { |
| 26 | 26 | if (empty($course[$field])) { |
| 27 | 27 | $course['error'] = get_lang($field.'Mandatory'); |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | } |
| 65 | 65 | } |
| 66 | 66 | |
| 67 | - if(!empty($course['CourseCategory'])) { |
|
| 67 | + if (!empty($course['CourseCategory'])) { |
|
| 68 | 68 | $categoryInfo = CourseCategory::getCategory($course['CourseCategory']); |
| 69 | 69 | if (empty($categoryInfo)) { |
| 70 | 70 | CourseCategory::addNode($course['CourseCategory'], $course['CourseCategoryName'] ? $course['CourseCategoryName'] : $course['CourseCategory'], 'TRUE', null); |
@@ -38,7 +38,7 @@ discard block |
||
| 38 | 38 | * @param array $data |
| 39 | 39 | * @param string $filename |
| 40 | 40 | * |
| 41 | - * @return mixed csv file | false if no data to export |
|
| 41 | + * @return false|null csv file | false if no data to export |
|
| 42 | 42 | */ |
| 43 | 43 | public static function arrayToCsv($data, $filename = 'export') |
| 44 | 44 | { |
@@ -160,7 +160,7 @@ discard block |
||
| 160 | 160 | * @param string Name of common tag to place each line in |
| 161 | 161 | * @param string Name of the root element. A root element should always be given. |
| 162 | 162 | * @param string Encoding in which the data is provided |
| 163 | - * @return void Prompts the user for a file download |
|
| 163 | + * @return boolean Prompts the user for a file download |
|
| 164 | 164 | */ |
| 165 | 165 | public static function export_complex_table_xml( |
| 166 | 166 | $data, |
@@ -286,7 +286,7 @@ discard block |
||
| 286 | 286 | * @param string $name |
| 287 | 287 | * @param string $format |
| 288 | 288 | * |
| 289 | - * @return bool |
|
| 289 | + * @return false|null |
|
| 290 | 290 | */ |
| 291 | 291 | public static function htmlToOdt($html, $name, $format = 'odt') |
| 292 | 292 | { |