File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -118,7 +118,12 @@ protected function process(): void
118118 $ tsFields [] = " {$ field }{$ optional }: {$ tsType }; " ;
119119 }
120120
121- $ tsContent .= " export type {$ entity } = { \n" ;
121+ $ tsContent .= "
122+ /**
123+ * @see {$ request ['class ' ]}
124+ * @see filePath
125+ */
126+ export type {$ entity } = { \n" ;
122127 $ tsContent .= implode ("\n" , $ tsFields );
123128 $ tsContent .= "\n }; \n" ;
124129 }
@@ -184,7 +189,11 @@ protected function parseRules(FormRequest $formRequest) {
184189 protected function readFormRequests (string $ path )
185190 {
186191 $ classes = collect (iterator_to_array (new RecursiveIteratorIterator (new RecursiveDirectoryIterator ($ path ))))
187- ->reject (fn ($ i ) => !$ i ->isFile () || !str_ends_with ($ i ->getRealPath (), '.php ' ))
192+ ->reject (fn ($ i ) =>
193+ $ i ->isDir ()
194+ || str_ends_with ($ i ->getRealPath (), '/.. ' )
195+ || ! str_ends_with ($ i ->getRealPath (), '.php ' )
196+ )
188197 ->map (fn ($ item ) => $ this ->fqcnFromPath ($ item ->getRealPath ()))
189198 ->filter ( fn ($ class ) => is_subclass_of ($ class , FormRequest::class))
190199 ->values ();
You can’t perform that action at this time.
0 commit comments