rector/vendor/ondram/ci-detector/src/Ci/AbstractCi.php
Tomas Votruba 03f122a600 Updated Rector to commit c390eabeb2b2f77f755bfadc1d51b000da0d5ade
c390eabeb2 Skip mixed in ParamTypeByMethodCallTypeRector as not specific (#5715)
2024-03-12 16:22:51 +00:00

25 lines
883 B
PHP

<?php
declare (strict_types=1);
namespace RectorPrefix202403\OndraM\CiDetector\Ci;
use RectorPrefix202403\OndraM\CiDetector\Env;
/**
* Unified adapter to retrieve environment variables from current continuous integration server
*/
abstract class AbstractCi implements CiInterface
{
/**
* @var \OndraM\CiDetector\Env
*/
protected $env;
public function __construct(Env $env)
{
$this->env = $env;
}
public function describe() : array
{
return ['ci-name' => $this->getCiName(), 'build-number' => $this->getBuildNumber(), 'build-url' => $this->getBuildUrl(), 'commit' => $this->getCommit(), 'branch' => $this->getBranch(), 'target-branch' => $this->getTargetBranch(), 'repository-name' => $this->getRepositoryName(), 'repository-url' => $this->getRepositoryUrl(), 'is-pull-request' => $this->isPullRequest()->describe()];
}
}