add tests batch 20
This commit is contained in:
@@ -9,7 +9,6 @@ use RuntimeException;
|
||||
class PromotionSectionCapacityService
|
||||
{
|
||||
public const CONFIG_KEY = 'promotion.section_capacity';
|
||||
|
||||
public const DEFAULT_CAPACITY = 20;
|
||||
|
||||
public function capacity(): array
|
||||
@@ -24,7 +23,7 @@ class PromotionSectionCapacityService
|
||||
'fallback' => self::DEFAULT_CAPACITY,
|
||||
]);
|
||||
$value = self::DEFAULT_CAPACITY;
|
||||
} elseif (! ctype_digit((string) $raw)) {
|
||||
} elseif (!ctype_digit((string) $raw)) {
|
||||
throw new RuntimeException('promotion.section_capacity must be a positive integer.');
|
||||
} else {
|
||||
$value = (int) $raw;
|
||||
|
||||
Reference in New Issue
Block a user