Coding standards and best practices

Created on 26 December 2022, about 2 years ago
Updated 9 February 2023, almost 2 years ago

The module have some coding standards and best practices issues.

🐛 Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

🇮🇳India Raghavendra A M

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇳India spriya2896

    I will work on this issue.

  • Issue was unassigned.
  • Status changed to Needs review almost 2 years ago
  • 🇮🇳India spriya2896

    I have fixed the issues mentioned in #12. Please review

  • Status changed to Needs work almost 2 years ago
  • 🇦🇺Australia VladimirAus Brisbane, Australia

    Please reroll MR.

  • 🇮🇳India harshitthakore Pune

    Noticed existing code got change with new methods and approach in base branch. So as of now sync with base branch and we can move forward.

  • Status changed to Needs review over 1 year ago
  • Status changed to Needs work 7 months ago
  • 🇮🇳India riddhi.addweb

    Please review the Patch it is failing, When I applied the Patch it failed in the 9.5x version.

    Checking patch addtoany.libraries.yml...
    Checking patch addtoany.module...
    error: while searching for:
     * Handle AddToAny integration.
     */
    
    use Drupal\Core\Entity\EntityInterface;
    use Drupal\Core\Entity\Display\EntityViewDisplayInterface;
    use Drupal\Core\Routing\RouteMatchInterface;
    use Drupal\Core\Render\Markup;
    use Drupal\Core\Url;
    use Drupal\Component\Utility\UrlHelper;
    use Drupal\node\Entity\Node;
    use Drupal\addtoany\Form\AddToAnySettingsForm;
    
    /**
     * Implements hook_help().
    
    error: patch failed: addtoany.module:5
    error: addtoany.module: patch does not apply
    Checking patch js/addtoany.admin.js...
    error: while searching for:
    (function ($) {
      'use strict';
      Drupal.behaviors.addtoany = {
        attach: function (context, settings) {
    
          // Initial page setup
    
          var addtoany_icon = $('input[name="addtoany_universal_button"]').next('label').find('img:first');
          var initial_icon_size_int = parseInt($('input[name="addtoany_buttons_size"]').val());
    
          // Set the A2A icon's size to match selected Icon Size
          addtoany_icon.height(initial_icon_size_int).width(initial_icon_size_int);
    
          // Bring attention to large A2A icon option
          // because the universal button will likely be changed to match the other icons
          // (Drupal #states can't handle this)
          $('input[name="addtoany_buttons_size"]').change(function () {
    
            var icon_size = $(this).val();
            var icon_size_int = parseInt(icon_size);
    
            // Set the A2A icon's size to match selected Icon Size
            addtoany_icon.height(icon_size_int).width(icon_size_int);
    
          });
    
        }
      };
    
    }(jQuery));
    
    error: patch failed: js/addtoany.admin.js:1
    error: js/addtoany.admin.js: patch does not apply
    Checking patch js/addtoany.js...
    Checking patch src/Form/AddToAnySettingsForm.php...
    error: while searching for:
       * @param \Drupal\Core\Extension\ExtensionList $module_extension_list
       *   The module extension list service.
       * @param \Drupal\Core\Entity\EntityTypeBundleInfoInterface $entity_type_bundle_info
       *  The entity type bundle info service.
       */
      public function __construct(ConfigFactoryInterface $config_factory, ModuleHandlerInterface $module_handler, ExtensionList $module_extension_list, EntityTypeBundleInfoInterface $entity_type_bundle_info) {
        parent::__construct($config_factory);
    
    error: patch failed: src/Form/AddToAnySettingsForm.php:48
    error: src/Form/AddToAnySettingsForm.php: patch does not apply
    Checking patch src/Plugin/Block/AddToAnyBlock.php...
    error: while searching for:
    
    use Drupal\Core\Block\BlockBase;
    use Drupal\Core\Form\FormStateInterface;
    use Drupal\node\NodeInterface;
    
    /**
     * Provides an 'AddToAny share' block.
    
    error: patch failed: src/Plugin/Block/AddToAnyBlock.php:4
    error: src/Plugin/Block/AddToAnyBlock.php: patch does not apply
    Checking patch src/Plugin/Block/AddToAnyFollowBlock.php...
    error: src/Plugin/Block/AddToAnyFollowBlock.php: No such file or directory
    Checking patch src/Plugin/views/field/NodeAddToAnyShare.php...
    
  • First commit to issue fork.
  • Pipeline finished with Success
    3 months ago
    Total: 313s
    #315034
  • 🇺🇸United States DamienMcKenna NH, USA

    I can confirm that MR 3329621-fix-coding-standards-2.x solves some coding errors I was setting in 2.0.11, thank you.

  • 🇺🇸United States DamienMcKenna NH, USA
  • Pipeline finished with Success
    2 months ago
    Total: 254s
    #354248
Production build 0.71.5 2024