Error silenced by the at sign (@)

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

  1. $this->name = $name;
  2. }
  3. public function getValue()
  4. {
  5. return @unserialize($this->value);

    Adding "@" before unserialize($this->value) prevents warning and errors during this function execution from being displayed.
    If you need to do that, you should probably implement a better way to qualify and recover from errors, using Exceptions.

    Time to fix: about 4 hours
    Open Issue Permalink
    Last edited by Craig Heydenburg
  6. }
  7. public function setValue($value): void
  8. {
  9. $this->value = serialize($value);
  • guite

    Ignored on Thu, 13 Jul 2017 13:51:55 GMT

Unused method, property, variable or parameter

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

  1. }
  2. $permOrder = $request->request->get('permorder');
  3. $amountOfPermOrderValues = count($permOrder);
  4. for ($cnt = 0; $cnt < $amountOfPermOrderValues; $cnt++) {
  5. $permission = $permissionRepository->find($permOrder[$cnt]);
  6. $permission['sequence'] = $cnt + 1;

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

    Time to fix: about 15 minutes
    Open Issue Permalink
    Last edited by Craig Heydenburg
  7. }
  8. $this->getDoctrine()->getManager()->flush();
  9. return $this->json(['result' => true]);
  10. }
  • guite

    Ignored on Fri, 14 Jul 2017 14:50:41 GMT