for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace MatthiasMullie\CI\Providers;
use MatthiasMullie\CI\Environment;
/**
* @see http://www.appveyor.com/docs/environment-variables
*
* @author Matthias Mullie <[email protected]>
* @copyright Copyright (c) 2016, Matthias Mullie. All rights reserved.
* @license LICENSE MIT
*/
class Appveyor extends None implements Environment
{
* {@inheritdoc}
public static function isCurrent()
return getenv('APPVEYOR') === 'True';
}
public function getProvider()
return 'appveyor';
public function getSlug()
return getenv('APPVEYOR_REPO_NAME');
public function getBranch()
return $this->getPullRequest() === '' ? getenv('APPVEYOR_REPO_BRANCH') : '';
public function getPullRequest()
return getenv('APPVEYOR_PULL_REQUEST_NUMBER') ?: '';
public function getCommit()
return getenv('APPVEYOR_REPO_COMMIT');
public function getAuthor()
return getenv('APPVEYOR_REPO_COMMIT_AUTHOR');
public function getAuthorEmail()
return getenv('APPVEYOR_REPO_COMMIT_AUTHOR_EMAIL');
public function getBuild()
return getenv('APPVEYOR_BUILD_NUMBER');