Commented code should not be committed 2

  • Minor
  • Deadcode

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

in routes/web.php, line 28
  1. Route::get('/admin/dashboard', function() {
  2. return view('dashboard');
  3. });
  4. //Auth::routes();
  5. //Route::get('/home', 'HomeController@index')->name('home');

    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
  6. Route::prefix('admin')->group(function () {
  7. Route::resource('camps', 'CampController');
  8. });
in routes/web.php, line 26
  1. Route::get('/logout', 'LoginController@logoutAction');
  2. Route::post('/auth', 'LoginController@authenticate');
  3. Route::get('/admin/dashboard', function() {
  4. return view('dashboard');
  5. });
  6. //Auth::routes();

    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. //Route::get('/home', 'HomeController@index')->name('home');
  8. Route::prefix('admin')->group(function () {
  9. Route::resource('camps', 'CampController');

Text files should end with a newline character

  • Info
  • Codestyle

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

  1. <h1>Phil Dillon Fitness Booking Form</h1>
  2. <p>Kudos! You have a new message from {{ request.name }}</p>
  3. <p>I want the {{ request.date }}</p>
  4. <p>{{ request.message }}</p>

    This file ends with no newline character. It won't render properly on a terminal, and it's considered a bad practice. Add a simple line feed as the last character to fix it.

    Time to fix: about 15 minutes
    Permalink
    Last edited by studentneil