Uploaded image for project: 'phpBB'
  1. phpBB
  2. PHPBB-17619

Fix UnusedUseSniff to detect property type declarations

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Trivial Trivial
    • 4.0.0-a2
    • 4.0.0-a2
    • Test Suite
    • None

      CodeSniffer is not detecting namespaces when used in type hint for property declarations.

      So the following would be marked as an "unused USE statement"

      use Some\Namespace\MyClass;
       
      class Example
      {
          private MyClass $property;
      }
      

      The sniff needs to be updated to also check for typed properties.

            MattF Matt Friedman
            MattF Matt Friedman
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: