PhpGitHooks\Module\Git\Contract\CommandHandler\GitIgnoreWriterCommandHandler::handle PHP Метод

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

public handle ( Bruli\EventBusBundle\CommandBus\CommandInterface $command )
$command Bruli\EventBusBundle\CommandBus\CommandInterface
    public function handle(CommandInterface $command)
    {
        $this->gitIgnoreWriter->write($command->getContent());
    }

Usage Example

 /**
  * @test
  */
 public function itShouldWriteData()
 {
     $content = StubCreator::faker()->text();
     $this->shouldWriteData($content);
     $commandHandler = new GitIgnoreWriterCommandHandler(new GitIgnoreWriter($this->getWriter()));
     $commandHandler->handle(new GitIgnoreWriterCommand($content));
 }
GitIgnoreWriterCommandHandler