| Total Complexity | 1 |
| Total Lines | 43 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 11 | class Options |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * Capacity size. "0" = Leaky bucket, ">0" = Token bucket |
||
| 15 | * @var int |
||
| 16 | */ |
||
| 17 | public $capacity = 0; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * Token's generating rate for bucket |
||
| 21 | * @var int |
||
| 22 | */ |
||
| 23 | public $bucketTGS = 0; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * Max buffer size. more will be ignored |
||
| 27 | * @var int |
||
| 28 | */ |
||
| 29 | public $waitQMax = 0; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Wait timeout[ms] in buffer queue |
||
| 33 | * @var int |
||
| 34 | */ |
||
| 35 | public $waitTimeout = 0; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Options constructor. |
||
| 39 | * @param int $capacity |
||
| 40 | * @param int $bucketTGS |
||
| 41 | * @param int $waitQMax |
||
| 42 | * @param int $waitTimeout |
||
| 43 | */ |
||
| 44 | public function __construct( |
||
| 56 |