Unverified Commit dd99ebf8 authored by Sergii Bondarenko's avatar Sergii Bondarenko Committed by Sergii Bondarenko
Browse files

Issue #3296907: PHPCS fixes

parent 4ff8dc56
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -36,7 +36,7 @@ function cshs_menu_link_form_node_form_alter(array &$form): void {
      // The first item is always a menu name so the below processing
      // is relevant only if there is at least one link additionally.
      if (\count($element['#options']) > 1) {
        /* @var \Drupal\Core\Menu\MenuLinkManagerInterface $link_manager */
        /** @var \Drupal\Core\Menu\MenuLinkManagerInterface $link_manager */
        $link_manager = \Drupal::service('plugin.manager.menu.link');

        foreach ($element['#options'] as $id => $label) {
+1 −1
Original line number Diff line number Diff line
@@ -57,7 +57,7 @@ class CshsOption {
          \implode(\PHP_EOL, [
            'The support of old-fashioned options for CSHS is deprecated in cshs:2.1 and is removed in cshs:3.0.',
            "Replace \"\$element['#options'] = [12 => ['name' => 'Audi Q8', 'parent_tid' => '4']];\"",
            "for \"\$element['#options'] = [12 => new CshsOption('Audi Q8', '4')];\"."
            "for \"\$element['#options'] = [12 => new CshsOption('Audi Q8', '4')];\".",
          ]),
          \E_USER_DEPRECATED,
        );
+1 −1
Original line number Diff line number Diff line
@@ -114,7 +114,7 @@ trait CshsOptionsFromHelper {
    ]);

    foreach (HIERARCHY_OPTIONS as $option_name => [$title]) {
      /** @noinspection NestedTernaryOperatorInspection */
      /* @noinspection NestedTernaryOperatorInspection */
      // phpcs:ignore Drupal.Semantics.FunctionT.NotLiteralString
      $summary[] = $this->t("$title: @$option_name", [
        "@$option_name" => empty($settings['force_deepest'])
+1 −1
Original line number Diff line number Diff line
@@ -106,7 +106,7 @@ class CshsElement extends Select {
    }

    // The value is not selected.
    /** @noinspection TypeUnsafeComparisonInspection */
    /* @noinspection TypeUnsafeComparisonInspection */
    if (empty($term_id) || $term_id == $element['#none_value']) {
      // Element must have its `none` value when nothing selected. This will
      // let it function correctly, for instance with views. Otherwise, it
+1 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@ namespace Drupal\cshs;
use Drupal\Core\Field\FieldDefinitionInterface;

/**
 * Class IsApplicable.
 * Provides the `isApplicable` implementation for formatters and widgets.
 */
trait IsApplicable {

Loading