Formatter

Configuration

The formatter can be configured inside of the pxp.json file using a sub-object named fmt. This page documents the available configuration options.

Warning! fmt is currently in development and will be available with v1.0.0 of PXP.

fmt.castSpaces

When enabled, a space will be placed after any casts.

(int) "1"; 
(int)"1";  

fmt.logicalNotTrailingSpace

When enabled, logical NOT operators (!) will have a single trailing space.

$bool = ! foo(); 
$bool = !foo();  

fmt.concatSurroundingSpace

When enabled, concatenation operators (.) will have a leading and trailing space.

'Hello, ' . $name; 
'Hello, '.$name;