Skip to content

Commit f065a66

Browse files
authored
Feature/Added Data Transfer Object. (#11)
- Added base abstract class extended from Spatie/DataTransferObject to handle DTO's.
1 parent 7e06221 commit f065a66

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
"ext-json": "*",
1616
"ramsey/uuid": "^4.1",
1717
"nesbot/carbon": "^2.40",
18-
"illuminate/collections": "^8.20"
18+
"illuminate/collections": "^8.20",
19+
"spatie/data-transfer-object": "^2.6"
1920
},
2021
"require-dev": {
2122
"ext-xdebug": "*",

src/Application/DTO/DTO.php

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
<?php
2+
3+
declare(strict_types=1);
4+
5+
namespace OtherCode\ComplexHeart\Application\DTO;
6+
7+
use Spatie\DataTransferObject\DataTransferObject;
8+
9+
/**
10+
* Class DTO
11+
*
12+
* An abstract class that acts as an interface between the Spatie/DataTransferObject,
13+
* so, in case the library changes, it will be necessary to change only this file to
14+
* provide the same functionality as before.
15+
*
16+
* @author Unay Santisteban <[email protected]>
17+
* @package OtherCode\ComplexHeart\Application\DTO
18+
*/
19+
abstract class DTO extends DataTransferObject
20+
{
21+
22+
}

0 commit comments

Comments
 (0)