| Total Complexity | 3 | 
| Total Lines | 39 | 
| Duplicated Lines | 0 % | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 5 | trait UploadStreaming | ||
| 6 | { | ||
| 7 | /** | ||
| 8 | * @var bool Enable/disable upload & download streaming | ||
| 9 | */ | ||
| 10 | protected $streaming; | ||
| 11 | |||
| 12 | /** | ||
| 13 | * Enable upload/download streaming regardless of config setting. | ||
| 14 | * | ||
| 15 | * @return $this | ||
| 16 | */ | ||
| 17 | public function enableStreaming(): self | ||
| 18 |     { | ||
| 19 | $this->streaming = true; | ||
| 20 | |||
| 21 | return $this; | ||
| 22 | } | ||
| 23 | |||
| 24 | /** | ||
| 25 | * Disable upload/download streaming regardless of config setting. | ||
| 26 | * | ||
| 27 | * @return $this | ||
| 28 | */ | ||
| 29 | public function disableStreaming(): self | ||
| 34 | } | ||
| 35 | |||
| 36 | /** | ||
| 37 | * Determine if upload/download streaming is enabled. | ||
| 38 | * | ||
| 39 | * @return bool | ||
| 40 | */ | ||
| 41 | protected function isStreamingEnabled(): bool | ||
| 46 |