NetBeansのPSRでエラー
NetBeansでLaravelのソースを書いていたら、Lalasniffの記述チェックで
The closing brace for the class must go on the next line after the body
というメッセージが出てしまった。
これは閉じカッコ前に空行があるので間違っている。
<?php class User extends \Eloquent { public static $rules = []; protected $guarded = ['id']; 【ここに空行がある】 }
NetBeansの「ツール」⇒「オプション」⇒「エディタ」⇒「空行」⇒「フィールドの後」と「クラス終了の前」を0にして自動整形すれば、エラーは消える。