for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* PHP Billing Library
*
* @link https://github.com/hiqdev/php-billing
* @package php-billing
* @license BSD-3-Clause
* @copyright Copyright (c) 2017-2018, HiQDev (http://hiqdev.com/)
*/
namespace hiqdev\php\billing\charge;
* Default charge factory.
* @author Andrii Vasyliev <[email protected]>
class ChargeFactory implements ChargeFactoryInterface
{
* Creates charge object.
* @return Charge
public function create(ChargeCreationDto $dto)
return new Charge(
$dto->id,
$dto->type,
$dto->target,
$dto->action,
$dto->price,
$dto->usage,
$dto->sum,
$dto->bill
);
}