fix(discount): align propertiesList with Discount::make() parameter order

This commit is contained in:
Jérémy Munsch 2026-07-23 14:00:24 +02:00
parent 696132eddc
commit 37278195e6
Signed by: forge-joniko
GPG key ID: D7EFE2F5CB6CC0E4
2 changed files with 8 additions and 8 deletions

View file

@ -90,11 +90,11 @@ class SettingsController extends Controller
} }
try { try {
return Discount::make( return Discount::make(
Arr::get($coupon, 'web_coupon_identifiant'),
Arr::get($coupon, 'percentage'),
Arr::get($coupon, 'face_value'),
Arr::get($coupon, 'valid_on'),
$picture, $picture,
Arr::get($coupon, 'valid_on'),
Arr::get($coupon, 'face_value'),
Arr::get($coupon, 'percentage'),
Arr::get($coupon, 'web_coupon_identifiant'),
); );
} catch (\RuntimeException | \TypeError) { } catch (\RuntimeException | \TypeError) {
return null; return null;

View file

@ -26,11 +26,11 @@ class Discount extends \stdClass implements Jsonable, Arrayable, \JsonSerializab
* @var array<string> * @var array<string>
*/ */
private static array $propertiesList = [ private static array $propertiesList = [
'web_coupon_identifiant',
'percentage',
'face_value',
'valid_on',
'picture', 'picture',
'valid_on',
'face_value',
'percentage',
'web_coupon_identifiant',
]; ];
/** /**