Minor coding standard update

Created on 6 October 2023, about 1 year ago

Problem/Motivation

Minor coding standard--the colon is in the wrong place.

protected static function renderDocumentsPdfAsset(string $domain, string $external_id, string $format, string $filename, string $encoded_filename) :array {

should be
: array {

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇺🇸United States capysara

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

Merge Requests

Comments & Activities

  • Issue created by @capysara
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    199 pass
  • Issue was unassigned.
  • Status changed to Needs review about 1 year ago
  • 🇺🇸United States capysara

    Merge request added.

  • First commit to issue fork.
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    199 pass
  • 🇭🇺Hungary Balu Ertl Budapest 🇪🇺

    Result of $ phpcs web/modules/contrib/acquia_dam --standard=Drupal --extensions=php,module,inc,install,test,profile,theme,css,info,txt,md,yml --report=summary command:

    PHP CODE SNIFFER REPORT SUMMARY
    ---------------------------------------------------------------------------------------------------
    FILE                                                                               ERRORS  WARNINGS
    ---------------------------------------------------------------------------------------------------
    README.md                                                                             0       9
    modules/acquia_dam_integration_links/tests/src/Kernel/EnhancedIntegrationLinkTest.php 3       0
    tests/src/FunctionalJavascript/CKEditor5IntegrationTest.php                           1       0
    tests/src/FunctionalJavascript/FocalPointMediaLibraryTest.php                         1       0
    tests/src/FunctionalJavascript/MediaLibraryIntegrationTest.php                        1       0
    tests/src/Kernel/ExpiredTagTest.php                                                   2       0
    tests/src/Kernel/IntegrationLinkTest.php                                              1       0
    tests/src/Kernel/MediaEditFormTest.php                                                1       0
    tests/src/Kernel/MediaSourceAssetMapTest.php                                          1       0
    tests/src/Unit/AcquiaDamClientTest.php                                                1       0
    tests/src/Unit/RemoteDataSubscriberTest.php                                           1       0
    --------------------------------------------------------------------------------------------------
    A TOTAL OF 13 ERRORS AND 9 WARNINGS WERE FOUND IN 11 FILES
    --------------------------------------------------------------------------------------------------
    PHPCBF CAN FIX 6 OF THESE SNIFF VIOLATIONS AUTOMATICALLY
    --------------------------------------------------------------------------------------------------
    Time: 5.98 secs; Memory: 16MB
    
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update about 1 year ago
    199 pass
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 7.4 & MySQL 5.7
    last update 12 months ago
    199 pass
  • Open on Drupal.org →
    Core: 10.2.x + Environment: PHP 8.1 & MySQL 5.7
    last update 9 months ago
    Not currently mergeable.
  • Status changed to Needs work 8 months ago
  • 🇺🇸United States japerry KVUO

    Likely won't commit this as it moves too many patches around for other issues, and will be resolved when we do linting for the release.

  • 🇭🇺Hungary Balu Ertl Budapest 🇪🇺

    Some nitpicks to also fix in this ticket:

    1. Search & replace all occurrences of the /\bdam\b/img regular expression to the proper casing of the acronym “DAM”
    2. Delete the zero-byte src/Entity/MediaEmbedsField file
  • Assigned to Balu Ertl
  • 🇭🇺Hungary Balu Ertl Budapest 🇪🇺
  • Status changed to Postponed 7 months ago
  • 🇭🇺Hungary Balu Ertl Budapest 🇪🇺
  • 🇭🇺Hungary Balu Ertl Budapest 🇪🇺
  • 🇭🇺Hungary Balu Ertl Budapest 🇪🇺
  • 🇭🇺Hungary Balu Ertl Budapest 🇪🇺
  • 🇭🇺Hungary Balu Ertl Budapest 🇪🇺
  • 🇭🇺Hungary Balu Ertl Budapest 🇪🇺
  • 🇭🇺Hungary Balu Ertl Budapest 🇪🇺
  • 🇭🇺Hungary Balu Ertl Budapest 🇪🇺
  • 🇭🇺Hungary Balu Ertl Budapest 🇪🇺

    Merge suggestions from 📌 Use sentence case on Acquia DAM configuration form. Needs review .

  • 🇭🇺Hungary attilatilman

    Added 14th point which helps make the configs form more clean.

  • 🇭🇺Hungary Balu Ertl Budapest 🇪🇺
  • 🇮🇳India tanmayk Maharashtra

    Can we include 📌 Load the config only when needed in the method Active as well?

  • 🇺🇸United States japerry KVUO

    japerry changed the visibility of the branch 3392227-minor-coding-fixes to hidden.

  • 🇺🇸United States japerry KVUO

    japerry changed the visibility of the branch 3392227-minor-coding-fixes to active.

  • 🇭🇺Hungary Balu Ertl Budapest 🇪🇺
  • 🇭🇺Hungary Balu Ertl Budapest 🇪🇺
    diff --git a/src/Plugin/media/Source/Asset.php b/src/Plugin/media/Source/Asset.php
    index 3be7069228d44399159052867b7d4d505a8aaaa9..0de72ec998993d0418edc82f20d53dc66525d020 100644
    --- a/src/Plugin/media/Source/Asset.php
    +++ b/src/Plugin/media/Source/Asset.php
    @@ -347,12 +347,12 @@ final class Asset extends MediaSourceBase {
         $form['source_field']['#default_value'] = MediaSourceField::SOURCE_FIELD_NAME;
         $form['source_field']['#disabled'] = TRUE;
         $route_name = 'entity.entity_view_display.media.default';
    -    $description = $this->t('Enables DAM assets to be automatically downloaded and maintained locally in the file system of this site. (Affects media items of this type created from now on; has no effect retroactively.) Once local copies of remote assets have been stored in Drupal, then they can be used in several ways. One possible option is to display them on any view mode of this media type. To assist with this task the module automatically swaps the previous <em>Asset Reference</em> field formatter (working with embed codes) with the newly added <em>Managed File</em> field on those view modes where it is present.');
    +    $description = $this->t('Enables DAM assets to be automatically downloaded and maintained locally in the file system of this site. (Affects media items of this type created from now on; has no effect retroactively.) Once local copies of remote assets have been stored in Drupal, then they can be used in several ways. One possible option is to display them on any view mode of this media type. To assist with this task the module automatically swaps the previous <em>Asset Reference</em> field (working with embed codes) with the newly added <em>Managed File</em> field (which relies on locally stored files) on those view modes where that is present.');
     
         if (count($this->routeProvider->getRoutesByNames([$route_name])) === 1 &&
           $form_state->getFormObject()->getOperation() === 'edit' &&
           $media_type_name = $this->routeMatch->getParameter('media_type')->id()) {
    -      $description = $this->t('Enables DAM assets to be automatically downloaded and maintained locally in the file system of this site. (Affects media items of this type created from now on; has no effect retroactively.) Once local copies of remote assets have been stored in Drupal, then they can be used in several ways. One possible option is to display them on any <a href="@url">view mode of this media type</a>. To assist with this task the module automatically swaps the previous <em>Asset Reference</em> field formatter (working with embed codes) with the newly added <em>Managed File</em> field on those view modes where it is present.', [
    +      $description = $this->t('Enables DAM assets to be automatically downloaded and maintained locally in the file system of this site. (Affects media items of this type created from now on; has no effect retroactively.) Once local copies of remote assets have been stored in Drupal, then they can be used in several ways. One possible option is to display them on any <a href="@url">view mode of this media type</a>. To assist with this task the module automatically swaps the previous <em>Asset Reference</em> field (working with embed codes) with the newly added <em>Managed File</em> field (which relies on locally stored files) on those view modes where that is present.', [
             '@url' => Url::fromRoute($route_name, [
               'media_type' => $media_type_name,
             ])->toString(),
    @@ -366,6 +366,18 @@ final class Asset extends MediaSourceBase {
           '#default_value' => $this->configuration['download_assets'],
         ];
    
  • 🇭🇺Hungary Balu Ertl Budapest 🇪🇺
  • 🇭🇺Hungary Balu Ertl Budapest 🇪🇺
  • 🇭🇺Hungary Balu Ertl Budapest 🇪🇺
  • 🇭🇺Hungary Balu Ertl Budapest 🇪🇺
  • 🇭🇺Hungary Balu Ertl Budapest 🇪🇺
Production build 0.71.5 2024