Customize Formatting

Respecting specific coding guidelines is crucial for maintaining a consistent codebase. In case the Code Style does not fit your needs, you can customize specific formatting rules.

The settings bellow override behaviour set with the "php.format.codestyle" style.

  • Settings: php.format.rules.*
  • License: PREMIUM.

Customize Settings in VS Code Settings UI

custom format settings UI

Browse through all the custom rules in Visual Studio Code Settings UI. Open command palette (Ctrl+Shift+P) and type Preferences: Open User Settings (UI). Then search for php.format and you will see all the available settings, including examples.

Indentation

IndentBraces: Gets value indicating whether to indent braces

  • setting: php.format.rules.indentBraces
  • .editorconfig directive: php_format_indent_braces
function foo()
    {
    echo "Hello";
    }
function foo()
{
    echo "Hello";
}
true false

Spacing

Space after cast: Insert a space after a cast operator.

  • setting: php.format.rules.spaceAfterCast
  • .editorconfig directive: php_format_space_after_cast
$x = (int) $obj;
$x = (int)$obj;
true false

Space after unary not !: Insert a space after a unary not operator.

  • setting: php.format.rules.spaceAfterUnaryNot
  • .editorconfig directive: php_format_space_after_unary_not
$x = ! $obj;
$x = !$obj;
true false

Space around concatenation .: Insert a space around concatenation operator.

  • setting: php.format.rules.spaceAroundConcatenation
  • .editorconfig directive: php_format_space_around_concatenation
$x = $str1 . $str2;
$x = $str1.$str2;
true false

Space before colon : in control flow statements: Insert a space before colon in control flow blocks.

  • setting: php.format.rules.spaceBeforeColonInControlStatements
  • .editorconfig directive: php_format_space_before_colon_in_control_statements
if (true) :
endif;
if (true):
endif;
true false

Space before colon : in return type: Insert a space before colon in a return type

  • setting: php.format.rules.spaceBeforeColonInReturnType
  • .editorconfig directive: php_format_space_before_colon_in_return_type
function foo() : int {
}
function foo(): int {
}
true false

Space before parentheses in arrow functions: Insert a space before arrow function parentheses.

  • setting: php.format.rules.spaceBeforeParenthesesInArrowFunctions
  • .editorconfig directive: php_format_space_before_parentheses_in_arrow_functions
$x = fn () => 1;
$x = fn() => 1;
true false

Space before parentheses in function calls: Insert a space before parentheses in method, function and constructor call parentheses.

  • setting: php.format.rules.spaceBeforeParenthesesInCalls
  • .editorconfig directive: php_format_space_before_parentheses_in_calls
foo ();
foo();
true false

Space before parentheses in control statements: Insert a space before parentheses in control statements.

  • setting: php.format.rules.spaceBeforeParenthesesInControlStatements
  • .editorconfig directive: php_format_space_before_parentheses_in_control_statements
if (true)
{
}
if(true)
{
}
true false

Space before parentheses in declarations: Insert a space before parentheses in method, function and constructor declaration parentheses.

  • setting: php.format.rules.spaceBeforeParenthesesInDeclarations
  • .editorconfig directive: php_format_space_before_parentheses_in_declarations
function foo ()
{
}
function foo()
{
}
true false

Space within array initializer parentheses: Insert a space within array initializer parentheses.

  • setting: php.format.rules.spaceWithinArrayInitilizersParens
  • .editorconfig directive: php_format_space_within_array_initilizers_parens
$x = array( 1 => "first", 2 => "second" );
$x = array(1 => "first", 2 => "second");
true false

Space within brackets []: Insert a space within brackets.

  • setting: php.format.rules.spaceWithinBrackets
  • .editorconfig directive: php_format_space_within_brackets
$y = $x[ 1 ];
$y = $x[1];
true false

Space within brackets [] around expression: Insert a space within brackets around expression.

  • setting: php.format.rules.spaceWithinBracketsAroundExpression
  • .editorconfig directive: php_format_space_within_brackets_around_expression
$y = $x[ $i + 1 ];
$y = $x[$i + 1];
true false

Space within call parentheses: Insert a space within method, function and constructor call parentheses.

  • setting: php.format.rules.spaceWithinCallParens
  • .editorconfig directive: php_format_space_within_call_parens
foo( 1, 2 );
foo(1, 2);
true false

Space within catch parentheses: Insert a space within catch statement header parentheses.

  • setting: php.format.rules.spaceWithinCatchParens
  • .editorconfig directive: php_format_space_within_catch_parens
try { } catch ( Exception ) { }
try { } catch (Exception) { }
true false

Space within declaration parentheses: Insert a space within method, function and constructor declaration parentheses.

  • setting: php.format.rules.spaceWithinDeclParens
  • .editorconfig directive: php_format_space_within_decl_parens
function foo( $x, $y ) { }
function foo($x, $y) { }
true false

Space within parentheses around expression: Insert a space within parentheses around expression.

  • setting: php.format.rules.spaceWithinExpressionParens
  • .editorconfig directive: php_format_space_within_expression_parens
$x = ( 1 + 2 );
$x = (1 + 2);
true false

Space within for parentheses: Insert a space within for statement header parentheses.

  • setting: php.format.rules.spaceWithinForParens
  • .editorconfig directive: php_format_space_within_for_parens
for ( $i = 0; $i < 100; $i++ ) { }
for ($i = 0; $i < 100; $i++) { }
true false

Space within foreach parentheses: Insert a space within foreach statement header parentheses.

  • setting: php.format.rules.spaceWithinForeachParens
  • .editorconfig directive: php_format_space_within_foreach_parens
foreach ( $expr as $key => $value ) { }
foreach ($expr as $key => $value) { }
true false

Space within if parentheses: Insert a space within if statement header parentheses.

  • setting: php.format.rules.spaceWithinIfParens
  • .editorconfig directive: php_format_space_within_if_parens
if ( true ) { }
if (true) { }
true false

Space within switch parentheses: Insert a space within switch statement header parentheses.

  • setting: php.format.rules.spaceWithinSwitchParens
  • .editorconfig directive: php_format_space_within_switch_parens
switch ( $x ) { }
switch ($x) { }
true false

Space within while parentheses: Insert a space within while statement header parentheses.

  • setting: php.format.rules.spaceWithinWhileParens
  • .editorconfig directive: php_format_space_within_while_parens
while ( $a != $b ) { }
while ($a != $b) { }
true false

NewLines

catch on a new line: Place catch on a new line.

  • setting: php.format.rules.catchOnNewLine
  • .editorconfig directive: php_format_catch_on_new_line
try
{
}
catch
{
}
finally
{
}
try
{
} catch
{
}
finally
{
}
true false

else on a new line: Place else on a new line.

  • setting: php.format.rules.elseOnNewLine
  • .editorconfig directive: php_format_else_on_new_line
if (true)
{
}
else
{
}
if (true)
{
} else
{
}
true false

Insert final newline: Inserts final newline at the end of a file.

  • setting: php.format.rules.endWithNewLine
  • .editorconfig directive: php_format_end_with_new_line

finally on a new line: Place finally on a new line.

  • setting: php.format.rules.finallyOnNewLine
  • .editorconfig directive: php_format_finally_on_new_line
try
{
}
catch
{
}
finally
{
}
try
{
} 
catch
{
} finally
{
}
true false

Open brace on a new line for anonymous classes: Place open brace { on a new line for anonymous classes.

  • setting: php.format.rules.openBraceOnNewLineForAnonymousClasses
  • .editorconfig directive: php_format_open_brace_on_new_line_for_anonymous_classes
$c = new class extends \Foo implements
    \ArrayAccess
{
};
$c = new class extends \Foo implements
    \ArrayAccess {
};
true false

Open brace on a new line for blocks: Place open brace { on a new line for all types of code blocks, except for those controlled by other formatting rules.

  • setting: php.format.rules.openBraceOnNewLineForBlocks
  • .editorconfig directive: php_format_open_brace_on_new_line_for_blocks
if (true)
{
}
if (true) {
}
true false

Open brace on a new line for functions: Place open brace { on a new line for methods, functions and constructors.

  • setting: php.format.rules.openBraceOnNewLineForFunctions
  • .editorconfig directive: php_format_open_brace_on_new_line_for_functions
function foo()
{
}
function foo() {
}
true false

Open brace on a new line for lambda functions: Place open brace { on a new line for lambda functions.

  • setting: php.format.rules.openBraceOnNewLineForLambdas
  • .editorconfig directive: php_format_open_brace_on_new_line_for_lambdas
$lambda = function ()
{
}
$lambda = function () {
}
true false

Open brace on a new line for namespaces: Place open brace { on a new line for namespace declarations.

  • setting: php.format.rules.openBraceOnNewLineForNamespaces
  • .editorconfig directive: php_format_open_brace_on_new_line_for_namespaces
namespace A
{
}
namespace A {
}
true false

Open brace on a new line for types: Place open brace { on a new line for types.

  • setting: php.format.rules.openBraceOnNewLineForTypes
  • .editorconfig directive: php_format_open_brace_on_new_line_for_types
class X extends \Foo implements
    \ArrayAccess 
{
}
class X extends \Foo implements
    \ArrayAccess {
}
true false

Wrapping

Align consecutive = assignments.: Automatically align consecutive = assignments.

  • setting: php.format.rules.alignConsecutiveAssignments
  • .editorconfig directive: php_format_align_consecutive_assignments
$a     = 1;
$bbb   = 2;
$ccccc = 3;
$a = 1;
$bbb = 2;
$ccccc = 3;
true false

Align constants: Automatically align constant declarations

  • setting: php.format.rules.alignConstants
  • .editorconfig directive: php_format_align_constants
class X {
    const a   = 1;
    const bb  = 2;
    const ccc = 3;
}
class X {
    const a = 1;
    const bb = 2;
    const ccc = 3;
}
true false

Align enum cases: Automatically align assigned values in backed enumerations

  • setting: php.format.rules.alignEnumCases
  • .editorconfig directive: php_format_align_enum_cases
enum X {
    case a   = 1;
    case bb  = 2;
    case ccc = 3;
}
enum X {
    case a = 1;
    case bb = 2;
    case ccc = 3;
}
true false

Align match arm bodies: Automatically align the bodies (results) within match expression arms

  • setting: php.format.rules.alignMatchArmBodies
  • .editorconfig directive: php_format_align_match_arm_bodies
match ($day) {
    'Monday'    => 'Work',
    'Tuesday'   => 'Tacos',
    'Wednesday' => 'Waffles'
};
match ($day) {
    'Monday' => 'Work',
    'Tuesday' => 'Tacos',
    'Wednesday' => 'Waffles'
};
true false

Align properties: Automatically align properties declarations

  • setting: php.format.rules.alignProperties
  • .editorconfig directive: php_format_align_properties
class X {
    var       $a   = 1;
    public    $bb  = 2;
    protected $ccc = 3;
}
class X {
    var $a = 1;
    public $bb = 2;
    protected $ccc = 3;
}
true false

Align key-value pairs: Automatically align => operators.

  • setting: php.format.rules.arrayInitializersAlignKeyValuePairs
  • .editorconfig directive: php_format_array_initializers_align_key_value_pairs
$x = [
    1    => 'foo',
    1234 => 'bar'
];
$x = [
    1 => 'foo',
    1234 => 'bar'
];
true false

New line after last element: Place a new line after the last element when wrapping.

  • setting: php.format.rules.arrayInitializersNewLineAfterLastElement
  • .editorconfig directive: php_format_array_initializers_new_line_after_last_element
$x = [
    1,
    2
];
$x = [
    1, 
    2];
true false

New line before first element: Place a new line before the first array element when wrapping.

  • setting: php.format.rules.arrayInitializersNewLineBeforeFirstElement
  • .editorconfig directive: php_format_array_initializers_new_line_before_first_element
$x = [
    1,
    2
];
$x = [1, 
    2
];
true false

Wrap: _Defines wrapping behavior for array initializers.

  • Off - No wrapping is applied

  • On every item - When this option is selected each item is placed on a new line and properly indented if the array initializer is split across multiple lines. _

  • setting: php.format.rules.arrayInitializersWrap

  • .editorconfig directive: php_format_array_initializers_wrap

New line after (: Place a new line after the left opening parenthesis ( when wrapping.

  • setting: php.format.rules.callParametersNewLineAfterLeftParen
  • .editorconfig directive: php_format_call_parameters_new_line_after_left_paren
foo(
    1,
    2
);
foo(1,
    2
);
true false

New line before ): Place a new line before the right closing parenthesis ) when wrapping.

  • setting: php.format.rules.callParametersNewLineBeforeRightParen
  • .editorconfig directive: php_format_call_parameters_new_line_before_right_paren
foo(
    1,
    2
);
foo(
    1,
    2);
true false

Wrap: _Defines wrapping behavior for method, function and constructor call parameters.

  • Off - No wrapping is applied

  • On every item - When this option is selected each item is placed on a new line and properly indented if the call arguments are split across multiple lines. _

  • setting: php.format.rules.callParametersWrap

  • .editorconfig directive: php_format_call_parameters_wrap

; on a new line: Place ; on a new line after the last element in the chained method call when wrapping.

  • setting: php.format.rules.chainedMethodCallsSemicolonOnNewLine
  • .editorconfig directive: php_format_chained_method_calls_semicolon_on_new_line
$x->aaa()
    ->bbb()
;
$x->aaa()
    ->bbb();
true false

Wrap: _Defines wrapping behavior for chained method calls.

  • Off - No wrapping is applied

  • Always - When this option is selected each method call is placed on a new line and properly indented. _

  • setting: php.format.rules.chainedMethodCallsWrap

  • .editorconfig directive: php_format_chained_method_calls_wrap

Compact empty body into {}: Transform empty body into {} and keep it at the same line as a previous symbol, separated by single space.

  • setting: php.format.rules.declCompactEmptyBody
  • .editorconfig directive: php_format_decl_compact_empty_body
function foo(
    $x,
    $y
) {}
function foo(
    $x,
    $y
)
{
}
true false

Keep ) and { on one line: Keep the right closing parenthesis ) of a function or method declaration header on the one line as opening brace of the body {.

  • setting: php.format.rules.declKeepRightParenAndOpenBraceOnOneLine
  • .editorconfig directive: php_format_decl_keep_right_paren_and_open_brace_on_one_line
function foo(
    $x,
    $y
) {
}
function foo(
    $x,
    $y
)
{
}
true false

New line after (: Place a new line after the left opening parenthesis ( of function or method declaration header when wrapping.

  • setting: php.format.rules.declParametersNewLineAfterLeftParen
  • .editorconfig directive: php_format_decl_parameters_new_line_after_left_paren
function foo(
    $x,
    $y
) {
}
function foo($x,
    $y
) {
}
true false

New line before ): Place a new line before the right closing parenthesis ) of a function or method declaration header when wrapping.

  • setting: php.format.rules.declParametersNewLineBeforeRightParen
  • .editorconfig directive: php_format_decl_parameters_new_line_before_right_paren
function foo(
    $x,
    $y
) {
}
function foo(
    $x,
    $y) {
}
true false

Wrap: _Defines wrapping behavior for method or function declaration parameters.

  • Off - No wrapping is applied

  • On every item - When this option is selected each declaration parameter is placed on a new line and properly indented if the arguments are split across multiple lines. _

  • setting: php.format.rules.declParametersWrap

  • .editorconfig directive: php_format_decl_parameters_wrap

New line after (: Place a new line after the left opening parenthesis ( in a for statement header if it's split across multiple lines.

  • setting: php.format.rules.forStatementNewLineAfterLeftParen
  • .editorconfig directive: php_format_for_statement_new_line_after_left_paren
for(
    $i = 0; 
    $i < 100;
    $i++
) {
}
for($i = 0; 
    $i < 100;
    $i++
) {
}
true false

New line before ): Place a new line after the right closing parenthesis ) in a for statement header if it's split across multiple lines.

  • setting: php.format.rules.forStatementNewLineBeforeRightParen
  • .editorconfig directive: php_format_for_statement_new_line_before_right_paren
for(
    $i = 0; 
    $i < 100;
    $i++
) {
}
for($i = 0; 
    $i < 100;
    $i++
) {
}
true false

Wrap: _Defines wrapping behavior for for statement.

  • Off - No wrapping is applied

  • On every item - When this option is selected each item in for statement is placed on a new line and properly indented if they are split across multiple lines. _

  • setting: php.format.rules.forStatementWrap

  • .editorconfig directive: php_format_for_statement_wrap

New line before first group use declaration: Place a new line before first group use declaration if the list of declarations is split across multiple lines.

  • setting: php.format.rules.groupUseNewLineBeforeFirstDeclaration
  • .editorconfig directive: php_format_group_use_new_line_before_first_declaration
use Vendor\pkg\ns\{
    ns1\A,
    ns2\B,
};
use Vendor\pkg\ns\{ns1\A,
    ns2\B,
};
true false

Wrap: _Defines wrapping behavior for group use list in type declarations.

  • Off - No wrapping is applied

  • On every item - When this option is selected each declaration in group use list is placed on a new line and properly indented if they are split across multiple lines. _

  • setting: php.format.rules.groupUseWrap

  • .editorconfig directive: php_format_group_use_wrap

New line after (: Place a new line after the left opening parenthesis ( in a if or elseif statement header if it's split across multiple lines.

  • setting: php.format.rules.ifStatementNewLineAfterLeftParen
  • .editorconfig directive: php_format_if_statement_new_line_after_left_paren
if(
    true
) {
}
if(true
) {
}
true false

New line before ): Place a new line after the right closing parenthesis ) in a if or elseif statement header if it's split across multiple lines.

  • setting: php.format.rules.ifStatementNewLineBeforeRightParen
  • .editorconfig directive: php_format_if_statement_new_line_before_right_paren
if(
    true
) {
}
if(
    true) {
}
true false

Wrap: _Defines wrapping behavior for implements list in type declarations.

  • Off - No wrapping is applied

  • On every item - When this option is selected each interface in implements list is placed on a new line and properly indented if they are split across multiple lines. _

  • setting: php.format.rules.implementsListWrap

  • .editorconfig directive: php_format_implements_list_wrap

Heredoc/Nowdoc Content Indentation: Ensures heredoc and nowdoc content lines are indented one level past the declaration's scope.

  • setting: php.format.rules.indentHeredoc
  • .editorconfig directive: php_format_indent_heredoc

function example() {
    $var = <<<HEREDOC
        content
    HEREDOC;
}

function example() {
    $var = <<<HEREDOC
content
HEREDOC;
}
true false

Inline Heredoc/Nowdoc Declaration: Place heredoc and nowdoc on the same line as declaring variable

  • setting: php.format.rules.inlineHeredoc
  • .editorconfig directive: php_format_inline_heredoc
$var = <<<HEREDOC
    This is a heredoc.
HEREDOC;
$var =
<<<HEREDOC
    This is a heredoc.
HEREDOC;
true false

Keep classes on one line: Clasess are kept on one line.

  • setting: php.format.rules.keepClassesOnOneLine
  • .editorconfig directive: php_format_keep_classes_on_one_line
class x { }
class x {
}
true false

Keep control statements on one line: Control statements are kept on one line.

  • setting: php.format.rules.keepControlStatementsOnOneLine
  • .editorconfig directive: php_format_keep_control_statements_on_one_line
if ($x) return;
if ($x)
    return;
true false

Keep functions on one line: Functions and methods are kept on one line.

  • setting: php.format.rules.keepFunctionsOnOneLine
  • .editorconfig directive: php_format_keep_functions_on_one_line
function foo() { return 1; }
function foo() {
    return 1;
}
true false

New line after implements: Place a new line after implements in type declaration if the list of interfaces is split across multiple lines.

  • setting: php.format.rules.newLineAfterImplements
  • .editorconfig directive: php_format_new_line_after_implements
class X implements
    A,
    B,
    C
{
}
class X implements A, 
    B, 
    C
{
}
true false

New line after (: Place a new line after the left opening parenthesis ( in a switch statement header if it's split across multiple lines.

  • setting: php.format.rules.switchStatementNewLineAfterLeftParen
  • .editorconfig directive: php_format_switch_statement_new_line_after_left_paren
switch(
    $x
) {
}
switch($x
) {
}
true false

New line before ): Place a new line after the right closing parenthesis ) in a switch statement header if it's split across multiple lines.

  • setting: php.format.rules.switchStatementNewLineBeforeRightParen
  • .editorconfig directive: php_format_switch_statement_new_line_before_right_paren
switch(
    $x
) {
}
switch(
    $x) {
}
true false

New line after (: Place a new line after the left opening parenthesis ( in a while statement header if it's split across multiple lines.

  • setting: php.format.rules.whileStatementNewLineAfterLeftParen
  • .editorconfig directive: php_format_while_statement_new_line_after_left_paren
while(
    $x == 2
) {
}
while($x == 2
) {
}
true false

New line before ): Place a new line after the right closing parenthesis ) in a while statement header if it's split across multiple lines.

  • setting: php.format.rules.whileStatementNewLineBeforeRightParen
  • .editorconfig directive: php_format_while_statement_new_line_before_right_paren
while(
    $x == 2
) {
}
while(
    $x == 2) {
}
true false

Conversions

Add a comma after the last array element: Automatically adds a comma after the last array element if it's not on a single line.

  • setting: php.format.rules.addCommaAfterLastArrayElement
  • .editorconfig directive: php_format_add_comma_after_last_array_element

Add a comma after the last function call parameters: Automatically adds a comma after the last function call parameter if it's not on a single line.

  • setting: php.format.rules.addCommaAfterLastCallParameter
  • .editorconfig directive: php_format_add_comma_after_last_call_parameter

Add a comma after the last function declaration parameters: Automatically adds a comma after the last function or method declaration parameter if it's not on a single line.

  • setting: php.format.rules.addCommaAfterLastDeclParameter
  • .editorconfig directive: php_format_add_comma_after_last_decl_parameter

Boolean constant casing: _Defines casing for true and false constants.

  • uppercase - Changes the casing to upper case

  • lowercase - Changes the casing to lower case

  • keep - Keeps the original casing _

  • setting: php.format.rules.booleanConstantCasing

  • .editorconfig directive: php_format_boolean_constant_casing

true, false
TRUE, FALSE
lowercase uppercase

Null constant casing: _Defines casing for null constant.

  • uppercase - Changes the casing to upper case

  • lowercase - Changes the casing to lower case

  • keep - Keeps the original casing _

  • setting: php.format.rules.nullConstantCasing

  • .editorconfig directive: php_format_null_constant_casing

null
NULL
lowercase uppercase

BlankLines

Blank lines after class: Defines the number of blank lines after a class declaration.

  • setting: php.format.rules.blankLinesAfterClass
  • .editorconfig directive: php_format_blank_lines_after_class

Blank lines after class body: Defines the number of blank lines after a class body.

  • setting: php.format.rules.blankLinesAfterClassBody
  • .editorconfig directive: php_format_blank_lines_after_class_body

Blank lines after function: Defines the number of blank lines after a function declaration.

  • setting: php.format.rules.blankLinesAfterFunction
  • .editorconfig directive: php_format_blank_lines_after_function

Blank lines after method: Defines the number of blank lines after a method declaration.

  • setting: php.format.rules.blankLinesAfterMethod
  • .editorconfig directive: php_format_blank_lines_after_method

Blank lines after namespace: Defines the number of blank lines after a namespace declaration.

  • setting: php.format.rules.blankLinesAfterNamespace
  • .editorconfig directive: php_format_blank_lines_after_namespace

Blank lines after use statements: Defines the number of blank lines after 'use' statements.

  • setting: php.format.rules.blankLinesAfterUseStatements
  • .editorconfig directive: php_format_blank_lines_after_use_statements

Blank lines before class: Defines the number of blank lines before a class declaration.

  • setting: php.format.rules.blankLinesBeforeClass
  • .editorconfig directive: php_format_blank_lines_before_class

Blank lines before class body: Defines the number of blank lines before a class body.

  • setting: php.format.rules.blankLinesBeforeClassBody
  • .editorconfig directive: php_format_blank_lines_before_class_body

Blank lines before function: Defines the number of blank lines before a function declaration.

  • setting: php.format.rules.blankLinesBeforeFunction
  • .editorconfig directive: php_format_blank_lines_before_function

Blank lines before function body: Defines the number of blank lines before a function body.

  • setting: php.format.rules.blankLinesBeforeFunctionBody
  • .editorconfig directive: php_format_blank_lines_before_function_body

Blank lines before method: Defines the number of blank lines before a method declaration.

  • setting: php.format.rules.blankLinesBeforeMethod
  • .editorconfig directive: php_format_blank_lines_before_method

Blank lines before method body: Defines the number of blank lines before a method body.

  • setting: php.format.rules.blankLinesBeforeMethodBody
  • .editorconfig directive: php_format_blank_lines_before_method_body

Blank lines before namespace: Defines the number of blank lines before a namespace declaration.

  • setting: php.format.rules.blankLinesBeforeNamespace
  • .editorconfig directive: php_format_blank_lines_before_namespace

Blank lines before use statements: Defines the number of blank lines before 'use' statements.

  • setting: php.format.rules.blankLinesBeforeUseStatements
  • .editorconfig directive: php_format_blank_lines_before_use_statements

Maximum blank lines in code: Defines the maximum number of consecutive blank lines allowed in the code.

  • setting: php.format.rules.maxBlankLines
  • .editorconfig directive: php_format_max_blank_lines