pub struct PhpExtractor;Implementations§
Source§impl PhpExtractor
impl PhpExtractor
Sourcepub fn extract_routes(&self, source: &str, file_path: &str) -> Vec<Route>
pub fn extract_routes(&self, source: &str, file_path: &str) -> Vec<Route>
Extract Laravel routes from a routes/*.php file.
Sourcepub fn extract_parent_class_imports(
source: &str,
test_dir: &str,
) -> Vec<(String, Vec<String>)>
pub fn extract_parent_class_imports( source: &str, test_dir: &str, ) -> Vec<(String, Vec<String>)>
Extract import specifiers from the parent class of a test file.
Resolves the parent class to a file in the same directory, reads it,
and returns its raw use statements (unfiltered).
Only traces 1 level deep (direct parent only).
Sourcepub fn map_test_files_with_imports(
&self,
production_files: &[String],
test_sources: &HashMap<String, String>,
scan_root: &Path,
l1_exclusive: bool,
) -> Vec<FileMapping>
pub fn map_test_files_with_imports( &self, production_files: &[String], test_sources: &HashMap<String, String>, scan_root: &Path, l1_exclusive: bool, ) -> Vec<FileMapping>
Layer 1 + Layer 2 (PSR-4): Map test files to production files.
Trait Implementations§
Source§impl Default for PhpExtractor
impl Default for PhpExtractor
Source§impl LanguageExtractor for PhpExtractor
impl LanguageExtractor for PhpExtractor
fn extract_test_functions( &self, source: &str, file_path: &str, ) -> Vec<TestFunction>
Source§fn extract_file_analysis(&self, source: &str, file_path: &str) -> FileAnalysis
fn extract_file_analysis(&self, source: &str, file_path: &str) -> FileAnalysis
Extract file-level analysis including imports and parameterized test counts.
Default impl delegates to
extract_test_functions with file-level fields as false/0.
Language extractors MUST override this to provide accurate detection.Source§impl ObserveExtractor for PhpExtractor
impl ObserveExtractor for PhpExtractor
fn extract_production_functions( &self, source: &str, file_path: &str, ) -> Vec<ProductionFunction>
fn extract_imports(&self, _source: &str, _file_path: &str) -> Vec<ImportMapping>
fn extract_all_import_specifiers( &self, source: &str, ) -> Vec<(String, Vec<String>)>
fn extract_barrel_re_exports( &self, _source: &str, _file_path: &str, ) -> Vec<BarrelReExport>
fn source_extensions(&self) -> &[&str]
fn index_file_names(&self) -> &[&str]
fn production_stem<'a>(&self, path: &'a str) -> Option<&'a str>
fn test_stem<'a>(&self, path: &'a str) -> Option<&'a str>
fn is_non_sut_helper(&self, file_path: &str, is_known_production: bool) -> bool
fn is_barrel_file(&self, path: &str) -> bool
fn file_exports_any_symbol(&self, _path: &Path, _symbols: &[String]) -> bool
fn resolve_alias_imports( &self, _source: &str, _scan_root: &Path, ) -> Vec<(String, Vec<String>, Option<PathBuf>)>
Auto Trait Implementations§
impl Freeze for PhpExtractor
impl RefUnwindSafe for PhpExtractor
impl Send for PhpExtractor
impl Sync for PhpExtractor
impl Unpin for PhpExtractor
impl UnsafeUnpin for PhpExtractor
impl UnwindSafe for PhpExtractor
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more