| Total Complexity | 4 |
| Total Lines | 37 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 7 | class EncodeOptions |
||
| 8 | { |
||
| 9 | public function __construct( |
||
| 10 | public readonly int $indent = 2, |
||
| 11 | public readonly string $delimiter = ',', |
||
| 12 | public readonly bool $prettyPrint = false, |
||
| 13 | public readonly int $minRowsToTabular = 2, |
||
| 14 | public readonly int $maxPreviewItems = 200, |
||
| 15 | ) {} |
||
| 16 | |||
| 17 | public static function compact(): self |
||
| 18 | { |
||
| 19 | return new self( |
||
| 20 | indent: 0, |
||
| 21 | delimiter: ',', |
||
| 22 | prettyPrint: false, |
||
| 23 | minRowsToTabular: 2, |
||
| 24 | ); |
||
| 25 | } |
||
| 26 | |||
| 27 | public static function readable(): self |
||
| 34 | ); |
||
| 35 | } |
||
| 36 | |||
| 37 | public static function tabular(): self |
||
| 48 |