Changeset View
Changeset View
Standalone View
Standalone View
src/app/Handlers/Storage.php
<?php | <?php | ||||
namespace App\Handlers; | namespace App\Handlers; | ||||
class Storage extends \App\Handlers\Base | class Storage extends \App\Handlers\Base | ||||
{ | { | ||||
public const MAX_ITEMS = 100; | public const MAX_ITEMS = 100; | ||||
public const ITEM_UNIT = 'GB'; | public const ITEM_UNIT = 'GB'; | ||||
public static function entitleableClass() | public static function entitleableClass(): string | ||||
{ | { | ||||
return \App\User::class; | return \App\User::class; | ||||
} | } | ||||
public static function preReq($entitlement, $object) | public static function preReq($entitlement, $object): bool | ||||
{ | { | ||||
if (!$entitlement->sku->active) { | if (!$entitlement->sku->active) { | ||||
\Log::error("Sku not active"); | \Log::error("Sku not active"); | ||||
return false; | return false; | ||||
} | } | ||||
// TODO: The storage can not be modified to below what is already consumed. | // TODO: The storage can not be modified to below what is already consumed. | ||||
Show All 14 Lines |