@@ -56,7 +56,7 @@ class chunkupload_form_element extends \HTML_QuickForm_input implements \templat
5656 // We cannot do $_options = array('return_types'=> FILE_INTERNAL | FILE_REFERENCE);.
5757 // So I have to set null here, and do it in constructor.
5858 /** @var array options provided to initalize filemanager */
59- protected $ _options = array ( 'maxbytes ' => 0 , 'accepted_types ' => '* ' ) ;
59+ protected $ _options = [ 'maxbytes ' => 0 , 'accepted_types ' => '* ' ] ;
6060
6161 /**
6262 * Constructor
@@ -152,14 +152,14 @@ public function tohtml() {
152152 $ html .= $ OUTPUT ->render_from_template ('core_form/filetypes-descriptions ' , $ filetypedescriptions );
153153 }
154154
155- $ PAGE ->requires ->js_call_amd ('local_chunkupload/chunkupload ' , 'init ' , array (
155+ $ PAGE ->requires ->js_call_amd ('local_chunkupload/chunkupload ' , 'init ' , [
156156 'elementid ' => $ id ,
157157 'acceptedTypes ' => $ acceptedtypes ,
158158 'maxBytes ' => (int ) $ this ->_options ['maxbytes ' ],
159159 'wwwroot ' => $ CFG ->wwwroot ,
160160 'chunksize ' => get_config ('local_chunkupload ' , 'chunksize ' ) * 1024 * 1024 ,
161161 'browsetext ' => get_string ('choosefile ' , 'mod_feedback ' ),
162- ) );
162+ ] );
163163 return $ html ;
164164 }
165165
@@ -296,9 +296,9 @@ public static function export_to_filearea($chunkuploadid, $newcontextid, $newcom
296296 return null ;
297297 }
298298
299- $ filerecord = array ( 'contextid ' => $ newcontextid , 'component ' => $ newcomponent ,
299+ $ filerecord = [ 'contextid ' => $ newcontextid , 'component ' => $ newcomponent ,
300300 'filearea ' => $ newfilearea , 'itemid ' => $ chunkuploadid , 'filepath ' => $ newfilepath ,
301- 'filename ' => $ record ->filename , 'userid ' => $ record ->userid ) ;
301+ 'filename ' => $ record ->filename , 'userid ' => $ record ->userid , ] ;
302302
303303 \core_php_time_limit::raise ();
304304
@@ -316,7 +316,7 @@ public static function export_to_filearea($chunkuploadid, $newcontextid, $newcom
316316 */
317317 public static function delete_file ($ chunkuploadid ) {
318318 global $ DB ;
319- $ DB ->delete_records ('local_chunkupload_files ' , array ( 'id ' => $ chunkuploadid) );
319+ $ DB ->delete_records ('local_chunkupload_files ' , [ 'id ' => $ chunkuploadid] );
320320 $ path = self ::get_path_for_id ($ chunkuploadid );
321321 if (file_exists ($ path )) {
322322 unlink ($ path );
0 commit comments