├── .gitignore ├── composer.json ├── composer.lock ├── docs └── Guidelines.md ├── grumphp.yml ├── phpcs.xml ├── phpunit.php ├── phpunit.xml ├── readme.md ├── src ├── Application │ └── Http │ │ └── Handler │ │ ├── CreateInvoiceHandler.php │ │ ├── DeleteInvoiceHandler.php │ │ ├── UpdateInvoiceHandler.php │ │ └── ViewInvoiceHandler.php ├── Common │ ├── AggregateInterface.php │ ├── Country.php │ ├── Currency.php │ ├── EntityInterface.php │ ├── Salutation.php │ └── Title.php ├── Domain │ ├── Address.php │ ├── Command │ │ ├── CreateInvoiceCommand.php │ │ ├── CreateInvoiceHandler.php │ │ ├── DeleteInvoiceCommand.php │ │ └── UpdateInvoiceCommand.php │ ├── DueDate.php │ ├── Event │ │ ├── InvoiceCreatedEvent.php │ │ └── InvoicePaidEvent.php │ ├── Exception │ │ ├── CurrencyMissMatchException.php │ │ ├── EmptyInvoiceException.php │ │ └── InvoiceException.php │ ├── Invoice.php │ ├── InvoiceFactory.php │ ├── InvoiceId.php │ ├── InvoiceLine.php │ ├── InvoiceLinesCollection.php │ ├── InvoiceStatus.php │ ├── PaymentStatus.php │ ├── Price.php │ ├── Repository │ │ ├── InvoiceReadRepositoryInterface.php │ │ ├── InvoiceWriteRepositoryInterface.php │ │ └── SequentialInvoiceNumberRepositoryInterface.php │ └── Service │ │ ├── InvoiceCalculator.php │ │ ├── InvoiceCalculatorResult.php │ │ ├── InvoiceNumberGenerator.php │ │ └── Tax │ │ ├── SwissVatRule.php │ │ ├── VATCalculator.php │ │ ├── VATResult.php │ │ └── VATResultInterface.php ├── Infrastructure │ ├── Repository │ │ └── Database │ │ │ ├── InvoiceRepository.php │ │ │ └── SequentialInvoiceNumberRepository.php │ └── Validation │ │ ├── NewInvoiceValidator.php │ │ └── UpdatedInvoiceValidator.php └── Migrations │ └── InitialMigration.php └── tests └── TestCase ├── Common ├── SalutationTest.php └── TitleTest.php └── Domain ├── AddressTest.php ├── DueDateTest.php ├── InvoiceLineTest.php ├── InvoiceLinesCollectionTest.php ├── InvoiceTest.php └── Service └── Tax ├── SwissVatRuleTest.php └── VATResultTest.php /.gitignore: -------------------------------------------------------------------------------- 1 | /vendor 2 | /.idea 3 | /coverage.xml 4 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/burzum/ddd-invoice-domain-example/HEAD/composer.json -------------------------------------------------------------------------------- /composer.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/burzum/ddd-invoice-domain-example/HEAD/composer.lock -------------------------------------------------------------------------------- /docs/Guidelines.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/burzum/ddd-invoice-domain-example/HEAD/docs/Guidelines.md -------------------------------------------------------------------------------- /grumphp.yml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/burzum/ddd-invoice-domain-example/HEAD/grumphp.yml -------------------------------------------------------------------------------- /phpcs.xml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/burzum/ddd-invoice-domain-example/HEAD/phpcs.xml -------------------------------------------------------------------------------- /phpunit.php: -------------------------------------------------------------------------------- 1 |