Here is the code for my pint.json
file:
{
"preset": "laravel",
"rules": {
"not_operator_with_successor_space": false,
"concat_space": {
"spacing": "one"
},
"class_attributes_separation": {
"elements": {
"method": "one"
}
},
"array_syntax": {
"syntax": "short"
},
"list_syntax": {
"syntax": "long"
},
"braces": {
"position_after_functions_and_oop_constructs": "next"
}
}
}
The project has this code:
namespace App\Providers;
class SomeClass1
{
public function register(): void
{
}
}
Laravel Pint changes it to this code:
class SomeClass1
{
public function register(): void {}
}
The same goes for the class. The project has this code:
class SomeClass2
{
}
Laravel Pint changes it to this code:
class SomeClass2 {}
I do not like it. I want the formatting of empty classes and methods to look the same as non-empty ones. How can I prevent Laravel Pint from removing newlines from empty methods and classes?
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community