You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
testing the branch Release_4.2 the moodle codechecker is not happy with the following:
local/chunkupload/classes/chunkupload_form_element.php
#59: ····protected·$_options·=·array('maxbytes'·=>·0,·'accepted_types'·=>·'*');
Short array syntax must be used to define arrays (Generic.Arrays.DisallowLongArraySyntax.Found)
#155: ········$PAGE->requires->js_call_amd('local_chunkupload/chunkupload',·'init',·array(
Short array syntax must be used to define arrays (Generic.Arrays.DisallowLongArraySyntax.Found)
#299: ········$filerecord·=·array('contextid'·=>·$newcontextid,·'component'·=>·$newcomponent,
Short array syntax must be used to define arrays (Generic.Arrays.DisallowLongArraySyntax.Found)
#301: ················'filename'·=>·$record->filename,·'userid'·=>·$record->userid);
There should be a comma after the last array item in a multi-line array. (NormalizedArrays.Arrays.CommaAfterLast.MissingMultiLine)
#319: ········$DB->delete_records('local_chunkupload_files',·array('id'·=>·$chunkuploadid));
Short array syntax must be used to define arrays (Generic.Arrays.DisallowLongArraySyntax.Found)
local/chunkupload/classes/local/chunkupload_file.php
#29: defined('MOODLE_INTERNAL')·||·die();
Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected. (moodle.Files.MoodleInternal.MoodleInternalNotNeeded)
#52: ········$record·=·$DB->get_record('local_chunkupload_files',·array('id'·=>·$token));
Short array syntax must be used to define arrays (Generic.Arrays.DisallowLongArraySyntax.Found)
#100: }
File must end with a newline character (Generic.Files.EndFileNewline.NotFound)
local/chunkupload/classes/local/tests/testmform.php
#57: ················array('maxbytes'·=>·2·*·1024·*·1024,·'accepted_types'·=>·array('.png')));
Short array syntax must be used to define arrays (Generic.Arrays.DisallowLongArraySyntax.Found)
Short array syntax must be used to define arrays (Generic.Arrays.DisallowLongArraySyntax.Found)
#61: }
File must end with a newline character (Generic.Files.EndFileNewline.NotFound)
local/chunkupload/classes/state_type.php
#25: defined('MOODLE_INTERNAL')·||·die();
Unexpected MOODLE_INTERNAL check. No side effects or multiple artifacts detected. (moodle.Files.MoodleInternal.MoodleInternalNotNeeded)
local/chunkupload/classes/task/cleanup_files.php
#57: ················array('time'·=>·time()·-·$config->state0duration,·'state'·=>·state_type::UNUSED_TOKEN_GENERATED));
Short array syntax must be used to define arrays (Generic.Arrays.DisallowLongArraySyntax.Found)
#61: ················'lastmodified·<·:time·AND·state·=·:state',·array('time'·=>·time()·-·$config->state1duration,
Short array syntax must be used to define arrays (Generic.Arrays.DisallowLongArraySyntax.Found)
#62: ················'state'·=>·state_type::UPLOAD_STARTED));
There should be a comma after the last array item in a multi-line array. (NormalizedArrays.Arrays.CommaAfterLast.MissingMultiLine)
#73: ················'lastmodified·<·:time·AND·state·=·:state',·array('time'·=>·time()·-·$config->state2duration,
Short array syntax must be used to define arrays (Generic.Arrays.DisallowLongArraySyntax.Found)
#74: ················'state'·=>·state_type::UPLOAD_COMPLETED));
There should be a comma after the last array item in a multi-line array. (NormalizedArrays.Arrays.CommaAfterLast.MissingMultiLine)
local/chunkupload/db/tasks.php
#29: $tasks·=·array(
Short array syntax must be used to define arrays (Generic.Arrays.DisallowLongArraySyntax.Found)
#30: ····array(
Short array syntax must be used to define arrays (Generic.Arrays.DisallowLongArraySyntax.Found)
#37: ········'month'·=>·'*'
There should be a comma after the last array item in a multi-line array. (NormalizedArrays.Arrays.CommaAfterLast.MissingMultiLine)
local/chunkupload/proceedupload_ajax.php
#124: die(json_encode($response));
File must end with a newline character (Generic.Files.EndFileNewline.NotFound)
local/chunkupload/startupload_ajax.php
#115: die(json_encode($response));
File must end with a newline character (Generic.Files.EndFileNewline.NotFound)
local/chunkupload/tests/behat/behat_local_chunkupload.php
#55: }
File must end with a newline character (Generic.Files.EndFileNewline.NotFound)
local/chunkupload/tests/testupload.php
#54: echo·$OUTPUT->footer();
File must end with a newline character (Generic.Files.EndFileNewline.NotFound)
Please, can someone of the plugin maintainers have a look at it?
The text was updated successfully, but these errors were encountered:
abias
added
improvement
Something which improves an existing feature in some way (UX, UI, Design, Functionality)
cleanup
Something which has to be cleaned up or improved in the inner workings of the plugin
and removed
improvement
Something which improves an existing feature in some way (UX, UI, Design, Functionality)
labels
Feb 25, 2025
Hello,
testing the branch Release_4.2 the moodle codechecker is not happy with the following:
Please, can someone of the plugin maintainers have a look at it?
The text was updated successfully, but these errors were encountered: