@@ -31,10 +31,10 @@ public function __construct()
3131 $ this ->config = config ('audit_log ' , []);
3232 }
3333
34- public function make (AuditContext $ ctx , $ subject , $ eventType ): ?IAuditLogFormatter
34+ public function make (AuditContext $ ctx , $ subject , string $ event_type ): ?IAuditLogFormatter
3535 {
3636 $ formatter = null ;
37- switch ($ eventType ) {
37+ switch ($ event_type ) {
3838 case IAuditStrategy::EVENT_COLLECTION_UPDATE :
3939 $ child_entity_formatter = null ;
4040
@@ -101,20 +101,20 @@ public function make(AuditContext $ctx, $subject, $eventType): ?IAuditLogFormatt
101101 $ formatter = new EntityCollectionUpdateAuditLogFormatter ($ child_entity_formatter );
102102 break ;
103103 case IAuditStrategy::EVENT_ENTITY_CREATION :
104- $ formatter = $ this ->getFormatterByContext ($ subject , $ eventType , $ ctx );
104+ $ formatter = $ this ->getFormatterByContext ($ subject , $ event_type , $ ctx );
105105 if (is_null ($ formatter )) {
106- $ formatter = new EntityCreationAuditLogFormatter ();
106+ $ formatter = new EntityCreationAuditLogFormatter ($ event_type );
107107 }
108108 break ;
109109 case IAuditStrategy::EVENT_ENTITY_DELETION :
110- $ formatter = $ this ->getFormatterByContext ($ subject , $ eventType , $ ctx );
110+ $ formatter = $ this ->getFormatterByContext ($ subject , $ event_type , $ ctx );
111111 if (is_null ($ formatter )) {
112112 $ child_entity_formatter = ChildEntityFormatterFactory::build ($ subject );
113113 $ formatter = new EntityDeletionAuditLogFormatter ($ child_entity_formatter );
114114 }
115115 break ;
116116 case IAuditStrategy::EVENT_ENTITY_UPDATE :
117- $ formatter = $ this ->getFormatterByContext ($ subject , $ eventType , $ ctx );
117+ $ formatter = $ this ->getFormatterByContext ($ subject , $ event_type , $ ctx );
118118 if (is_null ($ formatter )) {
119119 $ child_entity_formatter = ChildEntityFormatterFactory::build ($ subject );
120120 $ formatter = new EntityUpdateAuditLogFormatter ($ child_entity_formatter );
0 commit comments