Methods and properties visibility should always be explicitly defined 3

  • Info
  • Readability

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. * @author jg
  2. */
  3. interface HandlerInterface
  4. {
  5. function setOutput($output);

    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 Joao Gilberto Magalhães
  6. function setHeader();
  7. function execute(ServiceAbstract $class);
  8. }
  1. interface HandlerInterface
  2. {
  3. function setOutput($output);
  4. function setHeader();

    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 Joao Gilberto Magalhães
  5. function execute(ServiceAbstract $class);
  6. }
  1. function setOutput($output);
  2. function setHeader();
  3. function execute(ServiceAbstract $class);

    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 Joao Gilberto Magalhães
  4. }