Skip to content

Commit 0183438

Browse files
committed
fix: Simplify exception class imports
1 parent 5f93a98 commit 0183438

File tree

2 files changed

+21
-14
lines changed

2 files changed

+21
-14
lines changed

src/Service/EntryServiceInterface.php

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,10 @@
77
use Butschster\ContextGenerator\Research\Domain\Model\Entry;
88
use Butschster\ContextGenerator\Research\Domain\ValueObject\EntryId;
99
use Butschster\ContextGenerator\Research\Domain\ValueObject\ResearchId;
10+
use Butschster\ContextGenerator\Research\Exception\EntryNotFoundException;
11+
use Butschster\ContextGenerator\Research\Exception\ResearchException;
12+
use Butschster\ContextGenerator\Research\Exception\ResearchNotFoundException;
13+
use Butschster\ContextGenerator\Research\Exception\TemplateNotFoundException;
1014
use Butschster\ContextGenerator\Research\MCP\DTO\EntryCreateRequest;
1115
use Butschster\ContextGenerator\Research\MCP\DTO\EntryUpdateRequest;
1216

@@ -21,9 +25,9 @@ interface EntryServiceInterface
2125
* Creates an entry with title, description, content, and metadata.
2226
* Description is auto-generated from content if not provided.
2327
*
24-
* @throws \Butschster\ContextGenerator\Research\Exception\ResearchNotFoundException
25-
* @throws \Butschster\ContextGenerator\Research\Exception\TemplateNotFoundException
26-
* @throws \Butschster\ContextGenerator\Research\Exception\ResearchException
28+
* @throws ResearchNotFoundException
29+
* @throws TemplateNotFoundException
30+
* @throws ResearchException
2731
*/
2832
public function createEntry(ResearchId $researchId, EntryCreateRequest $request): Entry;
2933

@@ -33,9 +37,9 @@ public function createEntry(ResearchId $researchId, EntryCreateRequest $request)
3337
* Updates entry fields including title, description, content, status, and tags.
3438
* Supports partial updates - only provided fields are modified.
3539
*
36-
* @throws \Butschster\ContextGenerator\Research\Exception\ResearchNotFoundException
37-
* @throws \Butschster\ContextGenerator\Research\Exception\EntryNotFoundException
38-
* @throws \Butschster\ContextGenerator\Research\Exception\ResearchException
40+
* @throws ResearchNotFoundException
41+
* @throws EntryNotFoundException
42+
* @throws ResearchException
3943
*/
4044
public function updateEntry(ResearchId $researchId, EntryId $entryId, EntryUpdateRequest $request): Entry;
4145

@@ -47,8 +51,8 @@ public function entryExists(ResearchId $researchId, EntryId $entryId): bool;
4751
/**
4852
* Get a specific entry by ID
4953
*
50-
* @throws \Butschster\ContextGenerator\Research\Exception\ResearchNotFoundException
51-
* @throws \Butschster\ContextGenerator\Research\Exception\ResearchException
54+
* @throws ResearchNotFoundException
55+
* @throws ResearchException
5256
*/
5357
public function getEntry(ResearchId $researchId, EntryId $entryId): ?Entry;
5458

src/Service/ResearchServiceInterface.php

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
use Butschster\ContextGenerator\Research\Domain\Model\Research;
88
use Butschster\ContextGenerator\Research\Domain\ValueObject\ResearchId;
9+
use Butschster\ContextGenerator\Research\Exception\ResearchException;
10+
use Butschster\ContextGenerator\Research\Exception\ResearchNotFoundException;
11+
use Butschster\ContextGenerator\Research\Exception\TemplateNotFoundException;
912
use Butschster\ContextGenerator\Research\MCP\DTO\ResearchCreateRequest;
1013
use Butschster\ContextGenerator\Research\MCP\DTO\ResearchUpdateRequest;
1114

@@ -17,16 +20,16 @@ interface ResearchServiceInterface
1720
/**
1821
* Create a new research from template
1922
*
20-
* @throws \Butschster\ContextGenerator\Research\Exception\TemplateNotFoundException
21-
* @throws \Butschster\ContextGenerator\Research\Exception\ResearchException
23+
* @throws TemplateNotFoundException
24+
* @throws ResearchException
2225
*/
2326
public function create(ResearchCreateRequest $request): Research;
2427

2528
/**
2629
* Update an existing research
2730
*
28-
* @throws \Butschster\ContextGenerator\Research\Exception\ResearchNotFoundException
29-
* @throws \Butschster\ContextGenerator\Research\Exception\ResearchException
31+
* @throws ResearchNotFoundException
32+
* @throws ResearchException
3033
*/
3134
public function update(ResearchId $researchId, ResearchUpdateRequest $request): Research;
3235

@@ -57,8 +60,8 @@ public function delete(ResearchId $researchId): bool;
5760
/**
5861
* Add a memory entry to research
5962
*
60-
* @throws \Butschster\ContextGenerator\Research\Exception\ResearchNotFoundException
61-
* @throws \Butschster\ContextGenerator\Research\Exception\ResearchException
63+
* @throws ResearchNotFoundException
64+
* @throws ResearchException
6265
*/
6366
public function addMemory(ResearchId $researchId, string $memory): Research;
6467
}

0 commit comments

Comments
 (0)