MCPcopy Create free account
hub / github.com/PHPantom-dev/phpantom_lsp / is_has_factory_trait

Function is_has_factory_trait

src/inheritance.rs:1077–1080  ·  view source on GitHub ↗

Check whether a trait name is the Laravel `HasFactory` trait. Matches the FQN `Illuminate\Database\Eloquent\Factories\HasFactory` as well as the short name `HasFactory` (common in same-file tests).

(trait_name: &str)

Source from the content-addressed store, hash-verified

1075/// Matches the FQN `Illuminate\Database\Eloquent\Factories\HasFactory`
1076/// as well as the short name `HasFactory` (common in same-file tests).
1077fn is_has_factory_trait(trait_name: &str) -> bool {
1078 trait_name == "Illuminate\\Database\\Eloquent\\Factories\\HasFactory"
1079 || trait_name == "HasFactory"
1080}
1081
1082/// Check whether a parent class name is the Laravel
1083/// `Illuminate\Database\Eloquent\Factories\Factory` base class.

Callers 1

merge_traits_intoFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected