pub struct PhpFormatter;Expand description
PHP code formatter implementing PSR-4, PSR-12, and PSR-7 standards
This formatter generates PHP code that adheres to PHP Standards Recommendations, ensuring consistency across the spikard toolkit. It handles proper namespace declarations, type safety via declare statements, and organized imports.
Implementations§
Source§impl PhpFormatter
impl PhpFormatter
Trait Implementations§
Source§impl Clone for PhpFormatter
impl Clone for PhpFormatter
Source§fn clone(&self) -> PhpFormatter
fn clone(&self) -> PhpFormatter
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PhpFormatter
impl Debug for PhpFormatter
Source§impl Default for PhpFormatter
impl Default for PhpFormatter
Source§impl Formatter for PhpFormatter
impl Formatter for PhpFormatter
Source§fn format_header(&self, metadata: &HeaderMetadata) -> String
fn format_header(&self, metadata: &HeaderMetadata) -> String
Format a file header with metadata about auto-generation Read more
Source§fn format_imports(&self, imports: &[Import]) -> String
fn format_imports(&self, imports: &[Import]) -> String
Format import/require/use statements Read more
Auto Trait Implementations§
impl Freeze for PhpFormatter
impl RefUnwindSafe for PhpFormatter
impl Send for PhpFormatter
impl Sync for PhpFormatter
impl Unpin for PhpFormatter
impl UnsafeUnpin for PhpFormatter
impl UnwindSafe for PhpFormatter
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