Hi! Whenever I enabled the "PHP" extension, my code started formatting weirdly, and the only connecting link I can find is the ij_php_blank_lines_around_method = 1 in .editorconfig - but I'm unsure if this extension really should read this? I can't find anything about it in the docs.
With all default VSCode settings and this PHP as input:
Input
<?php
function foo()
{
$doubled = array_map(
fn(int $number) => $number * 2,
[1, 2, 3],
);
}
function bar($id)
{
$doubled = array_map(
fn(int $number) => $number * 2,
[1, 2, 3],
);
}
What I got from formatting the code
<?php
function foo()
{
$doubled = array_map(
fn(int $number) => $number * 2,
[1, 2, 3],
);
}
function bar($id)
{
$doubled = array_map(
fn(int $number) => $number * 2,
[1, 2, 3],
);
}
Expected output
<?php
function foo()
{
$doubled = array_map(
fn(int $number) => $number * 2,
[1, 2, 3],
);
}
function bar($id)
{
$doubled = array_map(
fn(int $number) => $number * 2,
[1, 2, 3],
);
}
TLDR:
I would not expect it to create a blank line before the anonymous function - but the line only between the 2 function declarations.
Hi! Whenever I enabled the "PHP" extension, my code started formatting weirdly, and the only connecting link I can find is the
ij_php_blank_lines_around_method = 1in.editorconfig- but I'm unsure if this extension really should read this? I can't find anything about it in the docs.With all default VSCode settings and this PHP as input:
Input
What I got from formatting the code
Expected output
TLDR:
I would not expect it to create a blank line before the anonymous function - but the line only between the 2 function declarations.