@@ -46,6 +46,9 @@ public function __construct(SystemEventStorage $storage, RequestEnvironment $env
4646 }
4747 }
4848
49+ /**
50+ * @return void
51+ */
4952 public function collectStats (RequestStatsEvent $ evt )
5053 {
5154 // we won't even collect data for requests which don't hit either of these min-values, to prevent unnecessary garbage.
@@ -65,6 +68,9 @@ public function collectStats(RequestStatsEvent $evt)
6568 }
6669 }
6770
71+ /**
72+ * @return void
73+ */
6874 public function collectException (RequestExceptionEvent $ evt )
6975 {
7076 $ sysEvt = $ this ->createSystemEvent ($ evt );
@@ -86,6 +92,9 @@ protected function notifyException(RequestExceptionEvent $evt)
8692 return !($ evt ->exception instanceof UnreportedException);
8793 }
8894
95+ /**
96+ * @return void
97+ */
8998 private function rateAndStore (SystemEvent $ sysEvt )
9099 {
91100 $ evt = $ sysEvt ->origin ;
@@ -156,6 +165,10 @@ private function rateAndStore(SystemEvent $sysEvt)
156165 $ this ->storage ->store ($ sysEvt );
157166 }
158167
168+ /**
169+ * @param RequestStatsEvent|RequestExceptionEvent $evt
170+ * @return SystemEvent
171+ */
159172 private function createSystemEvent ($ evt )
160173 {
161174 if ($ evt instanceof RequestStatsEvent) {
@@ -166,6 +179,7 @@ private function createSystemEvent($evt)
166179 $ title = sprintf ('Exception: "%s" in %s:%s ' , $ exc ->getMessage (), $ exc ->getFile (), $ exc ->getLine ());
167180 $ hash = md5 ($ title );
168181 } else {
182+ // @phpstan-ignore-next-line
169183 throw new \Exception (sprintf ('Unsupported event type "%s" ' , is_object ($ evt ) ? get_class ($ evt ) : gettype ($ evt )));
170184 }
171185
@@ -178,13 +192,20 @@ private function createSystemEvent($evt)
178192 return $ sysEvt ;
179193 }
180194
195+ /**
196+ * @return bool
197+ */
181198 private function expectsSoap ()
182199 {
183200 // depending on the used framework, there are different was to check for soap requests
184201 return !empty ($ _SERVER ['HTTP_SOAPACTION ' ]) ||
185202 !empty ($ _SERVER ['HTTP_ACCEPT ' ]) && stripos ($ _SERVER ['HTTP_ACCEPT ' ], 'application/soap+xml ' ) !== false ;
186203 }
187204
205+ /**
206+ * @param int $errno
207+ * @return bool
208+ */
188209 private function isFatalError ($ errno )
189210 {
190211 return in_array (
0 commit comments