1717#[IsReadOnly]
1818class ApplicationInfo extends Tool
1919{
20- public function __construct (protected Roster $ roster )
21- {
22- }
20+ public function __construct (protected Roster $ roster ) {}
2321
2422 public function description (): string
2523 {
@@ -32,15 +30,15 @@ public function schema(ToolInputSchema $schema): ToolInputSchema
3230 }
3331
3432 /**
35- * @param array<string> $arguments
33+ * @param array<string> $arguments
3634 */
3735 public function handle (array $ arguments ): ToolResult
3836 {
3937 return ToolResult::json ([
4038 'php_version ' => PHP_VERSION ,
4139 'laravel_version ' => app ()->version (),
4240 'database_engine ' => config ('database.default ' ),
43- 'packages ' => $ this ->roster ->packages ()->map (fn (Package $ package ) => ['roster_name ' => $ package ->name (), 'version ' => $ package ->version (), 'package_name ' => $ package ->rawName ()]),
41+ 'packages ' => $ this ->roster ->packages ()->map (fn (Package $ package ) => ['roster_name ' => $ package ->name (), 'version ' => $ package ->version (), 'package_name ' => $ package ->rawName ()]),
4442 'models ' => $ this ->discoverModels (),
4543 ]);
4644 }
@@ -55,8 +53,8 @@ private function discoverModels(): array
5553 $ models = [];
5654 $ appPath = app_path ();
5755
58- if (!is_dir ($ appPath )) {
59- return ['app-path-isnt-a-directory: ' . $ appPath ];
56+ if (! is_dir ($ appPath )) {
57+ return ['app-path-isnt-a-directory: ' . $ appPath ];
6058 }
6159
6260 $ finder = Finder::create ()
@@ -67,17 +65,17 @@ private function discoverModels(): array
6765 foreach ($ finder as $ file ) {
6866 $ relativePath = $ file ->getRelativePathname ();
6967 $ namespace = app ()->getNamespace ();
70- $ className = $ namespace . str_replace (
71- ['/ ' , '.php ' ],
72- ['\\' , '' ],
73- $ relativePath
74- );
68+ $ className = $ namespace. str_replace (
69+ ['/ ' , '.php ' ],
70+ ['\\' , '' ],
71+ $ relativePath
72+ );
7573
7674 try {
7775 if (class_exists ($ className )) {
7876 $ reflection = new ReflectionClass ($ className );
79- if ($ reflection ->isSubclassOf (Model::class) && !$ reflection ->isAbstract ()) {
80- $ models [$ className ] = $ appPath . DIRECTORY_SEPARATOR . $ relativePath ;
77+ if ($ reflection ->isSubclassOf (Model::class) && ! $ reflection ->isAbstract ()) {
78+ $ models [$ className ] = $ appPath. DIRECTORY_SEPARATOR . $ relativePath ;
8179 }
8280 }
8381 } catch (\Throwable ) {
0 commit comments