getExitCode() public méthode

public getExitCode ( ) : integer | null
Résultat integer | null the exit code or null if command was not executed yet
 /**
  * Execute docker-compose commande
  * @codeCoverageIgnore
  * @param Command $command The command to execute.
  */
 protected function execute($command)
 {
     if ($command->execute()) {
         $output = $command->getOutput();
     } else {
         $output = $command->getError();
     }
     return array('output' => $output, 'code' => $command->getExitCode());
 }
 public function testCanNotRunInvalidCommandWithExec()
 {
     $command = new Command('ls --this-does-not-exist');
     $command->useExec = true;
     $this->assertFalse($command->getExecuted());
     $this->assertFalse($command->execute());
     $this->assertFalse($command->getExecuted());
     $this->assertNotEmpty($command->getError());
     $this->assertNotEmpty($command->getStdErr());
     $this->assertNotEmpty($command->getOutput());
     $this->assertEquals(2, $command->getExitCode());
 }