Code should not be duplicated

  • Minor
  • Architecture

More information: https://insight.symfony.com/what-we-analyse/php.duplicated_code

  1. 'dashboard.grid.reset' => 1,
  2. /* Workbench */
  3. 'workshop.modules.index' => 1,
  4. 'workshop.modules.show' => 1,
  5. 'workshop.modules.disable' => 1,
  6. 'workshop.modules.enable' => 1,

    The next 35 lines appear both in Database/Seeders/SentryGroupSeedTableSeeder.php:29 and Database/Seeders/UsherTableSeeder.php:43.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Nicolas Widart
  7. /* Roles */
  8. 'user.roles.index' => 1,
  9. 'user.roles.create' => 1,
  10. 'user.roles.store' => 1,
  11. 'user.roles.edit' => 1,

Object parameters should be type hinted

  • Minor
  • Bugrisk

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

  1. /**
  2. * Create a profile for the given user
  3. * @param $user
  4. */
  5. private function createProfileForUser($user)

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

    Time to fix: about 1 hour
    Open Issue Permalink
    Last edited by Nicolas Widart
  6. {
  7. $profileData = array_merge($this->input['profile'], ['user_id' => $user->id]);
  8. app('Modules\Profile\Repositories\ProfileRepository')->create($profileData);
  9. }
  10. }

User specific files should not appear in .gitignore

  • Minor
  • Codestyle

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

in .gitignore, line 1
  1. .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 Nicolas Widart
  2. /vendor
  3. .php_cs.cache
  4. composer.lock
  5. Modules/
  6. build