diff --git a/core/modules/file/file.module b/core/modules/file/file.module index b4c510a..8dc9be4 100644 --- a/core/modules/file/file.module +++ b/core/modules/file/file.module @@ -122,7 +122,7 @@ function file_load($fid, $reset = FALSE) { * Returns the file usage service. * * @return Drupal\file\FileUsage\FileUsageInterface. - * A file usage service. + * The file usage service. */ function file_usage() { return \Drupal::service('file.usage'); @@ -148,7 +148,7 @@ function file_usage() { * @param string $destination * A string containing the destination that $source should be copied to. * This must be a stream wrapper URI. - * @param constant $replace + * @param int $replace * Replace behavior when the destination file already exists: * - FILE_EXISTS_REPLACE - Replace the existing file. If a managed file with * the destination name exists then its database entry will be updated. If @@ -224,7 +224,7 @@ function file_copy(File $source, $destination = NULL, $replace = FILE_EXISTS_REN * @param string $destination * A string containing the destination that $source should be moved to. * This must be a stream wrapper URI. - * @param constant $replace + * @param int $replace * Replace behavior when the destination file already exists: * - FILE_EXISTS_REPLACE - Replace the existing file. If a managed file with * the destination name exists then its database entry will be updated and @@ -502,7 +502,7 @@ function file_validate_image_resolution(File $file, $maximum_dimensions = 0, $mi * A string containing the destination URI. This must be a stream wrapper URI. * If no value is provided, a randomized name will be generated and the file * will be saved using Drupal's default files scheme, usually "public://". - * @param constant $replace + * @param int $replace * Replace behavior when the destination file already exists: * - FILE_EXISTS_REPLACE - Replace the existing file. If a managed file with * the destination name exists then its database entry will be updated. If @@ -766,7 +766,7 @@ function file_cron() { * files scheme will be used ("temporary://"). * @param int $delta * Delta of the file to save or NULL to save all files. Defaults to NULL. - * @param constant $replace + * @param int $replace * Replace behavior when the destination file already exists: * - FILE_EXISTS_REPLACE: Replace the existing file. * - FILE_EXISTS_RENAME: Append _{incrementing number} until the filename is @@ -1477,7 +1477,7 @@ function file_managed_file_submit($form, &$form_state) { /** * Saves any files that have been uploaded into a managed_file element. * - * @param managed_file $element + * @param array $element * The FAPI element whose values are being saved. * * @return array @@ -1499,7 +1499,7 @@ function file_managed_file_save_upload($element) { // Save attached files to the database. $files_uploaded = $element['#multiple'] && count(array_filter($_FILES['files']['name'][$upload_name])) > 0; - $files_uploaded |=!$element['#multiple'] && !empty($_FILES['files']['name'][$upload_name]); + $files_uploaded |= !$element['#multiple'] && !empty($_FILES['files']['name'][$upload_name]); if ($files_uploaded) { if (!$files = file_save_upload($upload_name, $element['#upload_validators'], $destination)) { watchdog('file', 'The file upload failed. %upload', array('%upload' => $upload_name)); @@ -1509,7 +1509,7 @@ function file_managed_file_save_upload($element) { // Value callback expects FIDs to be keys. $files = array_filter($files); - $fids = array_map(function($file) { + $fids = array_map(function ($file) { return $file->id(); }, $files); @@ -1859,7 +1859,7 @@ function file_icon_map(File $file) { * @param array $field * (optional) A field array to be used for this check. If given, limits the * reference check to the given field. - * @param constant $age + * @param int $age * (optional) A constant that specifies which references to count. Use * EntityStorageControllerInterface::FIELD_LOAD_REVISION to retrieve all * references within all revisions or