aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/src/downloader
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-08 04:30:56 +0900
committernsfisis <nsfisis@gmail.com>2026-06-08 04:30:56 +0900
commit7439cdb08afe0882186a34f70c1e8878fcb7dca5 (patch)
treefdae7e27e2ae107ef97735c0a8fe7d011ba1b3d5 /crates/shirabe/src/downloader
parent632c9793927a30c4bca3c91888e66b369d732dfe (diff)
downloadphp-shirabe-7439cdb08afe0882186a34f70c1e8878fcb7dca5.tar.gz
php-shirabe-7439cdb08afe0882186a34f70c1e8878fcb7dca5.tar.zst
php-shirabe-7439cdb08afe0882186a34f70c1e8878fcb7dca5.zip
feat(phase-c): resolve static-property phase-b TODOs
Implement the FileDownloader::$downloadMetadata accessors over the existing DOWNLOAD_METADATA static, and drop now-stale TODOs on the already-correct Platform::strlen function-local static and the ClassLoader include-closure no-op. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/downloader')
-rw-r--r--crates/shirabe/src/downloader/file_downloader.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/crates/shirabe/src/downloader/file_downloader.rs b/crates/shirabe/src/downloader/file_downloader.rs
index 9840cef..54b0882 100644
--- a/crates/shirabe/src/downloader/file_downloader.rs
+++ b/crates/shirabe/src/downloader/file_downloader.rs
@@ -82,14 +82,12 @@ pub struct FileDownloader {
}
impl FileDownloader {
- /// TODO(phase-b): `$downloadMetadata` is a static property in PHP; not yet mapped to Rust.
pub fn reset_download_metadata() {
- todo!("FileDownloader::reset_download_metadata")
+ DOWNLOAD_METADATA.lock().unwrap().clear();
}
- /// TODO(phase-b): `$downloadMetadata` is a static property in PHP; not yet mapped to Rust.
- pub fn download_metadata() -> indexmap::IndexMap<String, shirabe_php_shim::PhpMixed> {
- todo!("FileDownloader::download_metadata")
+ pub fn download_metadata() -> IndexMap<String, PhpMixed> {
+ DOWNLOAD_METADATA.lock().unwrap().clone()
}
/// Constructor.