format backend code
This commit is contained in:
parent
9577367622
commit
67dd376a2f
40 changed files with 146 additions and 71 deletions
|
|
@ -10,5 +10,6 @@ class CreateElementDto
|
|||
public Set $set,
|
||||
public string $title,
|
||||
public ?Element $parentElement,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -11,7 +11,8 @@ class Element
|
|||
private string $title,
|
||||
private Set $set,
|
||||
private ?Element $parentElement,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
public function getId(): int
|
||||
{
|
||||
|
|
|
|||
|
|
@ -8,7 +8,9 @@ use DomainException;
|
|||
|
||||
class EloquentElementRepository implements ElementRepository
|
||||
{
|
||||
public function __construct(private SetRepository $setRepo) {}
|
||||
public function __construct(private SetRepository $setRepo)
|
||||
{
|
||||
}
|
||||
|
||||
public function create(CreateElementDto $dto): Element
|
||||
{
|
||||
|
|
|
|||
|
|
@ -15,7 +15,8 @@ class CreateElement
|
|||
public function __construct(
|
||||
private ElementRepository $elementRepo,
|
||||
private SetRepository $setRepo,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
|
||||
/**
|
||||
* @throws BadRequestException
|
||||
|
|
|
|||
|
|
@ -8,5 +8,6 @@ class CreateElementRequest
|
|||
public ?int $setId,
|
||||
public ?string $title,
|
||||
public ?int $parentElementId,
|
||||
) {}
|
||||
) {
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue