Commit a1c7d35f authored by Jonathan Smith's avatar Jonathan Smith Committed by Jonathan Smith
Browse files

Issue #3176822 by jonathan1055: Fix coding standards for Coder 8.3.15

parent f17395db
Loading
Loading
Loading
Loading
+3 −1
Original line number Diff line number Diff line
@@ -11,6 +11,8 @@ use Drupal\Core\Render\BubbleableMetadata;
 * Implements hook_token_info().
 */
function scheduler_token_info() {
  // Initialise the array to avoid 'variable is undefined' phpcs error.
  $info = [];
  $info['tokens']['node']['scheduler-publish'] = [
    'name' => t('Publish on date'),
    'description' => t("The date the node will be published."),
@@ -31,7 +33,7 @@ function scheduler_token_info() {
function scheduler_tokens($type, $tokens, array $data, array $options, BubbleableMetadata $bubbleable_metadata) {
  $token_service = \Drupal::token();
  $date_formatter = \Drupal::service('date.formatter');
  $language_code = isset($options['langcode']) ? $options['langcode'] : NULL;
  $language_code = $options['langcode'] ?? NULL;
  $replacements = [];

  if ($type == 'node' && !empty($data['node'])) {
+3 −0
Original line number Diff line number Diff line
@@ -14,6 +14,9 @@
 * @todo Convert to 8.x, this is stil 7.x code
 */
function scheduler_rules_integration_default_rules_configuration() {
  // Initialise the array to avoid 'variable is undefined' phpcs error.
  $configs = [];

  // Define two reaction rules which will be displayed on the 'Rules' tab. These
  // are initially inactive, but the user can enable them, and then modify the
  // values and/or add more conditions and actions.
+3 −0
Original line number Diff line number Diff line
@@ -30,6 +30,9 @@ class EventSubscriber implements EventSubscriberInterface {
   * {@inheritdoc}
   */
  public static function getSubscribedEvents() {
    // Initialise the array to avoid 'variable is undefined' phpcs error.
    $events = [];

    // The values in the arrays give the function names below.
    $events[SchedulerEvents::PRE_PUBLISH][] = ['apiTestPrePublish'];
    $events[SchedulerEvents::PUBLISH][] = ['apiTestPublish'];