1212use Binaryk \LaravelRestify \Http \Requests \RepositoryStoreRequest ;
1313use Binaryk \LaravelRestify \Http \Requests \RepositoryUpdateBulkRequest ;
1414use Binaryk \LaravelRestify \Http \Requests \RepositoryUpdateRequest ;
15- use Binaryk \LaravelRestify \MCP \Requests \McpRequest ;
15+ use Binaryk \LaravelRestify \MCP \Requests \McpActionRequest ;
16+ use Binaryk \LaravelRestify \MCP \Requests \McpDestroyRequest ;
17+ use Binaryk \LaravelRestify \MCP \Requests \McpGetterRequest ;
18+ use Binaryk \LaravelRestify \MCP \Requests \McpIndexRequest ;
19+ use Binaryk \LaravelRestify \MCP \Requests \McpShowRequest ;
20+ use Binaryk \LaravelRestify \MCP \Requests \McpStoreBulkRequest ;
21+ use Binaryk \LaravelRestify \MCP \Requests \McpStoreRequest ;
22+ use Binaryk \LaravelRestify \MCP \Requests \McpUpdateBulkRequest ;
23+ use Binaryk \LaravelRestify \MCP \Requests \McpUpdateRequest ;
1624
1725/**
1826 * @mixin RestifyRequest
@@ -21,11 +29,8 @@ trait DetermineRequestType
2129{
2230 public function isIndexRequest (): bool
2331 {
24- if ($ this instanceof McpRequest) {
25- return $ this ->isIndexRequest ();
26- }
27-
28- return $ this instanceof RepositoryIndexRequest;
32+ return $ this instanceof RepositoryIndexRequest
33+ || $ this instanceof McpIndexRequest;
2934 }
3035
3136 public function isGlobalRequest (): bool
@@ -35,73 +40,49 @@ public function isGlobalRequest(): bool
3540
3641 public function isShowRequest (): bool
3742 {
38- if ($ this instanceof McpRequest) {
39- return $ this ->isShowRequest ();
40- }
41-
42- return $ this instanceof RepositoryShowRequest;
43+ return $ this instanceof RepositoryShowRequest
44+ || $ this instanceof McpShowRequest;
4345 }
4446
4547 public function isUpdateRequest (): bool
4648 {
47- if ($ this instanceof McpRequest) {
48- return $ this ->isUpdateRequest ();
49- }
50-
51- return $ this instanceof RepositoryUpdateRequest;
49+ return $ this instanceof RepositoryUpdateRequest
50+ || $ this instanceof McpUpdateRequest;
5251 }
5352
5453 public function isStoreRequest (): bool
5554 {
56- if ($ this instanceof McpRequest) {
57- return $ this ->isStoreRequest ();
58- }
59-
60- return $ this instanceof RepositoryStoreRequest;
55+ return $ this instanceof RepositoryStoreRequest
56+ || $ this instanceof McpStoreRequest;
6157 }
6258
6359 public function isDestroyRequest (): bool
6460 {
65- if ($ this instanceof McpRequest) {
66- return $ this ->isDestroyRequest ();
67- }
68-
69- return $ this instanceof RepositoryDestroyRequest;
61+ return $ this instanceof RepositoryDestroyRequest
62+ || $ this instanceof McpDestroyRequest;
7063 }
7164
7265 public function isStoreBulkRequest (): bool
7366 {
74- if ($ this instanceof McpRequest) {
75- return $ this ->isStoreBulkRequest ();
76- }
77-
78- return $ this instanceof RepositoryStoreBulkRequest;
67+ return $ this instanceof RepositoryStoreBulkRequest
68+ || $ this instanceof McpStoreBulkRequest;
7969 }
8070
8171 public function isUpdateBulkRequest (): bool
8272 {
83- if ($ this instanceof McpRequest) {
84- return $ this ->isUpdateBulkRequest ();
85- }
86-
87- return $ this instanceof RepositoryUpdateBulkRequest;
73+ return $ this instanceof RepositoryUpdateBulkRequest
74+ || $ this instanceof McpUpdateBulkRequest;
8875 }
8976
9077 public function isActionRequest (): bool
9178 {
92- if ($ this instanceof McpRequest) {
93- return $ this ->isActionRequest ();
94- }
95-
96- return $ this instanceof ActionRequest;
79+ return $ this instanceof ActionRequest
80+ || $ this instanceof McpActionRequest;
9781 }
9882
9983 public function isGetterRequest (): bool
10084 {
101- if ($ this instanceof McpRequest) {
102- return $ this ->isGetterRequest ();
103- }
104-
105- return $ this instanceof GetterRequest;
85+ return $ this instanceof GetterRequest
86+ || $ this instanceof McpGetterRequest;
10687 }
10788}
0 commit comments