| Total Complexity | 2 |
| Total Lines | 69 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | class UploadResult |
||
| 15 | { |
||
| 16 | |||
| 17 | /** |
||
| 18 | * The unique identifier of the uploaded files. |
||
| 19 | * |
||
| 20 | * @var string |
||
| 21 | */ |
||
| 22 | public string $id; |
||
| 23 | |||
| 24 | /** |
||
| 25 | * Start time of the upload in microseconds |
||
| 26 | * |
||
| 27 | * @var float |
||
| 28 | */ |
||
| 29 | public float $startTime; |
||
| 30 | |||
| 31 | /** |
||
| 32 | * End time of the upload in microseconds |
||
| 33 | * |
||
| 34 | * @var float |
||
| 35 | */ |
||
| 36 | public float $endTime; |
||
| 37 | |||
| 38 | /** |
||
| 39 | * The upload status |
||
| 40 | * |
||
| 41 | * @var bool |
||
| 42 | */ |
||
| 43 | public bool $success = false; |
||
| 44 | |||
| 45 | /** |
||
| 46 | * The uploaded files |
||
| 47 | * |
||
| 48 | * @var array [{id, location, elapsedTime, status}, ...] |
||
| 49 | */ |
||
| 50 | public array $uploads = []; |
||
| 51 | |||
| 52 | /** |
||
| 53 | * HttpResponse |
||
| 54 | * |
||
| 55 | * @var HttpResponse |
||
| 56 | */ |
||
| 57 | public HttpResponse $response; |
||
| 58 | |||
| 59 | /** |
||
| 60 | * The Constructor of the UploadResult class |
||
| 61 | */ |
||
| 62 | public function __construct() |
||
| 65 | } |
||
| 66 | |||
| 67 | /** |
||
| 68 | * Add a file to the upload result |
||
| 69 | * |
||
| 70 | * @param string $location |
||
| 71 | * @param float $elapsedTime |
||
| 72 | * @param string $status |
||
| 73 | * |
||
| 74 | * @return void |
||
| 75 | */ |
||
| 76 | public function addFile(string $location, float $elapsedTime, string $status): void |
||
| 86 | } |