diff options
| author | nsfisis <nsfisis@gmail.com> | 2026-08-11 23:28:40 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2026-08-11 23:28:40 +0900 |
| commit | 38621c67917fd015f884ea04517791cdc5058c6d (patch) | |
| tree | 03f466e2db22a3bc45e20e4f9694eb371a59b0e1 /crates/shirabe/src/advisory | |
| parent | 73ab00d3108933c952844b3820f44230c8203807 (diff) | |
| download | php-shirabe-38621c67917fd015f884ea04517791cdc5058c6d.tar.gz php-shirabe-38621c67917fd015f884ea04517791cdc5058c6d.tar.zst php-shirabe-38621c67917fd015f884ea04517791cdc5058c6d.zip | |
chore(php-shim): drop the substring predicate ports
str_contains(), str_starts_with() and str_ends_with() were thin wrappers
over the str methods of the same semantics. Call sites now use
contains()/starts_with()/ends_with() directly.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/src/advisory')
| -rw-r--r-- | crates/shirabe/src/advisory/auditor.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/shirabe/src/advisory/auditor.rs b/crates/shirabe/src/advisory/auditor.rs index 3c00d09e..40a8d53c 100644 --- a/crates/shirabe/src/advisory/auditor.rs +++ b/crates/shirabe/src/advisory/auditor.rs @@ -15,7 +15,7 @@ use indexmap::IndexMap; use shirabe_pcre::Preg; use shirabe_php_shim::{ DATE_ATOM, InvalidArgumentException, PhpMixed, array_all, array_any, array_key_exists, - array_keys, array_reduce, get_class, str_starts_with, + array_keys, array_reduce, get_class, }; use shirabe_symfony_console::formatter::OutputFormatter; @@ -266,7 +266,7 @@ impl Auditor { let ignored_ids = array_keys(ignore_list); - array_any(&ignored_ids, |id: &String| !str_starts_with(id, "PKSA-")) + array_any(&ignored_ids, |id: &String| !id.starts_with("PKSA-")) } pub fn filter_abandoned_packages( @@ -656,7 +656,7 @@ impl Auditor { fn get_advisory_id(&self, advisory: &SecurityAdvisory) -> String { let advisory_id = advisory.advisory_id(); - if str_starts_with(advisory_id, "PKSA-") { + if advisory_id.starts_with("PKSA-") { return format!( "<href=https://packagist.org/security-advisories/{}>{}</>", advisory_id, advisory_id |
