@@ -79,16 +79,16 @@ public function __construct(
7979 Message $ mailMessageService = null ,
8080 TransportInterface $ mailMessageTransport = null
8181 ) {
82- $ this ->logger = $ logger ;
83- $ this ->serverUrl = $ serverUrl ;
84- $ this ->request = $ request ;
85- $ this ->requestUri = $ requestUri ;
82+ $ this ->logger = $ logger ;
83+ $ this ->serverUrl = $ serverUrl ;
84+ $ this ->request = $ request ;
85+ $ this ->requestUri = $ requestUri ;
8686 $ this ->configLoggingSettings = $ errorHeroModuleLocalConfig ['logging-settings ' ];
87- $ this ->logWritersConfig = $ logWritersConfig ;
88- $ this ->mailMessageService = $ mailMessageService ;
89- $ this ->mailMessageTransport = $ mailMessageTransport ;
90- $ this ->emailReceivers = $ errorHeroModuleLocalConfig ['email-notification-settings ' ]['email-to-send ' ];
91- $ this ->emailSender = $ errorHeroModuleLocalConfig ['email-notification-settings ' ]['email-from ' ];
87+ $ this ->logWritersConfig = $ logWritersConfig ;
88+ $ this ->mailMessageService = $ mailMessageService ;
89+ $ this ->mailMessageTransport = $ mailMessageTransport ;
90+ $ this ->emailReceivers = $ errorHeroModuleLocalConfig ['email-notification-settings ' ]['email-to-send ' ];
91+ $ this ->emailSender = $ errorHeroModuleLocalConfig ['email-notification-settings ' ]['email-from ' ];
9292 }
9393
9494 /**
@@ -123,22 +123,21 @@ private function getRequestData()
123123 {
124124 $ request_data = [];
125125 if ($ this ->request instanceof Request) {
126- $ query = $ this ->request ->getQuery ()->toArray ();
126+ $ query = $ this ->request ->getQuery ()->toArray ();
127127 $ request_method = $ this ->request ->getServer ('REQUEST_METHOD ' );
128- $ body_data = ($ this ->request ->isPost ())
128+ $ body_data = ($ this ->request ->isPost ())
129129 ? $ this ->request ->getPost ()->toArray ()
130130 : [];
131-
132- $ raw_data = $ this ->request ->getContent ();
133- $ raw_data = str_replace ("\r\n" , '' , $ raw_data );
134- $ files_data = $ this ->request ->getFiles ()->toArray ();
131+ $ raw_data = $ this ->request ->getContent ();
132+ $ raw_data = str_replace ("\r\n" , '' , $ raw_data );
133+ $ files_data = $ this ->request ->getFiles ()->toArray ();
135134
136135 $ request_data = [
137- 'query ' => $ query ,
136+ 'query ' => $ query ,
138137 'request_method ' => $ request_method ,
139- 'body_data ' => $ body_data ,
140- 'raw_data ' => $ raw_data ,
141- 'files_data ' => $ files_data ,
138+ 'body_data ' => $ body_data ,
139+ 'raw_data ' => $ raw_data ,
140+ 'files_data ' => $ files_data ,
142141 ];
143142 }
144143
@@ -160,7 +159,7 @@ private function sendMail($priority, $errorMessage, $extra, $subject)
160159 $ this ->mailMessageService ->setTo ($ email );
161160 $ this ->mailMessageService ->setSubject ($ subject );
162161
163- $ writer = new Mail (
162+ $ writer = new Mail (
164163 $ this ->mailMessageService ,
165164 $ this ->mailMessageTransport
166165 );
@@ -204,11 +203,11 @@ public function handleException($e)
204203 }
205204
206205 $ extra = [
207- 'url ' => $ this ->serverUrl .$ this ->requestUri ,
208- 'file ' => $ errorFile ,
209- 'line ' => $ errorLine ,
210- 'error_type ' => $ exceptionClass ,
211- 'trace ' => $ trace ,
206+ 'url ' => $ this ->serverUrl .$ this ->requestUri ,
207+ 'file ' => $ errorFile ,
208+ 'line ' => $ errorLine ,
209+ 'error_type ' => $ exceptionClass ,
210+ 'trace ' => $ trace ,
212211 'request_data ' => $ this ->getRequestData (),
213212 ];
214213 $ this ->logger ->log ($ priority , $ errorMessage , $ extra );
@@ -236,10 +235,10 @@ public function handleError(
236235 $ priority = Logger::$ errorPriorityMap [$ errorType ];
237236
238237 $ extra = [
239- 'url ' => $ this ->serverUrl .$ this ->requestUri ,
240- 'file ' => $ errorFile ,
241- 'line ' => $ errorLine ,
242- 'error_type ' => $ errorTypeString ,
238+ 'url ' => $ this ->serverUrl .$ this ->requestUri ,
239+ 'file ' => $ errorFile ,
240+ 'line ' => $ errorLine ,
241+ 'error_type ' => $ errorTypeString ,
243242 'request_data ' => $ this ->getRequestData (),
244243 ];
245244 $ this ->logger ->log ($ priority , $ errorMessage , $ extra );
0 commit comments