Unused method, property, variable or parameter

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

  1. $this->auth = $auth;
  2. $this->model = $model;
  3. $this->preferences = new PreferenceCollection();
  4. if ($user = $this->auth->user()) {

    This user local variable is declared but never used. You should remove it.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Ryan Thompson
  5. $this->preferences = $this->model->belongingToUser($auth->getUser())->get();
  6. }
  7. }
  8. /**

Unused use statement should be avoided

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

  1. <?php namespace Anomaly\PreferencesModule\Preference\Listener;
  2. use Anomaly\PreferencesModule\Preference\Contract\PreferenceRepositoryInterface;
  3. use Illuminate\Contracts\Bus\SelfHandling;

    The class Illuminate\Contracts\Bus\SelfHandling is declared but never used. You should remove the use statement.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Ryan Thompson
  4. use Illuminate\Contracts\Config\Repository;
  5. /**
  6. * Class ConfigureSystem
  7. *