Commit 4809d5be authored by Munavijayalakshmi's avatar Munavijayalakshmi Committed by chr.fritsch

Issue #2872245 by Munavijayalakshmi, amit.drupal: Convert module to use short...

Issue #2872245 by Munavijayalakshmi, amit.drupal: Convert module to use short array syntax (new coding standard)
parent 5bc6f9c4
......@@ -29,13 +29,13 @@ function dropzonejs_requirements($phase) {
}
if (!$library_found) {
$requirements['dropzonejs_library'] = array(
$requirements['dropzonejs_library'] = [
'title' => t('Dropzone library missing'),
'description' => t('Dropzonejs requires the dropzone.min.js library.
Download it (https://github.com/enyo/dropzone) and place it in the
libraries folder (/libraries)'),
'severity' => REQUIREMENT_ERROR,
);
];
}
return $requirements;
......
......@@ -44,14 +44,14 @@ class UploadException extends \Exception {
*
* @var array
*/
public $errorMessages = array(
public $errorMessages = [
self::INPUT_ERROR => 'Failed to open input stream.',
self::OUTPUT_ERROR => 'Failed to open output stream.',
self::MOVE_ERROR => 'Failed to move uploaded file.',
self::DESTINATION_FOLDER_ERROR => 'Failed to open temporary directory for write.',
self::FILENAME_ERROR => 'Invalid temporary file name.',
self::FILE_UPLOAD_ERROR => 'The file upload resulted in an error on php level. See http://php.net/manual/en/features.file-upload.errors.php',
);
];
/**
* Constructs UploadException.
......@@ -74,11 +74,11 @@ class UploadException extends \Exception {
*/
public function getErrorResponse() {
return new JsonResponse(
array(
[
'jsonrpc' => '2.0',
'error' => $this->errorMessages[$this->code],
'id' => 'id',
),
],
500
);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment