(StorageAdapterInterface $storage)
| 399 | } |
| 400 | |
| 401 | private static function adapterErrorDetail(StorageAdapterInterface $storage): string |
| 402 | { |
| 403 | if (method_exists($storage, 'getLastError')) { |
| 404 | $detail = trim((string)$storage->getLastError()); |
| 405 | if ($detail !== '') { |
| 406 | $detail = preg_replace('/(\\w+:\\/\\/)([^\\s@]+@)/i', '$1', $detail) ?? $detail; |
| 407 | if (strlen($detail) > 240) { |
| 408 | $detail = substr($detail, 0, 240) . '...'; |
| 409 | } |
| 410 | return $detail; |
| 411 | } |
| 412 | } |
| 413 | return ''; |
| 414 | } |
| 415 | |
| 416 | private static function ensureSeekableStream($stream, ?int $length = null): array |
| 417 | { |
no test coverage detected