diff options
Diffstat (limited to 'core/modules/file/file.api.php')
-rw-r--r-- | core/modules/file/file.api.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/modules/file/file.api.php b/core/modules/file/file.api.php index c7994ff7231..1fda717da7a 100644 --- a/core/modules/file/file.api.php +++ b/core/modules/file/file.api.php @@ -25,7 +25,7 @@ * @see file_validate() */ function hook_file_validate(Drupal\file\FileInterface $file) { - $errors = array(); + $errors = []; if (!$file->getFilename()) { $errors[] = t("The file's name is empty. Please give a name to the file."); @@ -53,7 +53,7 @@ function hook_file_copy(Drupal\file\FileInterface $file, Drupal\file\FileInterfa $file->setFilename($file->getOwner()->name . '_' . $file->getFilename()); $file->save(); - \Drupal::logger('file')->notice('Copied file %source has been renamed to %destination', array('%source' => $source->filename, '%destination' => $file->getFilename())); + \Drupal::logger('file')->notice('Copied file %source has been renamed to %destination', ['%source' => $source->filename, '%destination' => $file->getFilename()]); } } @@ -73,7 +73,7 @@ function hook_file_move(Drupal\file\FileInterface $file, Drupal\file\FileInterfa $file->setFilename($file->getOwner()->name . '_' . $file->getFilename()); $file->save(); - \Drupal::logger('file')->notice('Moved file %source has been renamed to %destination', array('%source' => $source->filename, '%destination' => $file->getFilename())); + \Drupal::logger('file')->notice('Moved file %source has been renamed to %destination', ['%source' => $source->filename, '%destination' => $file->getFilename()]); } } |