#[repr(u8)]pub enum FileType {
Host = 0,
Vendored = 1,
Builtin = 2,
Patch = 3,
External = 4,
}Expand description
Distinguishes between the origins of source files.
Variants§
Host = 0
The file is part of the primary project source code. These files typically reside on the filesystem and are actively developed.
Vendored = 1
The file belongs to a third-party dependency (e.g., a Composer package).
These files exist on the filesystem within the project (e.g., in vendor/)
but are not considered part of the primary source code.
Builtin = 2
The file represents a built-in language construct (e.g., a core PHP function or class). These “files” do not exist on the filesystem and their content is typically provided as pre-defined stubs for analysis.
Patch = 3
The file is a user-provided patch that overrides type information for vendored or built-in code with corrected PHPDoc / type declarations. Like vendored files, patches are not actively analyzed, linted, or formatted, but their metadata takes precedence over both vendored and built-in definitions.
External = 4
An in-memory source contributed by an external analyzer plugin during initialization. External files are scanned for symbols, but are never analyzed, linted, formatted, or fixed.
Implementations§
Source§impl FileType
impl FileType
Sourcepub const fn is_host(self) -> bool
pub const fn is_host(self) -> bool
Returns true if the file is a host file, meaning it is part of the project’s source code.
Sourcepub const fn is_vendored(self) -> bool
pub const fn is_vendored(self) -> bool
Returns true if the file is a vendored file, meaning it comes from an external library or dependency.
Sourcepub const fn is_builtin(self) -> bool
pub const fn is_builtin(self) -> bool
Returns true if the file is a built-in file, meaning it represents a core language construct.
Sourcepub const fn is_patch(self) -> bool
pub const fn is_patch(self) -> bool
Returns true if the file is a patch, meaning it overrides type information for vendored or built-in code.
Sourcepub const fn is_external(self) -> bool
pub const fn is_external(self) -> bool
Returns true if the file is an in-memory source contributed by an external analyzer plugin.
Trait Implementations§
impl Copy for FileType
impl Eq for FileType
Source§impl Ord for FileType
impl Ord for FileType
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialOrd for FileType
impl PartialOrd for FileType
impl StructuralPartialEq for FileType
Auto Trait Implementations§
impl Freeze for FileType
impl RefUnwindSafe for FileType
impl Send for FileType
impl Sync for FileType
impl Unpin for FileType
impl UnsafeUnpin for FileType
impl UnwindSafe for FileType
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more