Merged in feature/314-dev-dev01 (pull request #24)
auto-patch 314-dev-dev01-2024-01-25T04_09_02 * auto-patch 314-dev-dev01-2024-01-25T04_09_02
This commit is contained in:
@@ -14,12 +14,12 @@ interface Promotion_Manager_Interface {
|
||||
*
|
||||
* @return bool Whether the promotion is effective.
|
||||
*/
|
||||
public function is( string $promotion_name ) : bool;
|
||||
public function is( string $promotion_name ): bool;
|
||||
|
||||
/**
|
||||
* Get the list of promotions.
|
||||
*
|
||||
* @return array The list of promotions.
|
||||
*/
|
||||
public function get_promotions_list() : array;
|
||||
public function get_promotions_list(): array;
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ class Promotion_Manager implements Promotion_Manager_Interface {
|
||||
/**
|
||||
* Class constructor.
|
||||
*
|
||||
* @param Promotion_Interface ...$promotions list of promotions.
|
||||
* @param Promotion_Interface ...$promotions List of promotions.
|
||||
*/
|
||||
public function __construct( Promotion_Interface ...$promotions ) {
|
||||
$this->promotions_list = $promotions;
|
||||
@@ -34,7 +34,7 @@ class Promotion_Manager implements Promotion_Manager_Interface {
|
||||
*
|
||||
* @return bool Whether the promotion is effective.
|
||||
*/
|
||||
public function is( string $promotion_name ) : bool {
|
||||
public function is( string $promotion_name ): bool {
|
||||
$time = \time();
|
||||
|
||||
foreach ( $this->promotions_list as $promotion ) {
|
||||
@@ -51,7 +51,7 @@ class Promotion_Manager implements Promotion_Manager_Interface {
|
||||
*
|
||||
* @return array<Abstract_Promotion> The list of promotions.
|
||||
*/
|
||||
public function get_promotions_list() : array {
|
||||
public function get_promotions_list(): array {
|
||||
return $this->promotions_list;
|
||||
}
|
||||
|
||||
@@ -60,7 +60,7 @@ class Promotion_Manager implements Promotion_Manager_Interface {
|
||||
*
|
||||
* @return array<string> The list of promotions.
|
||||
*/
|
||||
public function get_current_promotions() : array {
|
||||
public function get_current_promotions(): array {
|
||||
$current_promotions = [];
|
||||
$time = \time();
|
||||
foreach ( $this->promotions_list as $promotion ) {
|
||||
|
||||
@@ -29,7 +29,7 @@ class Time_Interval {
|
||||
* @codeCoverageIgnore
|
||||
*
|
||||
* @param int $time_start Interval start time.
|
||||
* @param int $time_end Interval end time.
|
||||
* @param int $time_end Interval end time.
|
||||
*/
|
||||
public function __construct( int $time_start, int $time_end ) {
|
||||
$this->time_start = $time_start;
|
||||
|
||||
Reference in New Issue
Block a user