File tree Expand file tree Collapse file tree 2 files changed +9
-8
lines changed
Expand file tree Collapse file tree 2 files changed +9
-8
lines changed Original file line number Diff line number Diff line change @@ -24,11 +24,11 @@ class WorkflowTransition extends Model
2424 public function getTable (): string
2525 {
2626 // ใช้ static table name ในช่วงที่ analyze
27- if (app ()->runningInConsole () &&
28- (!app ()->bound (DatabaseLoader::class) || app ()->environment ('testing ' ))) {
27+ if (app ()->runningInConsole () &&
28+ (! app ()->bound (DatabaseLoader::class) || app ()->environment ('testing ' ))) {
2929 return $ this ->table ;
3030 }
31-
31+
3232 try {
3333 return app (DatabaseLoader::class)->getWorkflowTransitionTableName ();
3434 } catch (\Exception $ e ) {
Original file line number Diff line number Diff line change @@ -28,9 +28,9 @@ public function packageRegistered()
2828 // Register DatabaseLoader with safe config retrieval
2929 $ this ->app ->singleton (DatabaseLoader::class, function ($ app ) {
3030 $ config = $ app ['config ' ]->get ('workflow_loader.loaders.database ' , []);
31-
31+
3232 // Provide default config if not found
33- if (empty ($ config ) || !isset ($ config ['tableNames ' ])) {
33+ if (empty ($ config ) || ! isset ($ config ['tableNames ' ])) {
3434 $ config = [
3535 'tableNames ' => [
3636 'workflows ' => 'workflows ' ,
@@ -40,22 +40,23 @@ public function packageRegistered()
4040 ],
4141 ];
4242 }
43-
43+
4444 return new DatabaseLoader (
45- $ config ,
45+ $ config ,
4646 $ app ->make (Repositories \WorkflowRepository::class)
4747 );
4848 });
4949
5050 // Register WorkflowLoaderRegistry
5151 $ this ->app ->singleton (WorkflowLoaderRegistry::class, function ($ app ) {
5252 $ loaders = $ app ['config ' ]->get ('workflow_loader.loaders ' , []);
53+
5354 return new WorkflowLoaderRegistry ($ loaders );
5455 });
5556
5657 // Bind contracts
5758 $ this ->app ->bind (
58- Contracts \WorkflowDatabaseLoader::class,
59+ Contracts \WorkflowDatabaseLoader::class,
5960 DatabaseLoader::class
6061 );
6162
You can’t perform that action at this time.
0 commit comments