for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
declare(strict_types=1);
namespace Whallysson\Money\Currency;
/**
* Class AbstractCurrency
*
* @author Whallysson Avelino <[email protected]>
* @package Whallysson\Money\Currency
*/
class AbstractCurrency implements CurrencyInterface
{
/** @var string */
protected string $code;
protected string $symbol;
protected string $decimalSeparator;
protected string $thousandsSeparator;
protected string $symbolPosition;
public function __construct(
string $code,
string $symbol,
string $decimalSeparator,
string $thousandsSeparator,
string $symbolPosition = 'before'
) {
$this->code = $code;
$this->symbol = $symbol;
$this->decimalSeparator = $decimalSeparator;
$this->thousandsSeparator = $thousandsSeparator;
$this->symbolPosition = $symbolPosition;
}
* @return string
public function getSymbol(): string
return $this->symbol;
public function getDecimalSeparator(): string
return $this->decimalSeparator;
public function getThousandsSeparator(): string
return $this->thousandsSeparator;
public function getSymbolPosition(): string
return $this->symbolPosition;
public function getCode(): string
return $this->code;