JobsRepository
in package
implements
LoggerAwareInterface
Jobs API client.
Just wrap for logging.
Tags
Table of Contents
Interfaces
- LoggerAwareInterface
- Describes a logger-aware instance.
Properties
- $api : Jobs
- Jobs API.
- $config : Configuration
- Configuration.
- $logger : LoggerInterface
- Logger.
Methods
- __construct() : mixed
- Constructor.
- persist() : bool
- Persist coverage data to Coveralls.
- setLogger() : void
- Sets a logger instance on the object.
- collectCloverXml() : $this
- Collect clover XML into json_file.
- collectEnvVars() : $this
- Collect environment variables.
- collectGitInfo() : $this
- Collect git repository info into json_file.
- colorizeCoverage() : string
- Colorize coverage.
- dumpJsonFile() : $this
- Dump submitting json file.
- logCollectedSourceFiles() : mixed
- Log collected source files.
- logResponse() : mixed
- Log response.
- send() : bool
- Send json_file to Jobs API.
Properties
$api
Jobs API.
protected
Jobs
$api
$config
Configuration.
protected
Configuration
$config
$logger
Logger.
protected
LoggerInterface
$logger
Methods
__construct()
Constructor.
public
__construct(Jobs $api, Configuration $config) : mixed
Parameters
- $api : Jobs
-
aPI
- $config : Configuration
-
configuration
persist()
Persist coverage data to Coveralls.
public
persist() : bool
Return values
boolsetLogger()
Sets a logger instance on the object.
public
setLogger(LoggerInterface $logger) : void
Parameters
- $logger : LoggerInterface
Tags
collectCloverXml()
Collect clover XML into json_file.
protected
collectCloverXml() : $this
Return values
$thiscollectEnvVars()
Collect environment variables.
protected
collectEnvVars() : $this
Return values
$thiscollectGitInfo()
Collect git repository info into json_file.
protected
collectGitInfo() : $this
Return values
$thiscolorizeCoverage()
Colorize coverage.
protected
colorizeCoverage(float $coverage, string $format) : string
- green 90% - 100%
- yellow 80% - 90%
- red 0% - 80% <fg=red>
Parameters
- $coverage : float
-
coverage
- $format : string
-
format string to colorize
Return values
stringdumpJsonFile()
Dump submitting json file.
protected
dumpJsonFile() : $this
Return values
$thislogCollectedSourceFiles()
Log collected source files.
protected
logCollectedSourceFiles(JsonFile $jsonFile) : mixed
Parameters
- $jsonFile : JsonFile
-
json file
logResponse()
Log response.
protected
logResponse(Response $response) : mixed
Parameters
- $response : Response
-
aPI response
send()
Send json_file to Jobs API.
protected
send() : bool