Skip to content

Commit

Permalink
Enable single_line_empty_body fixer
Browse files Browse the repository at this point in the history
  • Loading branch information
Jubeki committed Jun 5, 2024
1 parent 3298bbd commit 2e7ef24
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 0 deletions.
1 change: 1 addition & 0 deletions resources/presets/laravel.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,7 @@
'single_line_comment_style' => [
'comment_types' => ['hash'],
],
'single_line_empty_body' => true,
'single_quote' => true,
'single_space_around_construct' => true,
'space_after_semicolon' => true,
Expand Down
22 changes: 22 additions & 0 deletions tests/Fixtures/fixers/single_line_empty_body.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<?php

new class
{
public function __construct(
private string $name = '',
) {}

public function function2() {}

public function function3()
{
//
}

public function function4(
string $name
)
{
//
}
};

0 comments on commit 2e7ef24

Please sign in to comment.