Loading animated_gif.module +5 −5 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ use Drupal\Core\Form\FormStateInterface; /** * Implements template_preprocess_image_formatter(). */ function animated_gif_preprocess_image_formatter(&$variables) { function animated_gif_preprocess_image_formatter(array &$variables) : void { $image = $variables['item']; $imageValues = $image->getValue(); $file = File::load($imageValues['target_id']); Loading @@ -29,7 +29,7 @@ function animated_gif_preprocess_image_formatter(&$variables) { /** * Implements template_preprocess_responsive_image_formatter(). */ function animated_gif_preprocess_responsive_image_formatter(&$variables) { function animated_gif_preprocess_responsive_image_formatter(array &$variables) : void { $image = $variables['item']; $imageValues = $image->getValue(); $file = File::load($imageValues['target_id']); Loading @@ -44,7 +44,7 @@ function animated_gif_preprocess_responsive_image_formatter(&$variables) { /** * Implements template_preprocess_image_style(). */ function animated_gif_preprocess_image_style(&$variables) { function animated_gif_preprocess_image_style(array &$variables) : void { // File entity ID is not available here so we need to load it by URI. $files = \Drupal::entityTypeManager() ->getStorage('file') Loading @@ -68,7 +68,7 @@ function animated_gif_preprocess_image_style(&$variables) { /** * Implements template_preprocess_responsive_image(). */ function animated_gif_preprocess_responsive_image(&$variables) { function animated_gif_preprocess_responsive_image(array &$variables) : void { // File entity ID is not available here so we need to load it by URI. $files = \Drupal::entityTypeManager() ->getStorage('file') Loading @@ -90,7 +90,7 @@ function animated_gif_preprocess_responsive_image(&$variables) { /** * Implements hook_field_widget_WIDGET_TYPE_form_alter(). */ function animated_gif_field_widget_image_image_form_alter(&$element, FormStateInterface $form_state, $context) { function animated_gif_field_widget_image_image_form_alter(array &$element, FormStateInterface $form_state, array $context) : void { if (!empty($element['#default_value']['fids'])) { $fid = reset($element['#default_value']['fids']); $file = File::load($fid); Loading Loading
animated_gif.module +5 −5 Original line number Diff line number Diff line Loading @@ -14,7 +14,7 @@ use Drupal\Core\Form\FormStateInterface; /** * Implements template_preprocess_image_formatter(). */ function animated_gif_preprocess_image_formatter(&$variables) { function animated_gif_preprocess_image_formatter(array &$variables) : void { $image = $variables['item']; $imageValues = $image->getValue(); $file = File::load($imageValues['target_id']); Loading @@ -29,7 +29,7 @@ function animated_gif_preprocess_image_formatter(&$variables) { /** * Implements template_preprocess_responsive_image_formatter(). */ function animated_gif_preprocess_responsive_image_formatter(&$variables) { function animated_gif_preprocess_responsive_image_formatter(array &$variables) : void { $image = $variables['item']; $imageValues = $image->getValue(); $file = File::load($imageValues['target_id']); Loading @@ -44,7 +44,7 @@ function animated_gif_preprocess_responsive_image_formatter(&$variables) { /** * Implements template_preprocess_image_style(). */ function animated_gif_preprocess_image_style(&$variables) { function animated_gif_preprocess_image_style(array &$variables) : void { // File entity ID is not available here so we need to load it by URI. $files = \Drupal::entityTypeManager() ->getStorage('file') Loading @@ -68,7 +68,7 @@ function animated_gif_preprocess_image_style(&$variables) { /** * Implements template_preprocess_responsive_image(). */ function animated_gif_preprocess_responsive_image(&$variables) { function animated_gif_preprocess_responsive_image(array &$variables) : void { // File entity ID is not available here so we need to load it by URI. $files = \Drupal::entityTypeManager() ->getStorage('file') Loading @@ -90,7 +90,7 @@ function animated_gif_preprocess_responsive_image(&$variables) { /** * Implements hook_field_widget_WIDGET_TYPE_form_alter(). */ function animated_gif_field_widget_image_image_form_alter(&$element, FormStateInterface $form_state, $context) { function animated_gif_field_widget_image_image_form_alter(array &$element, FormStateInterface $form_state, array $context) : void { if (!empty($element['#default_value']['fids'])) { $fid = reset($element['#default_value']['fids']); $file = File::load($fid); Loading