# HistoryStatusBucket

> Typed view-model for one status-code bucket shown in the History summary header ('2xx', '3xx', '4xx', '5xx').

[API reference](/docs/api/index.md) › [Debug Core](/docs/extensions/debug-core/reference/index.md) › [View](/docs/extensions/debug-core/reference/view/index.md) › [History](/docs/extensions/debug-core/reference/view/history/index.md) › HistoryStatusBucket

| final readonly class | `PHPForge\Debug\View\History\HistoryStatusBucket` |
| --- | --- |
| Source | [`src/View/History/HistoryStatusBucket.php`](https://github.com/php-forge/debug-core/blob/main/src/View/History/HistoryStatusBucket.php#L10) |

Typed view-model for one status-code bucket shown in the History summary header ('2xx', '3xx', '4xx', '5xx').

## Properties

| Property | Type | Description | Defined by |
| --- | --- | --- | --- |
| <span id="property-count"></span>`$count` readonly constructor | `int` | Number of captured requests in this bucket. | `HistoryStatusBucket` |
| <span id="property-label"></span>`$label` readonly constructor | `string` | Display label ('2xx' / '3xx' / '4xx' / '5xx'). | `HistoryStatusBucket` |
| <span id="property-sampleCode"></span>`$sampleCode` readonly constructor | `int` | Representative status code from the bucket — used by the pill link's deep-link filter so clicking lands the grid on a real example. | `HistoryStatusBucket` |
| <span id="property-variant"></span>`$variant` readonly constructor | `string` | Semantic vocabulary status-class suffix ('2xx' / '3xx' / '4xx' / '5xx'). | `HistoryStatusBucket` |

## Methods

| Method | Description | Defined by |
| --- | --- | --- |
| [`__construct()`](#method-__construct) | Creates a status-code bucket for the History summary. | `HistoryStatusBucket` |

## Method details

### __construct() <span id="method-__construct"></span>

```php
public function __construct(string $label, int $count, int $sampleCode, string $variant)
```

Creates a status-code bucket for the History summary.

**Parameters**

| Parameter | Type | Description |
| --- | --- | --- |
| `$label` | `string` |  |
| `$count` | `int` |  |
| `$sampleCode` | `int` |  |
| `$variant` | `string` |  |