(array $src)
| 155 | } |
| 156 | |
| 157 | private static function uploadRootForSource(array $src): string |
| 158 | { |
| 159 | $type = strtolower((string)($src['type'] ?? 'local')); |
| 160 | $cfg = is_array($src['config'] ?? null) ? $src['config'] : []; |
| 161 | |
| 162 | if ($type === 'local') { |
| 163 | $path = (string)($cfg['path'] ?? ''); |
| 164 | if ($path !== '') { |
| 165 | return rtrim($path, "/\\") . DIRECTORY_SEPARATOR; |
| 166 | } |
| 167 | } |
| 168 | |
| 169 | return rtrim((string)UPLOAD_DIR, "/\\") . DIRECTORY_SEPARATOR; |
| 170 | } |
| 171 | |
| 172 | public static function trashRoot(): string |
| 173 | { |
no outgoing calls
no test coverage detected