Files
DatBrowser/app/Browser/Jobs/EldoradoRobuxPriceSentry/EldoradoRobuxPriceNotificationBody.php
Matthias Guillitte 062f428fbc
All checks were successful
Test, build and push image to registry / phpunit-tests (push) Successful in 2m28s
Test, build and push image to registry / build-image (push) Successful in 3m41s
Eldorado : Changed alert robux price display
2025-12-16 12:04:12 +01:00

35 lines
1.2 KiB
PHP

<?php
namespace App\Browser\Jobs\EldoradoRobuxPriceSentry;
use App\Notification\NotificationBody;
class EldoradoRobuxPriceNotificationBody extends NotificationBody {
private float $price;
private float $threshold;
private string $link;
public function __construct(float $price, float $threshold, string $link) {
parent::__construct();
$this->price = $price;
$this->threshold = $threshold;
$this->link = $link;
}
/**
* @inheritDoc
*/
public function toMarkdownString(): string {
return "Le prix des Robux sur Eldorado est actuellement de **" . number_format($this->price, 5, ",", " ") . " €**/Robux, ce qui est inférieur ou égal au seuil de **" . number_format($this->threshold, 5, ",", " ") . " €**.\n\n[Voir l'offre sur Eldorado]( " . $this->link . " )";
}
/**
* @inheritDoc
*/
public function toString(): string {
return "Le prix des Robux sur Eldorado est actuellement de " . number_format($this->price, 5, ",", " ") . " €/Robux, ce qui est inférieur ou égal au seuil de " . number_format($this->threshold, 5, ",", " ") . " €.\n\nVoir l'offre sur Eldorado : " . $this->link;
}
}