for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace Mukhin\PrivatbankBundle\Model;
class Statements
{
/** @var string */
protected $status;
/** @var float */
protected $credit;
protected $debet;
/** @var Statement[] */
protected $statements = [];
public static function fromResponse(\SimpleXMLElement $statements)
return (new self)
->setStatus((string)$statements['status'])
->setCredit(floatval((string)$statements['credit']))
->setDebet(floatval((string)$statements['debet']))
->setStatements(Statement::arrayFromResponse($statements))
;
}
/**
* @param string $status
*
* @return $this
*/
public function setStatus($status)
$this->status = $status;
return $this;
* @return string
public function getStatus()
return $this->status;
* @param float $debet
public function setDebet($debet)
$this->debet = $debet;
* @return float
public function getDebet()
return $this->debet;
* @param float $credit
public function setCredit($credit)
$this->credit = $credit;
public function getCredit()
return $this->credit;
* @param Statement[] $statements
public function setStatements($statements)
$this->statements = $statements;
* @return Statement[]
public function getStatements()
return $this->statements;