coding style

This commit is contained in:
ludo
2024-02-22 19:35:51 +01:00
parent 722ea43bc2
commit 64a218afc2
33 changed files with 54 additions and 93 deletions

View File

@@ -17,7 +17,7 @@ class BasketStores
public function get($key)
{
if($this->has($key)) {
if ($this->has($key)) {
return new CartCollection(Basket::find($key)->cart_data);
} else {
return [];
@@ -26,14 +26,14 @@ class BasketStores
public function put($key, $value)
{
if($row = Basket::find($key)) {
if ($row = Basket::find($key)) {
// update
$row->cart_data = $value;
$row->save();
} else {
Basket::create([
'id' => $key,
'cart_data' => $value
'cart_data' => $value,
]);
}
}
@@ -41,5 +41,5 @@ class BasketStores
public static function getModel()
{
return Basket::query();
}
}
}