/**
  *
  */
 public function execute()
 {
     if ($this->config->installGlobally()) {
         $targetDirectory = dirname($this->environment->getBinaryName());
     } else {
         $targetDirectory = $this->config->getWorkingDirectory();
     }
     foreach ($this->config->getRequestedPhars() as $requestedPhar) {
         $this->pharService->install($requestedPhar, $targetDirectory);
         if ($this->config->doNotAddToPhiveXml()) {
             continue;
         }
         $this->phiveXmlConfig->addPhar($requestedPhar);
     }
 }
 /**
  * @dataProvider boolProvider
  *
  * @param bool $switch
  */
 public function testDoNotAddToPhiveXml($switch)
 {
     $options = $this->getOptionsMock();
     $options->expects($this->once())->method('isSwitch')->willReturn($switch);
     $config = new InstallCommandConfig($options, $this->getConfigMock(), $this->getPhiveXmlConfigMock());
     $this->assertSame($switch, $config->doNotAddToPhiveXml());
 }