for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Nexy\PayboxDirect\Response;
/**
* @author Sullivan Senechal <[email protected]>
*/
abstract class AbstractResponse implements ResponseInterface
{
* @var int
private $code;
* @var string
private $comment;
private $site;
private $rank;
private $callNumber;
private $questionNumber;
private $transactionNumber;
* @var string|null
private $sha1 = null;
* @param string[] $data
public function __construct(array $data)
$this->code = intval($data['CODEREPONSE']);
$this->comment = $data['COMMENTAIRE'];
$this->site = $data['SITE'];
$this->rank = $data['RANG'];
$this->callNumber = intval($data['NUMAPPEL']);
$this->questionNumber = intval($data['NUMQUESTION']);
$this->transactionNumber = intval($data['NUMTRANS']);
if (array_key_exists('SHA-1', $data)) {
$this->sha1 = $data['SHA-1'];
}
* @return int
final public function getCode()
return $this->code;
* @return string
final public function getComment()
return $this->comment;
final public function getSite()
return $this->site;
final public function getRank()
return $this->rank;
final public function getCallNumber()
return $this->callNumber;
final public function getQuestionNumber()
return $this->questionNumber;
final public function getTransactionNumber()
return $this->transactionNumber;
* @return string|null
final public function getSha1()
return $this->sha1;