fix(discount): align propertiesList with Discount::make() parameter order
This commit is contained in:
parent
696132eddc
commit
37278195e6
2 changed files with 8 additions and 8 deletions
|
|
@ -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;
|
||||||
|
|
|
||||||
|
|
@ -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',
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue