A collection of value objects that can help you to write more readable, self-validated and immutable code.
composer require voku/value_objects
use voku\ValueObjects\ValueObjectVatPercentage;
require_once __DIR__ . '/vendor/autoload.php'; // example path
$vat = ValueObjectVatPercentage::create('16.0');
$vat->getGross(10.0)); // '11.6'
composer install
./vendor/bin/phpunit
↑
Parameters:
\TCreateValue|null $value
Return:
static
↑
Parameters: nothing
Return:
static
↑
Parameters:
string $password
string $data
Return:
static
↑
Parameters:
string $password
Return:
string
↑
Parameters: nothing
Return:
string
↑ Get the value that are used for the database.
Parameters: nothing
Return:
\TValue|null
↑
Parameters:
\TValueFallback $fallback
Return:
\TValue|\TValueFallback
↑
Parameters: nothing
Return:
\TValue