Verified Commit 727dc95d authored by Dave Long's avatar Dave Long
Browse files

Issue #3549878 by quietone, dcam: Enable Drupal.Files.LineLength for non-tests

parent 05d72b35
Loading
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -3,7 +3,7 @@
namespace Drupal\Composer\Generator\Util;

/**
 * Utilities for accessing composer.json data from drupal/drupal and drupal/core.
 * Utilities for working with drupal composer.json files and data.
 *
 * Some data is stored in the root composer.json file, while others is found
 * in the core/composer.json file.
+2 −2
Original line number Diff line number Diff line
@@ -26,8 +26,8 @@ class DrupalInstalledTemplate {
  public static function getCode(PackageInterface $root_package, InstalledRepositoryInterface $repository): string {
    // Write out a hash of the version information to a file so we can use it.
    $versions = array_reduce($repository->getPackages(), fn (string $carry, PackageInterface $package) => $carry . $package->getUniqueName() . '-' . $package->getSourceReference() . '|', '');
    // Add the root_package package version info so custom code changes and root_package
    // package version changes result in the hash changing.
    // Add the root_package package version info so custom code changes and
    // root_package package version changes result in the hash changing.
    $versions .= $root_package->getUniqueName() . '-' . $root_package->getSourceReference();
    $version_hash = hash('xxh3', $versions);
    return <<<EOF
+2 −1
Original line number Diff line number Diff line
@@ -159,7 +159,8 @@ public static function preAutoloadDump(Event $event): void {
    // Get the configured vendor directory.
    $vendor_dir = $event->getComposer()->getConfig()->get('vendor-dir');

    // We need the root_package package so we can add our classmaps to its loader.
    // We need the root_package package so we can add our classmaps to its
    // loader.
    $package = $event->getComposer()->getPackage();
    // We need the local repository so that we can query and see if it's likely
    // that our files are present there.
+2 −2
Original line number Diff line number Diff line
@@ -53,7 +53,7 @@ public function rootTransactionEndCallback($success) {
  }

  /**
   * Implements \Drupal\Core\Cache\CacheTagsInvalidatorInterface::invalidateTags()
   * {@inheritdoc}
   */
  public function invalidateTags(array $tags) {
    foreach ($tags as $key => $tag) {
@@ -84,7 +84,7 @@ public function invalidateTags(array $tags) {
  }

  /**
   * Implements \Drupal\Core\Cache\CacheTagsChecksumInterface::getCurrentChecksum()
   * {@inheritdoc}
   */
  public function getCurrentChecksum(array $tags) {
    // Any cache writes in this request containing cache tags whose invalidation
+4 −4
Original line number Diff line number Diff line
@@ -64,14 +64,14 @@ public static function revisionLogBaseFieldDefinitions(EntityTypeInterface $enti
  }

  /**
   * Implements \Drupal\Core\Entity\RevisionLogInterface::getRevisionCreationTime().
   * {@inheritdoc}
   */
  public function getRevisionCreationTime() {
    return $this->{$this->getEntityType()->getRevisionMetadataKey('revision_created')}->value;
  }

  /**
   * Implements \Drupal\Core\Entity\RevisionLogInterface::setRevisionCreationTime().
   * {@inheritdoc}
   */
  public function setRevisionCreationTime($timestamp) {
    $this->{$this->getEntityType()->getRevisionMetadataKey('revision_created')}->value = $timestamp;
@@ -109,14 +109,14 @@ public function setRevisionUserId($user_id) {
  }

  /**
   * Implements \Drupal\Core\Entity\RevisionLogInterface::getRevisionLogMessage().
   * {@inheritdoc}
   */
  public function getRevisionLogMessage() {
    return $this->{$this->getEntityType()->getRevisionMetadataKey('revision_log_message')}->value;
  }

  /**
   * Implements \Drupal\Core\Entity\RevisionLogInterface::setRevisionLogMessage().
   * {@inheritdoc}
   */
  public function setRevisionLogMessage($revision_log_message) {
    $this->{$this->getEntityType()->getRevisionMetadataKey('revision_log_message')}->value = $revision_log_message;
Loading