You are here

Committer.php in Automatic Updates 8.2

File

package_manager/tests/modules/package_manager_bypass/src/Committer.php
View source
<?php

namespace Drupal\package_manager_bypass;

use PhpTuf\ComposerStager\Domain\CommitterInterface;
use PhpTuf\ComposerStager\Domain\Output\ProcessOutputCallbackInterface;

/**
 * Defines an update committer which doesn't do any actual committing.
 */
class Committer implements CommitterInterface {

  /**
   * The decorated committer service.
   *
   * @var \PhpTuf\ComposerStager\Domain\CommitterInterface
   */
  private $decorated;

  /**
   * Constructs a Committer object.
   *
   * @param \PhpTuf\ComposerStager\Domain\CommitterInterface $decorated
   *   The decorated committer service.
   */
  public function __construct(CommitterInterface $decorated) {
    $this->decorated = $decorated;
  }

  /**
   * {@inheritdoc}
   */
  public function commit(string $stagingDir, string $activeDir, ?array $exclusions = [], ?ProcessOutputCallbackInterface $callback = NULL, ?int $timeout = 120) : void {
  }

  /**
   * {@inheritdoc}
   */
  public function directoryExists(string $stagingDir) : bool {
    return $this->decorated
      ->directoryExists($stagingDir);
  }

}

Classes

Namesort descending Description
Committer Defines an update committer which doesn't do any actual committing.