Pages

2023年3月6日月曜日

[PHP Code Sniffer] The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line

エラー内容

ERROR | [x] The closing parenthesis and the opening brace of a multi-line function declaration must be on the same line

) と { は同一行に書きなさい!!


修正前

public function sampleFunc(

    int $bookId,

    string $bookName

): ?BookEntity

{

  // ...

}


修正後

public function sampleFunc(

    int $bookId,

    string $bookName

): ?BookEntity {

  // ...

}

Followers