MCPcopy Create free account
hub / github.com/error311/FileRise / adapterErrorDetail

Method adapterErrorDetail

src/FileRise/Domain/FileModel.php:401–414  ·  view source on GitHub ↗
(StorageAdapterInterface $storage)

Source from the content-addressed store, hash-verified

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 {

Callers 4

deleteFilesMethod · 0.95
createFileMethod · 0.95

Calls 1

getLastErrorMethod · 0.45

Tested by

no test coverage detected