chore: stricter pint rules

This commit is contained in:
Benjamin Nussbaum 2025-06-17 21:30:59 +02:00
parent 16b2e8436e
commit e535496a1e
30 changed files with 134 additions and 83 deletions

View file

@ -3,6 +3,7 @@
namespace App\Jobs;
use App\Models\Device;
use Exception;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
@ -67,7 +68,7 @@ class FetchProxyCloudResponses implements ShouldQueue
$device->update([
'current_screen_image' => $filename,
]);
} catch (\Exception $e) {
} catch (Exception $e) {
Log::error("Failed to download and save image for device: {$device->mac_address}", [
'error' => $e->getMessage(),
]);
@ -95,7 +96,7 @@ class FetchProxyCloudResponses implements ShouldQueue
]);
}
} catch (\Exception $e) {
} catch (Exception $e) {
Log::error("Failed to fetch proxy cloud response for device: {$device->mac_address}", [
'error' => $e->getMessage(),
]);

View file

@ -3,6 +3,7 @@
namespace App\Jobs;
use App\Models\Firmware;
use Exception;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
@ -40,7 +41,7 @@ class FirmwareDownloadJob implements ShouldQueue
]);
} catch (ConnectionException $e) {
Log::error('Firmware download failed: '.$e->getMessage());
} catch (\Exception $e) {
} catch (Exception $e) {
Log::error('An unexpected error occurred: '.$e->getMessage());
}
}

View file

@ -3,6 +3,7 @@
namespace App\Jobs;
use App\Models\Firmware;
use Exception;
use Illuminate\Bus\Queueable;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Foundation\Bus\Dispatchable;
@ -10,6 +11,7 @@ use Illuminate\Http\Client\ConnectionException;
use Illuminate\Queue\InteractsWithQueue;
use Illuminate\Queue\SerializesModels;
use Illuminate\Support\Facades\Http;
use Log;
class FirmwarePollJob implements ShouldQueue
{
@ -28,7 +30,7 @@ class FirmwarePollJob implements ShouldQueue
$response = Http::get('https://usetrmnl.com/api/firmware/latest')->json();
if (! is_array($response) || ! isset($response['version']) || ! isset($response['url'])) {
\Log::error('Invalid firmware response format received');
Log::error('Invalid firmware response format received');
return;
}
@ -48,9 +50,9 @@ class FirmwarePollJob implements ShouldQueue
}
} catch (ConnectionException $e) {
\Log::error('Firmware download failed: '.$e->getMessage());
} catch (\Exception $e) {
\Log::error('Unexpected error in firmware polling: '.$e->getMessage());
Log::error('Firmware download failed: '.$e->getMessage());
} catch (Exception $e) {
Log::error('Unexpected error in firmware polling: '.$e->getMessage());
}
}
}