PhpGitHooks\Module\Configuration\Service\PhpGuardCoverageGitIgnoreConfigurator::configure PHP Метод

configure() публичный Метод

public configure ( )
    public function configure()
    {
        /** @var GitIgnoreDataResponse $gitIgnoreContent */
        $gitIgnoreContent = $this->queryBus->handle(new GitIgnoreExtractorQuery());
        if (false === $this->isFileIgnored($gitIgnoreContent->getContent())) {
            $content = $this->getContent($gitIgnoreContent->getContent());
            $this->commandBus->handle(new GitIgnoreWriterCommand($content));
        }
    }

Usage Example

 /**
  * @param IOInterface $input
  * @param PhpUnitGuardCoverage $phpUnitGuardCoverage
  *
  * @return PhpUnitGuardCoverage
  */
 public function configure(IOInterface $input, PhpUnitGuardCoverage $phpUnitGuardCoverage)
 {
     if (true === $phpUnitGuardCoverage->isUndefined()) {
         $guardCoverageAnswer = $input->ask(HookQuestions::PHPUNIT_GUARD_COVERAGE, HookQuestions::DEFAULT_TOOL_ANSWER);
         $phpUnitGuardCoverage = $phpUnitGuardCoverage->setEnabled(new Enabled(HookQuestions::DEFAULT_TOOL_ANSWER === strtoupper($guardCoverageAnswer)));
         if (true === $phpUnitGuardCoverage->isEnabled()) {
             $defaultMessage = $input->ask(HookQuestions::PHPUNIT_GUARD_COVERAGE_MESSAGE, HookQuestions::PHPUNIT_GUARD_COVERAGE_MESSAGE_DEFAULT);
             /** @var PhpUnitGuardCoverage $phpUnitGuardCoverage */
             $phpUnitGuardCoverage = $phpUnitGuardCoverage->setWarningMessage(new Message($defaultMessage));
             $this->coverageGitIgnoreConfigurator->configure();
         }
     }
     return $phpUnitGuardCoverage;
 }
All Usage Examples Of PhpGitHooks\Module\Configuration\Service\PhpGuardCoverageGitIgnoreConfigurator::configure
PhpGuardCoverageGitIgnoreConfigurator