Conditions | 2 |
Paths | 2 |
Total Lines | 14 |
Code Lines | 8 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php |
||
62 | public function addFile(string $name, string|\CURLFile $file): FormData |
||
63 | { |
||
64 | if ($file instanceof \CURLFile) { |
||
65 | $this->files[$name] = $file; |
||
66 | return $this; |
||
67 | } |
||
68 | |||
69 | $this->files[$name] = new \CURLFile( |
||
70 | realpath($file), |
||
71 | Client::get_file_type($file), |
||
72 | basename($file) |
||
73 | ); |
||
74 | |||
75 | return $this; |
||
76 | } |
||
78 | } |