Documentation

StreakResult
in package

Read onlyYes
FinalYes

Value object for streak calculation results.

Tags
since
3.0.0

Table of Contents

Properties

$bestStreak  : int
$currentStreak  : int
$totalActiveDays  : int

Methods

__construct()  : mixed
Constructor.
toArray()  : array{current_streak: int, best_streak: int, total_active_days: int}
Convert to array for JSON serialization.

Properties

Methods

__construct()

Constructor.

public __construct(int $currentStreak, int $bestStreak, int $totalActiveDays) : mixed
Parameters
$currentStreak : int

Consecutive days ending today/yesterday

$bestStreak : int

Longest consecutive run ever

$totalActiveDays : int

Total number of days with any activity

toArray()

Convert to array for JSON serialization.

public toArray() : array{current_streak: int, best_streak: int, total_active_days: int}
Return values
array{current_streak: int, best_streak: int, total_active_days: int}

        
On this page

Search results