changes made to make the code follow our project coding standers to maintain consistency

This commit is contained in:
omair saleh
2020-12-01 12:57:13 +08:00
parent 5d67c400e3
commit 0772c5d478
10 changed files with 221 additions and 69 deletions
@@ -6,63 +6,54 @@ use App\Classes\Interfaces\DataTransferObject;
class WalletObject implements DataTransferObject
{
/** @var string|null */
private $code;
/** @var string|null */
private $amount;
/** @var string|null */
/** @var int */
private $company_id;
/** @var int */
private $currency;
public function __construct(
?string $code,
?string $currency,
?string $amount,
?string $company_id
)
/** @var int */
private $code;
/**
* WalletObject constructor.
* @param int $company_id
* @param int $currency
* @param int $code
*/
public function __construct(int $company_id, int $currency, int $code)
{
$this->code = $code;
$this->currency = $currency;
$this->amount = $amount;
$this->company_id = $company_id;
$this->currency = $currency;
$this->code = $code;
}
/**
* @return string
* @return int
*/
public function getCode(): ?string
public function getCompanyId(): int
{
return $this->code;
return $this->company_id;
}
/**
* @return string
* @return int
*/
public function getCurrency(): ?string
public function getCurrency(): int
{
return $this->currency;
}
/**
* @return string
* @return int
*/
public function getAmount(): ?float
public function getCode(): int
{
return floatval($this->amount);
}
/**
* @return int|null
*/
public function getCompanyId(): ?int
{
return $this->company_id;
return $this->code;
}
}