Include statements should not be used

  • Minor
  • Architecture

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

  1. */
  2. protected function commands()
  3. {
  4. $this->load(__DIR__.'/Commands');
  5. require base_path('routes/console.php');

    Using include() or require() bypasses lazy-loading of third-party classes. Prefer using autoloading.

    Time to fix: about 3 hours
    Open Issue Permalink
    Last edited by studentneil
  6. }
  7. }

Source code should not contain TODO comments

  • Minor
  • Architecture

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

  1. getMoment = function (d) {
  2. var returnMoment;
  3. if (d === undefined || d === null) {
  4. returnMoment = moment(); //TODO should this use format? and locale?

    TODO comments are left in the code when a feature (or a bug) isn't completely developed (or fixed). You should complete the implementation and remove the comment.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by studentneil
  5. } else if (moment.isDate(d) || moment.isMoment(d)) {
  6. // If the date that is passed in is already a Date() or moment() object,
  7. // pass it directly to moment.
  8. returnMoment = moment(d);
  9. } else if (hasTimeZone()) { // There is a string to parse and a default time zone

Object parameters should be type hinted

  • Minor
  • Bugrisk

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

in routes/channels.php, line 14
  1. | application supports. The given channel authorization callbacks are
  2. | used to check if an authenticated user can listen to the channel.
  3. |
  4. */
  5. Broadcast::channel('App.User.{id}', function ($user, $id) {

    The parameter user, which is an object, should be typehinted.

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by studentneil
  6. return (int) $user->id === (int) $id;
  7. });

User specific files should not appear in .gitignore

  • Minor
  • Codestyle

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

in .gitignore, line 7
  1. /public/hot
  2. /public/storage
  3. /public/node_modules
  4. /storage/*.key
  5. /vendor
  6. /.idea

    /.idea is user-specific and should not appear in a project .gitignore. Consider adding it to the user global .gitignore instead.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by studentneil
  7. /.vagrant
  8. Homestead.json
  9. Homestead.yaml
  10. npm-debug.log
  11. yarn-error.log

Templates should not be too long

  • Minor
  • Codestyle

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

8% of all your templates have more than 200 lines, the threshold is 5%.

Time to fix: about 2 hours
Open Issue Permalink
Collective

Commented code should not be committed

  • Minor
  • Deadcode

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

  1. | redirecting them to your home screen. The controller uses a trait
  2. | to conveniently provide its functionality to your applications.
  3. |
  4. */
  5. // use AuthenticatesUsers;

    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
    Open Issue Permalink
    Last edited by studentneil
  6. /**
  7. * Where to redirect users after login.
  8. *
  9. * @var string

Text files should end with a newline character 11

  • Info
  • Codestyle

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

  1. public function getEnv($variable)
  2. {
  3. return env($variable);
  4. }
  5. }

    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
    Open Issue Permalink
    Last edited by studentneil
  1. return view('contact')->with(['sent' => false]);
  2. }
  3. }
  4. }

    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
    Open Issue Permalink
    Last edited by studentneil
  1. <a href="/logout" class="nav-link">Logout</a>
  2. </li>
  3. </ul>
  4. </div>
  5. </div>
  6. </nav><!-- end nav -->

    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
    Open Issue Permalink
    Last edited by studentneil
  1. </div>
  2. </div>
  3. </div>
  4. {% endblock %}

    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
    Open Issue Permalink
    Last edited by studentneil
  1. accessToken: '{{ get_env("MAPBOX_ACCESS_TOKEN") }}'
  2. }).addTo(mymap);
  3. var marker = L.marker([53.401472, -6.257827]).addTo(mymap);
  4. marker.bindPopup("<b>Hey!</b><br>Im right here.<br>In Northwood Gym").openPopup();
  5. </script>
  6. {% endblock %}

    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
    Open Issue Permalink
    Last edited by studentneil
  1. </div>
  2. </div>
  3. {% endblock %}

    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
    Open Issue Permalink
    Last edited by studentneil
  1. </div>
  2. </div>
  3. </div>
  4. {% endblock %}

    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
    Open Issue Permalink
    Last edited by studentneil
  1. <h1>Phil Dillon Fitness Booking Form</h1>
  2. <p>Kudos!</p>
  3. <p>You have a new message from <em>{{ bookingFormData.name }}</em></p>
  4. <p>I would like to book a fitness assessment on {{ bookingFormData.date }}</p>
  5. <p>{{ bookingFormData.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
    Open Issue Permalink
    Last edited by studentneil
  1. </div>
  2. </div>
  3. </div>
  4. </footer><!-- end footer -->

    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
    Open Issue Permalink
    Last edited by studentneil
  1. </div>
  2. </div>
  3. </div>
  4. </div><!-- end profile modal -->
  5. {% endblock %}

    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
    Open Issue Permalink
    Last edited by studentneil
  1. </div>
  2. </div>
  3. </div>
  4. {% endblock %}

    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
    Open Issue Permalink
    Last edited by studentneil

.htaccess should be avoided

  • Info
  • Performance

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

A .htaccess file has been spotted. You should consider moving it to the server configuration to improve global performances.

Time to fix: about 1 hour
Open Issue Permalink
Last edited by studentneil