Commit f23e7ecf authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

Issue #3261776 by tmaiochi, lucienchalom: Fix coding standards in the root folder

parent 8bd0c4c8
Loading
Loading
Loading
Loading
+5 −5
Original line number Diff line number Diff line
@@ -21,7 +21,7 @@ use Drupal\Core\Extension\Extension;
 * @param \Drupal\Core\Form\FormStateInterface $form_state
 *   The submitted state of the upgrade status form.
 */
function hook_upgrade_status_operations_alter(&$operations, FormStateInterface $form_state) {
function hook_upgrade_status_operations_alter(array &$operations, FormStateInterface $form_state) {
  // Duplicate each operation with another one that runs rector on the
  // same extension.
  if (!empty($form_state->getValue('run_rector'))) {
@@ -29,7 +29,7 @@ function hook_upgrade_status_operations_alter(&$operations, FormStateInterface $
    foreach ($keys as $key) {
      $operations[] = [
        'update_rector_run_rector_batch',
        [$operations[$key][1][0]]
        [$operations[$key][1][0]],
      ];
    }
  }
@@ -47,7 +47,7 @@ function hook_upgrade_status_operations_alter(&$operations, FormStateInterface $
 *   The key for the result group. One of 'rector', 'now', 'uncategorized',
 *   'later' or 'ignore'.
 */
function hook_upgrade_status_result_alter(&$build, Extension $extension, $group_key) {
function hook_upgrade_status_result_alter(array &$build, Extension $extension, $group_key) {
  if ($group_key == 'rector') {
    $build['description']['#markup'] = t('Here is your patch...');
  }
+1 −1
Original line number Diff line number Diff line
@@ -17,7 +17,7 @@ function upgrade_status_requirements($phase) {
        'upgrade_status' => [
          'description' => t('External dependencies for Upgrade Status are not available. Composer must be used to download the module with dependencies. See <a href="@url">the Upgrade Status project page</a> for instructions.', ['@url' => 'https://drupal.org/project/upgrade_status']),
          'severity' => REQUIREMENT_ERROR,
        ]
        ],
      ];
    }
  }
+7 −2
Original line number Diff line number Diff line
<?php

/**
 * @file
 * The base module for upgrade status.
 */

use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Extension\Extension;
use Drupal\upgrade_status\ProjectCollector;
@@ -48,7 +53,7 @@ function upgrade_status_theme($existing, $type, $theme, $path) {
 * @param array $variables
 *   Array of template variables.
 */
function template_preprocess_upgrade_status_html_export(&$variables) {
function template_preprocess_upgrade_status_html_export(array &$variables) {
  $projects = $variables['projects'];
  $types = ['custom', 'contrib'];
  foreach ($types as $type) {
@@ -66,7 +71,7 @@ function template_preprocess_upgrade_status_html_export(&$variables) {
 * @param array $variables
 *   Array of template variables.
 */
function template_preprocess_upgrade_status_ascii_export(&$variables) {
function template_preprocess_upgrade_status_ascii_export(array &$variables) {
  template_preprocess_upgrade_status_html_export($variables);
}