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 Anomaly\Streams\Platform\Addon\Addon;
  4. use Anomaly\Streams\Platform\Addon\AddonCollection;
  5. 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
  6. use Illuminate\Contracts\Config\Repository;
  7. /**
  8. * Class ConfigureSystem
  9. *

Text files should end with a valid new line character. 6

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

  1. 'plugins' => 'Beépülők',
  2. 'modules' => 'Modulok',
  3. 'extensions' => 'Kiegészítők',
  4. 'field_types' => 'Mező Típusok',
  5. ],
  6. ];

    This file ends with no newline character, or with a different newline character than other files in your project. It won't render properly on a terminal, and it's considered a bad practice.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by kiger
  1. <?php
  2. return [
  3. 'env_locked' => 'A beállítások zárolva vannak.',
  4. ];

    This file ends with no newline character, or with a different newline character than other files in your project. It won't render properly on a terminal, and it's considered a bad practice.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by kiger
  1. 'name' => 'Beállítások',
  2. 'option' => [
  3. 'write' => 'Létrehozhat és szerkeszthet beállításokat?',
  4. ],
  5. ],
  6. ];

    This file ends with no newline character, or with a different newline character than other files in your project. It won't render properly on a terminal, and it's considered a bad practice.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by kiger
  1. 'plugins' => 'Plugin',
  2. 'modules' => 'Moduli',
  3. 'extensions' => 'Estensioni',
  4. 'field_types' => 'Field Type',
  5. ],
  6. ];

    This file ends with no newline character, or with a different newline character than other files in your project. It won't render properly on a terminal, and it's considered a bad practice.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Christian Giupponi
  1. <?php
  2. return [
  3. 'env_locked' => 'Questa impostazione è bloccata.',
  4. ];

    This file ends with no newline character, or with a different newline character than other files in your project. It won't render properly on a terminal, and it's considered a bad practice.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Christian Giupponi
  1. 'name' => 'Impostazioni',
  2. 'option' => [
  3. 'write' => 'Può creare o modificare le preferenze?',
  4. ],
  5. ],
  6. ];

    This file ends with no newline character, or with a different newline character than other files in your project. It won't render properly on a terminal, and it's considered a bad practice.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Christian Giupponi

Methods and properties visibility should always be explicitly defined

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

New rule! We've recently added this rule to Insight. Don't be surprised to see new suggestions even though the codebase didn't change.
  1. * Create a new ModifyValue instance.
  2. *
  3. * @param PreferenceInterface $preference
  4. * @param $value
  5. */
  6. function __construct(PreferenceInterface $preference, $value)

    This method has no explicit visibility which may lead to maintainability issues. You should always declare a visibility for methods and properties.

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Ryan Thompson
  7. {
  8. $this->value = $value;
  9. $this->preference = $preference;
  10. }