diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-08-06 04:22:46 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-08-06 04:23:22 +0900 |
| commit | 3d4a0cadc950d4440251efa11b55b0bfb0afdef7 (patch) | |
| tree | cf1cd680867b9aa633eafe6332b881711b738823 /crates/shirabe/src/repository | |
| parent | ce6192f1cfaac63457b173f573ada661a4665bfb (diff) | |
| download | php-shirabe-3d4a0cadc950d4440251efa11b55b0bfb0afdef7.tar.gz php-shirabe-3d4a0cadc950d4440251efa11b55b0bfb0afdef7.tar.zst php-shirabe-3d4a0cadc950d4440251efa11b55b0bfb0afdef7.zip | |
chore: drop @param/@return tags that only restate Rust types
The ported docblocks copied @param and @return straight from the PHP
source. When such a tag carries nothing but a type and an argument name,
the Rust signature already states it, so the line is noise. Tags whose
text adds prose beyond the type are kept.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/repository')
7 files changed, 0 insertions, 51 deletions
diff --git a/crates/shirabe/src/repository/array_repository.rs b/crates/shirabe/src/repository/array_repository.rs index c05434fc..ed48b0cb 100644 --- a/crates/shirabe/src/repository/array_repository.rs +++ b/crates/shirabe/src/repository/array_repository.rs @@ -116,7 +116,6 @@ impl ArrayRepository { Ok(packages) } - /// @param array<PackageInterface> $packages pub fn new(packages: Vec<PackageInterfaceHandle>) -> anyhow::Result<Self> { let this = Self { packages: std::cell::RefCell::new(None), @@ -158,7 +157,6 @@ impl ArrayRepository { Ok(()) } - /// @return AliasPackage|CompleteAliasPackage pub(crate) fn create_alias_package( &self, package: BasePackageHandle, diff --git a/crates/shirabe/src/repository/filesystem_repository.rs b/crates/shirabe/src/repository/filesystem_repository.rs index b8ee30c6..7ecd0664 100644 --- a/crates/shirabe/src/repository/filesystem_repository.rs +++ b/crates/shirabe/src/repository/filesystem_repository.rs @@ -381,7 +381,6 @@ impl FilesystemRepository { true } - /// @param array<mixed> $array fn dump_to_php_code(&self, array: &IndexMap<String, PhpMixed>, level: i64) -> String { let mut lines = String::from("array(\n"); let level = level + 1; @@ -448,7 +447,6 @@ impl FilesystemRepository { lines } - /// @param array<string, string> $installPaths fn generate_installed_versions( &mut self, installation_manager: &dyn InstallationManagerInterface, @@ -612,9 +610,6 @@ impl FilesystemRepository { Ok(versions) } - /// @param array<string, string> $installPaths - /// @param array<string, int> $devPackages - /// @return array{pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev_requirement: bool} fn dump_installed_package( &self, package: PackageInterfaceHandle, @@ -693,9 +688,6 @@ impl FilesystemRepository { data } - /// @param array<string, string> $installPaths - /// @param array<string, int> $devPackages - /// @return array{name: string, pretty_version: string, version: string, reference: string|null, type: string, install_path: string, aliases: string[], dev: bool} fn dump_root_package( &self, package: RootPackageInterfaceHandle, diff --git a/crates/shirabe/src/repository/repository_set.rs b/crates/shirabe/src/repository/repository_set.rs index 8443400f..def73f14 100644 --- a/crates/shirabe/src/repository/repository_set.rs +++ b/crates/shirabe/src/repository/repository_set.rs @@ -89,15 +89,9 @@ impl RepositorySet { /// passing minimumStability is all you need to worry about. The rest is for advanced pool creation including /// aliases, pinned references and other special cases. /// - /// @param key-of<BasePackage::STABILITIES> $minimumStability /// @param int[] $stabilityFlags an array of package name => BasePackage::STABILITY_* value - /// @phpstan-param array<string, BasePackage::STABILITY_*> $stabilityFlags - /// @param array[] $rootAliases - /// @phpstan-param list<array{package: string, version: string, alias: string, alias_normalized: string}> $rootAliases /// @param string[] $rootReferences an array of package name => source reference - /// @phpstan-param array<string, string> $rootReferences /// @param ConstraintInterface[] $rootRequires an array of package name => constraint from the root package - /// @phpstan-param array<string, ConstraintInterface> $rootRequires /// @param array<string, ConstraintInterface> $temporaryConstraints Runtime temporary constraints that will be used to filter packages pub fn new( minimum_stability: &str, @@ -144,7 +138,6 @@ impl RepositorySet { } /// @return ConstraintInterface[] an array of package name => constraint from the root package, platform requirements excluded - /// @phpstan-return array<string, ConstraintInterface> pub fn get_root_requires(&self) -> &IndexMap<String, AnyConstraint> { &self.root_requires } @@ -191,7 +184,6 @@ impl RepositorySet { /// Returned in the order of repositories, matching priority /// /// @param int $flags any of the ALLOW_* constants from this class to tweak what is returned - /// @return BasePackage[] pub fn find_packages( &self, name: &str, @@ -268,8 +260,6 @@ impl RepositorySet { Ok(result) } - /// @param string[] $packageNames - /// @return ($allowPartialAdvisories is true ? array{advisories: array<string, array<PartialSecurityAdvisory|SecurityAdvisory>>, unreachableRepos: array<string>} : array{advisories: array<string, array<SecurityAdvisory>>, unreachableRepos: array<string>}) pub fn get_security_advisories( &self, package_names: Vec<String>, @@ -295,8 +285,6 @@ impl RepositorySet { }) } - /// @param PackageInterface[] $packages - /// @return ($allowPartialAdvisories is true ? array{advisories: array<string, array<PartialSecurityAdvisory|SecurityAdvisory>>, unreachableRepos: array<string>} : array{advisories: array<string, array<SecurityAdvisory>>, unreachableRepos: array<string>}) #[tracing::instrument(skip_all)] pub fn get_matching_security_advisories( &self, @@ -354,9 +342,7 @@ impl RepositorySet { }) } - /// @param array<string, ConstraintInterface> $packageConstraintMap /// @param array<string> &$unreachableRepos Array to store messages about unreachable repositories - /// @return ($allowPartialAdvisories is true ? array<string, array<PartialSecurityAdvisory|SecurityAdvisory>> : array<string, array<SecurityAdvisory>>) fn get_security_advisories_for_constraints( &self, package_constraint_map: IndexMap<String, AnyConstraint>, @@ -417,7 +403,6 @@ impl RepositorySet { } /// @return array[] an array with the provider name as key and value of array('name' => '...', 'description' => '...', 'type' => '...') - /// @phpstan-return array<string, array{name: string, description: string|null, type: string}> pub fn get_providers( &self, package_name: &str, @@ -435,7 +420,6 @@ impl RepositorySet { /// Check for each given package name whether it would be accepted by this RepositorySet in the given $stability /// - /// @param string[] $names /// @param key-of<BasePackage::STABILITIES> $stability one of 'stable', 'RC', 'beta', 'alpha' or 'dev' pub fn is_package_acceptable(&self, names: &[String], stability: &str) -> bool { StabilityFilter::is_package_acceptable( @@ -588,7 +572,6 @@ impl RepositorySet { self.create_pool_for_packages(vec![package_name.to_string()], locked_repo) } - /// @param string[] $packageNames pub fn create_pool_for_packages( &mut self, package_names: Vec<String>, @@ -625,10 +608,6 @@ impl RepositorySet { ) } - /// @param array[] $aliases - /// @phpstan-param list<array{package: string, version: string, alias: string, alias_normalized: string}> $aliases - /// - /// @return array<string, array<string, array{alias: string, alias_normalized: string}>> fn get_root_aliases_per_package( aliases: Vec<RootAliasInput>, ) -> IndexMap<String, IndexMap<String, RootAliasEntry>> { diff --git a/crates/shirabe/src/repository/vcs/git_bitbucket_driver.rs b/crates/shirabe/src/repository/vcs/git_bitbucket_driver.rs index 394077e9..87cf7c44 100644 --- a/crates/shirabe/src/repository/vcs/git_bitbucket_driver.rs +++ b/crates/shirabe/src/repository/vcs/git_bitbucket_driver.rs @@ -741,7 +741,6 @@ impl GitBitbucketDriver { /// @phpstan-impure /// - /// @return true /// @throws \RuntimeException fn attempt_clone_fallback(&mut self) -> anyhow::Result<bool> { match self.setup_fallback_driver(&self.generate_ssh_url()) { @@ -775,7 +774,6 @@ impl GitBitbucketDriver { Ok(()) } - /// @param array<array{name: string, href: string}> $cloneLinks fn parse_clone_urls(&mut self, clone_links: Option<PhpMixed>) { let list = match clone_links { Some(PhpMixed::List(l)) => l, diff --git a/crates/shirabe/src/repository/vcs/github_driver.rs b/crates/shirabe/src/repository/vcs/github_driver.rs index 8134a16b..c7b84e51 100644 --- a/crates/shirabe/src/repository/vcs/github_driver.rs +++ b/crates/shirabe/src/repository/vcs/github_driver.rs @@ -416,7 +416,6 @@ impl GitHubDriver { .unwrap_or(None)) } - /// @return array<int, array{type: string, url: string}>|false fn get_funding_info(&mut self) -> PhpMixed { if let Some(ref info) = self.funding_info { return info.clone(); @@ -996,8 +995,6 @@ impl GitHubDriver { } /// Gives back the loaded <github-api>/repos/<owner>/<repo> result - /// - /// @return mixed[]|null pub fn get_repo_data(&mut self) -> anyhow::Result<Option<IndexMap<String, PhpMixed>>> { self.fetch_root_identifier()?; @@ -1234,7 +1231,6 @@ impl GitHubDriver { /// @phpstan-impure /// - /// @return true /// @throws \RuntimeException pub(crate) fn attempt_clone_fallback( &mut self, diff --git a/crates/shirabe/src/repository/vcs/gitlab_driver.rs b/crates/shirabe/src/repository/vcs/gitlab_driver.rs index 9a4c22a1..35d0b5ca 100644 --- a/crates/shirabe/src/repository/vcs/gitlab_driver.rs +++ b/crates/shirabe/src/repository/vcs/gitlab_driver.rs @@ -721,7 +721,6 @@ impl GitLabDriver { /// @phpstan-impure /// - /// @return true /// @throws \RuntimeException pub(crate) fn attempt_clone_fallback(&mut self) -> anyhow::Result<bool> { let url = if !self.is_private { @@ -1030,8 +1029,6 @@ impl GitLabDriver { } /// Gives back the loaded <gitlab-api>/projects/<owner>/<repo> result - /// - /// @return mixed[]|null pub fn get_repo_data(&mut self) -> anyhow::Result<Option<IndexMap<String, PhpMixed>>> { self.fetch_project()?; @@ -1061,10 +1058,6 @@ impl GitLabDriver { None } - /// @param array<string> $configuredDomains - /// @param array<string> $urlParts - /// - /// @return string|false fn determine_origin( configured_domains: &PhpMixed, guessed_domain: String, diff --git a/crates/shirabe/src/repository/vcs_repository.rs b/crates/shirabe/src/repository/vcs_repository.rs index 7ce00ce5..059d4dbd 100644 --- a/crates/shirabe/src/repository/vcs_repository.rs +++ b/crates/shirabe/src/repository/vcs_repository.rs @@ -265,12 +265,10 @@ impl VcsRepository { self.branch_error_occurred.get() } - /// @return list<string> pub fn get_empty_references(&self) -> Vec<String> { self.empty_references.borrow().clone() } - /// @return array<'tags'|'branches', array<string, TransportException>> pub fn get_version_transport_exceptions( &self, ) -> IndexMap<String, IndexMap<String, TransportException>> { @@ -835,9 +833,6 @@ impl VcsRepository { Ok(()) } - /// @param array{name?: string, dist?: array{type: string, url: string, reference: string, shasum: string}, source?: array{type: string, url: string, reference: string}} $data - /// - /// @return array{name: string|null, dist: array{type: string, url: string, reference: string, shasum: string}|null, source: array{type: string, url: string, reference: string}} fn pre_process( &self, driver: &dyn VcsDriverInterface, @@ -916,7 +911,6 @@ impl VcsRepository { Ok(data) } - /// @return string|false fn validate_branch(&self, branch: &str) -> Option<String> { let result = self .version_parser @@ -941,7 +935,6 @@ impl VcsRepository { None } - /// @return string|false fn validate_tag(&self, version: &str) -> Option<String> { self.version_parser .borrow() |
