| Total Complexity | 5 |
| Total Lines | 25 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | trait HasToonEncoding |
||
| 15 | { |
||
| 16 | public function toToon(string $format = 'readable'): string |
||
| 17 | { |
||
| 18 | return app(ToonService::class)->convert($this->toArray(), $format); |
||
|
|
|||
| 19 | } |
||
| 20 | |||
| 21 | public function toToonCompact(): string |
||
| 22 | { |
||
| 23 | return app(ToonService::class)->encodeCompact($this->toArray()); |
||
| 24 | } |
||
| 25 | |||
| 26 | public function toToonReadable(): string |
||
| 27 | { |
||
| 28 | return app(ToonService::class)->encodeReadable($this->toArray()); |
||
| 29 | } |
||
| 30 | |||
| 31 | public function getToonMetrics(): array |
||
| 34 | } |
||
| 35 | |||
| 36 | public function getToonCompressionRatio(): float |
||
| 39 | } |
||
| 40 | } |
||
| 41 | |||
| 42 |