Exemplo n.º 1
0
 /**
  * Registers services on the given container.
  *
  * This method should only be used to configure services and parameters.
  * It should not get services.
  *
  * @param Container $pimple An Container instance
  */
 public function register(Container $pimple)
 {
     $pimple['version'] = function () use($pimple) {
         $instance = new Version($pimple['config']['application']['version'], BASEPATH);
         return $instance->getVersion();
     };
 }
 public function __construct()
 {
     $version = new Version('2.0.1', dirname(dirname(__DIR__)));
     parent::__construct('phpunit-skelgen', $version->getVersion());
     $this->add(new GenerateClassCommand());
     $this->add(new GenerateTestCommand());
 }
Exemplo n.º 3
0
 public function __construct()
 {
     $version = new Version('1.0.0', dirname(__DIR__));
     parent::__construct('phpcov-runner', $version->getVersion());
     $this->add(new StartCommand());
     $this->add(new StopCommand());
 }
Exemplo n.º 4
0
 /**
  * @return string
  */
 protected function getUserAgent()
 {
     static $defaultAgent = '';
     if ($defaultAgent === '') {
         $defaultAgent = 'pwnRaid/' . $this->version->getVersion() . ' ' . \GuzzleHttp\default_user_agent();
     }
     return $defaultAgent;
 }
Exemplo n.º 5
0
 public function __construct()
 {
     $version = new Version('2.0.1', dirname(__DIR__));
     parent::__construct('phpcov', $version->getVersion());
     $this->add(new ExecuteCommand());
     $this->add(new MergeCommand());
     $this->add(new PatchCoverageCommand());
 }
Exemplo n.º 6
0
 /**
  * Constructor.
  *
  * @param string $templatePath
  * @param string $generator
  * @param string $date
  * @param int    $lowUpperBound
  * @param int    $highLowerBound
  */
 public function __construct($templatePath, $generator, $date, $lowUpperBound, $highLowerBound)
 {
     $version = new Version('4.0.2', dirname(dirname(dirname(dirname(__DIR__)))));
     $this->templatePath = $templatePath;
     $this->generator = $generator;
     $this->date = $date;
     $this->lowUpperBound = $lowUpperBound;
     $this->highLowerBound = $highLowerBound;
     $this->version = $version->getVersion();
 }
Exemplo n.º 7
0
 public function __construct()
 {
     $pharVersion = '@package_version@';
     $gitVersion = new Version(self::VERSION, __DIR__ . '/../../');
     if ($pharVersion !== '@' . 'package_version' . '@') {
         parent::__construct(self::$logo . PHP_EOL . self::NAME, $pharVersion);
         return;
     }
     parent::__construct(self::$logo . PHP_EOL . self::NAME, $gitVersion->getVersion());
 }
Exemplo n.º 8
0
 /**
  * Return the current version of PHPUnit.
  *
  * @return string
  */
 public static function id()
 {
     if (self::$pharVersion !== null) {
         return self::$pharVersion;
     }
     if (self::$version === null) {
         $version = new SebastianBergmann\Version('3.0', dirname(dirname(__DIR__)));
         self::$version = $version->getVersion();
     }
     return self::$version;
 }
Exemplo n.º 9
0
 public function __construct()
 {
     $this->commandRepository = new CommandRepository();
     $version = new Version('4.2', dirname(dirname(dirname(__DIR__))));
     parent::__construct('Stagehand_TestRunner', $version->getVersion());
     $this->setAutoExit(false);
     // For compatibility with Symfony 2.0
     if (!method_exists('Symfony\\Component\\Console\\Application', 'getDefaultCommands')) {
         foreach ($this->getDefaultCommands() as $command) {
             $this->add($command);
         }
     }
 }
Exemplo n.º 10
0
 public function __construct()
 {
     $version = new Version('3.0', dirname(dirname(__DIR__)));
     parent::__construct('phpcpd', $version->getVersion());
 }
Exemplo n.º 11
0
 public function __construct()
 {
     $version = new Version('2.0.2', __DIR__);
     parent::__construct('phploc', $version->getVersion());
 }
Exemplo n.º 12
0
 public function __construct()
 {
     $version = new Version('1.0', __DIR__);
     parent::__construct('bugminer', $version->getVersion());
 }
Exemplo n.º 13
0
 /**
  * @param $version
  * @return string X.Y.Z
  */
 public static function appVersion($version = null)
 {
     if (!$version) {
         $version = '0.0.0';
     }
     $version = new Version($version, base_path());
     return $version->getVersion();
 }
Exemplo n.º 14
0
 public function __construct()
 {
     $version = new Version('1.4.3', __DIR__);
     $this->version = $version->getVersion();
 }
 public function __construct()
 {
     $version = new Version('2.0.1', dirname(dirname(__DIR__)));
     parent::__construct('phar-site-generator', $version->getVersion());
 }