From 3d4a0cadc950d4440251efa11b55b0bfb0afdef7 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Thu, 6 Aug 2026 04:22:46 +0900 Subject: 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) --- crates/shirabe/src/util/perforce.rs | 15 --------------- 1 file changed, 15 deletions(-) (limited to 'crates/shirabe/src/util/perforce.rs') diff --git a/crates/shirabe/src/util/perforce.rs b/crates/shirabe/src/util/perforce.rs index e2591301..ac455fc7 100644 --- a/crates/shirabe/src/util/perforce.rs +++ b/crates/shirabe/src/util/perforce.rs @@ -37,7 +37,6 @@ pub struct Perforce { } impl Perforce { - /// @phpstan-param RepoConfig $repoConfig pub fn new( repo_config: IndexMap, port: String, @@ -69,7 +68,6 @@ impl Perforce { this } - /// @phpstan-param RepoConfig $repoConfig pub fn create( repo_config: IndexMap, port: String, @@ -95,7 +93,6 @@ impl Perforce { ) == 0 } - /// @phpstan-param RepoConfig $repoConfig pub fn initialize(&mut self, repo_config: &IndexMap) { self.unique_perforce_client_name = self.generate_unique_perforce_client_name(); if repo_config.is_empty() { @@ -133,7 +130,6 @@ impl Perforce { } } - /// @return non-empty-string pub fn generate_unique_perforce_client_name(&self) -> String { format!("{}_{}", gethostname(), time()) } @@ -151,7 +147,6 @@ impl Perforce { file_system.borrow_mut().remove(&client_spec); } - /// @param non-empty-string|non-empty-list $command pub(crate) fn execute_command(&mut self, command: PhpMixed) -> i64 { self.command_result = String::new(); @@ -239,7 +234,6 @@ impl Perforce { } } - /// @return non-empty-string pub fn get_p4_client_spec(&mut self) -> String { let path = self.path.clone(); format!("{}/{}.p4.spec", path, self.get_client()) @@ -333,7 +327,6 @@ impl Perforce { /// @internal /// @param non-empty-list $arguments Additional arguments for git rev-list - /// @return non-empty-list pub fn generate_p4_command(&mut self, arguments: Vec, use_client: bool) -> Vec { let mut p4_command: Vec = vec![Self::get_p4_executable()]; if self.get_user().is_some() { @@ -415,7 +408,6 @@ impl Perforce { Ok(()) } - /// @param resource|false $spec pub fn write_client_spec_to_file(&mut self, spec: &PhpResource) { fwrite( spec, @@ -527,8 +519,6 @@ impl Perforce { Ok(()) } - /// @param resource $pipe - /// @param mixed $name pub(crate) fn read(&self, pipe: &PhpResource, _name: PhpMixed) { if feof(pipe) { return; @@ -590,7 +580,6 @@ impl Perforce { Ok(()) } - /// @return mixed[]|null pub fn get_composer_information( &mut self, identifier: &str, @@ -663,7 +652,6 @@ impl Perforce { None } - /// @return array{master: string} pub fn get_branches(&mut self) -> IndexMap { let mut possible_branches: IndexMap = IndexMap::new(); if !self.is_stream() { @@ -725,7 +713,6 @@ impl Perforce { result } - /// @return array pub fn get_tags(&mut self) -> IndexMap { let command = self.generate_p4_command(vec!["labels".to_string()], true); self.execute_command(PhpMixed::List( @@ -771,7 +758,6 @@ impl Perforce { false } - /// @return mixed|null pub(crate) fn get_change_list(&mut self, reference: &str) -> Option { let index = strpos(reference, "@")?; let label = substr(reference, index as i64, None); @@ -789,7 +775,6 @@ impl Perforce { Some(fields.get(1).cloned().unwrap_or_default()) } - /// @return mixed|null pub fn get_commit_logs(&mut self, from_reference: &str, to_reference: &str) -> Option { let from_change_list = self.get_change_list(from_reference)?; let to_change_list = self.get_change_list(to_reference)?; -- cgit v1.3.1