Understand Pint's PHP Code Styling Rules
3.xDuster uses Pint (which uses PHP CS Fixer under the hood) to automatically fix PHP code issues. The default style guide enforces specific rules for indentation, syntax, spacing, and structure. Common rules include:
- Array Syntax: Uses short array syntax
[1, 2]instead ofarray(1, 2). - Braces: Enforces proper placement of braces for classes, functions, and control structures.
- Namespaces: Ensures a single blank line after the namespace declaration and no spacing/comments within the namespace line.
- Imports: Uses
usestatements for global classes, functions, and constants instead of fully qualified names. - Keywords: Enforces correct casing for
true,false, andnull(lowercase) and useselseifinstead ofelse if.