Sample for the unreachable code, which I believe is incorrect (but maybe I understand my own code incorrectly)
if (!$request->has('secret_key')) {
Log::error('Superfaktura callback error: Secret key is missing');
throw new \Exception('Invoice ID is missing');
}
if ($request->get('secret_key') != config('constants.superfaktura.callback_secret')) {
Log::error('Superfaktura callback error: Invalid secret key');
throw new \Exception('Invalid secret key');
}
if (!$request->has('invoice_id')) {
Log::error('Superfaktura callback error: Invoice ID is missing');
throw new \Exception('Invoice ID is missing');
}
//get invoice_id or profoma_invoice_id
$invoice = Invoice::where('invoice_id', $request->get('invoice_id'))->orWhere('proforma_invoice_id', $request->get('invoice_id'))->first();
Here the whole line for $invoice is underlined with PHP0419 error. But thanks for the tip, I updated my .editorconfig.
Regarding the missing function file, there is no error at all, no warning, notices .. nothing, but it should show at least 2 functions missing.