Skip to content
Snippets Groups Projects
Select Git revision
  • 3aeccb7e6c26b71fd40e86ccddda10ae434ed984
  • master default protected
  • php84
  • detached7
  • detached6
  • detached5
  • detached
  • detached2
  • detached3
  • detached4
  • 4.x
  • origin/1.0.3
  • origin/1.0.2
  • 6.1.0
  • 6.0.6
  • 6.0.5
  • 6.0.4
  • 6.0.3
  • 6.0.2
  • 6.0.1
  • 6.0.0
  • 4.0.3
  • 4.0.2
  • 4.0.1
  • 4.0
  • 3.1.7
  • 3.1.6
  • 3.1.5
  • 3.1.4
  • 3.1.3
  • 3.1.2
  • 3.1.1
  • 3.1.0
33 results

Module.php

Blame
  • Code owners
    Assign users and groups as approvers for specific file changes. Learn more.
    ShellCommandResult.php 822 B
    <?php
    
    namespace UnicaenShell\Command;
    
    class ShellCommandResult implements ShellCommandResultInterface
    {
        /**
         * @var string[]
         */
        protected $output;
    
        /**
         * @var int
         */
        protected $returnCode;
    
        /**
         * @param array $output
         * @param int $returnCode
         */
        public function __construct(array $output, int $returnCode)
        {
            $this->output = $output;
            $this->returnCode = $returnCode;
        }
    
        /**
         * @inheritDoc
         */
        public function getOutput(): array
        {
            return $this->output;
        }
    
        /**
         * @inheritDoc
         */
        public function getReturnCode(): int
        {
            return $this->returnCode;
        }
    
        /**
         * @inheritDoc
         */
        public function isSuccessfull(): bool
        {
            return $this->returnCode === 0;
        }
    }