*/ private array $counts; /** * Masked recent-entries slice in newest-first order. * * @var list> */ private array $recent; /** * Construct the result with explicit values for every axis. * * @param array $counts PSR-3 level → row-count map. * @param list> $recent Masked recent-entries slice. */ public function __construct( array $counts, array $recent ) { $this->counts = $counts; $this->recent = array_values( $recent ); } /** * PSR-3 level → row-count map. * * @return array */ public function counts(): array { return $this->counts; } /** * Masked recent-entries slice in newest-first order. * * @return list> */ public function recent(): array { return $this->recent; } /** * Render the §12.3 success envelope `data` shape: * * `array( * 'counts' => array, * 'recent' => list>, * )` * * @return array{ * counts: array, * recent: list>, * } */ public function toArray(): array { return array( 'counts' => $this->counts, 'recent' => $this->recent, ); } }