for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Covery\Client;
/**
* Class Result
*
* Contains decision result data, received from Covery
* @package Covery\Client
*/
class Result
{
* @var int
private $requestId;
private $score;
* @var bool
private $accept;
private $reject;
private $manual;
* Result constructor.
* @param int $requestId
* @param int $score
* @param bool $accept
* @param bool $reject
* @param bool $manual
public function __construct($requestId, $score, $accept, $reject, $manual)
if (!is_int($requestId)) {
throw new \InvalidArgumentException('Request ID must be integer');
}
if (!is_int($score)) {
throw new \InvalidArgumentException('Score must be integer');
if (!is_bool($accept)) {
throw new \InvalidArgumentException('Accept flag must be boolean');
if (!is_bool($reject)) {
throw new \InvalidArgumentException('Reject flag must be boolean');
if (!is_bool($manual)) {
throw new \InvalidArgumentException('Manual flag must be boolean');
$this->requestId = $requestId;
$this->score = $score;
$this->accept = $accept;
$this->reject = $reject;
$this->manual = $manual;
* @return int
public function getRequestId()
return $this->requestId;
public function getScore()
return $this->score;
* @return boolean
public function isAccept()
return $this->accept;
public function isReject()
return $this->reject;
public function isManual()
return $this->manual;