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\bill;
* Default bill factory.
* @author Andrii Vasyliev <[email protected]>
class BillFactory implements BillFactoryInterface
{
* Creates bill object.
* @return Bill
public function create(BillCreationDto $dto)
return new Bill(
$dto->id,
$dto->type,
$dto->time,
$dto->sum,
$dto->quantity,
$dto->customer,
$dto->target,
$dto->plan,
$dto->charges ?: [],
$dto->state
);
}