summaryrefslogtreecommitdiffstatshomepage
path: root/core/modules/file/file.api.php
diff options
context:
space:
mode:
authorxjm <xjm@65776.no-reply.drupal.org>2017-03-03 19:20:24 -0600
committerxjm <xjm@65776.no-reply.drupal.org>2017-03-03 19:20:24 -0600
commit52e3eec616efab4d5201e30d085a09ba5c4817e6 (patch)
treed295cc8b862edc04018ba0e04ded752fd1a2f5c6 /core/modules/file/file.api.php
parent3aba956a39a4852f42cad8483e4e6e307bedbd0e (diff)
downloaddrupal-52e3eec616efab4d5201e30d085a09ba5c4817e6.tar.gz
drupal-52e3eec616efab4d5201e30d085a09ba5c4817e6.zip
Issue #2776975 by joelpittet, dawehner, tim.plunkett, xjm, pfrenssen: March 3, 2017: Convert core to array syntax coding standards for Drupal 8.3.x RC phase
Diffstat (limited to 'core/modules/file/file.api.php')
-rw-r--r--core/modules/file/file.api.php6
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()]);
}
}