Commented code should not be committed

  • Minor
  • Deadcode

More information: https://insight.sensiolabs.com/what-we-analyse/php.commented_out_code

  1. *
  2. * @return void
  3. */
  4. // public function __construct()
  5. // {
  6. // $this->middleware('guest')->except('logout');

    Commented out code reduces readability and lowers the code confidence for other developers. If it's common usage for debug, it should not be committed. Using a version control system, such code can be safely removed.

    Time to fix: about 30 minutes
    Permalink
    Last edited by studentneil
  7. // }
  8. public function showLoginForm()
  9. {
  10. return view('login');