Skip to content

Commit

Permalink
Ignore erroneous PHPStan error in SentryHelper
Browse files Browse the repository at this point in the history
  • Loading branch information
admdly committed Nov 29, 2023
1 parent 5c4ec04 commit b08f65b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/library/FOSSBilling/SentryHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,9 @@ public function sendRequest(Request $request, Options $options): Response
/**
* Here we validate that the DSN is correctly set and that error reporting is enabled before passing it off to the Sentry SDK.
* It may look a bit odd, but the DSN placeholder value here is split into two strings and concatenated so we can easily perform a `sed` replacement of the placeholder without it effecting this check
*
* Ignore PHPStan $sentryDSN empty() never defined error - the value is replaced during release and the check is written with this in mind.
* @phpstan-ignore-next-line
*/
if ($config['debug_and_monitoring']['report_errors'] && $sentryDSN !== '--replace--this--' . 'during--release--process--' && !empty($sentryDSN)) {
// Per Sentry documentation, not setting this results in the SDK simply not sending any information.
Expand Down

0 comments on commit b08f65b

Please sign in to comment.