Unverified Commit 00e831d1 authored by Alex Pott's avatar Alex Pott
Browse files

Issue #3088730 by Spokje, anmolgoyal74, ankithashetty, Mile23, longwave,...

Issue #3088730 by Spokje, anmolgoyal74, ankithashetty, Mile23, longwave, naresh_bavaskar, greg.1.anderson, Mixologic, klausi: Include 'composer' directory in phpcs scans

(cherry picked from commit 01bd426e)
parent e2a2b9e0
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -29,7 +29,7 @@ public function __construct() {
  }

  /**
   * Generate Drupal's metapackages whenever composer.lock is updated
   * Generate Drupal's metapackages whenever composer.lock is updated.
   *
   * @param \Composer\IO\IOInterface $io
   *   Composer IO object for interacting with the user.
+2 −0
Original line number Diff line number Diff line
@@ -73,11 +73,13 @@ public function getText() {
              $this->messageText[] = '  * Name: ' . $homepage;
            }
            break;

          case 'description':
            if ($homepage = $this->rootPackage->getDescription()) {
              $this->messageText[] = '  * Description: ' . $homepage;
            }
            break;

          case 'homepage':
            if ($homepage = $this->rootPackage->getHomepage()) {
              $this->messageText[] = '  * Homepage: ' . $homepage;
+8 −1
Original line number Diff line number Diff line
@@ -6,7 +6,7 @@
use Composer\Util\ProcessExecutor;

/**
 * Provide some Git utility operations
 * Provide some Git utility operations.
 *
 * @internal
 */
@@ -21,6 +21,8 @@ private function __construct() {
  /**
   * Determines whether the specified scaffold file is already ignored.
   *
   * @param \Composer\IO\IOInterface $io
   *   The Composer IO interface.
   * @param string $path
   *   Path to scaffold file to check.
   * @param string $dir
@@ -39,6 +41,8 @@ public static function checkIgnore(IOInterface $io, $path, $dir = NULL) {
  /**
   * Determines whether the specified scaffold file is tracked by git.
   *
   * @param \Composer\IO\IOInterface $io
   *   The Composer IO interface.
   * @param string $path
   *   Path to scaffold file to check.
   * @param string $dir
@@ -57,8 +61,11 @@ public static function checkTracked(IOInterface $io, $path, $dir = NULL) {
  /**
   * Checks to see if the project root dir is in a git repository.
   *
   * @param \Composer\IO\IOInterface $io
   *   The Composer IO interface.
   * @param string $dir
   *   Base directory for git process.
   *
   * @return bool
   *   True if this is a repository.
   */
+2 −0
Original line number Diff line number Diff line
@@ -28,6 +28,8 @@ class ManageGitIgnore {
  /**
   * ManageGitIgnore constructor.
   *
   * @param \Composer\IO\IOInterface $io
   *   The Composer IO interface.
   * @param string $dir
   *   The directory where the project is located.
   */
+2 −1
Original line number Diff line number Diff line
@@ -126,7 +126,6 @@ public function process(ScaffoldFilePath $destination, IOInterface $io, Scaffold
      $io->write($interpolator->interpolate("  - Prepend to <info>[dest-rel-path]</info> from <info>[prepend-rel-path]</info>"));
    }
    // Notify that we are appending, if there is append data.
    $append_contents = '';
    if (!empty($this->append)) {
      $this->append->addInterpolationData($interpolator, 'append');
      $io->write($interpolator->interpolate("  - Append to <info>[dest-rel-path]</info> from <info>[append-rel-path]</info>"));
@@ -187,10 +186,12 @@ public function scaffoldAtNewLocation(ScaffoldFilePath $destination) {

  /**
   * Check to see if the append/prepend data has already been applied.
   *
   * @param string $contents
   *   The contents of the target file.
   * @param \Drupal\Composer\Plugin\Scaffold\ScaffoldFilePath $data_path
   *   The path to the data to append or prepend
   *
   * @return bool
   *   'TRUE' if the append/prepend data already exists in contents.
   */
Loading