You are here

class Pum in Coder 8.2

Same name in this branch
  1. 8.2 coder_sniffer/Drupal/Test/Commenting/FileCommentUnitTest.7.inc \Pum
  2. 8.2 coder_sniffer/Drupal/Test/Commenting/FileCommentUnitTest.6.inc \Blah\Pum
  3. 8.2 coder_sniffer/Drupal/Test/Classes/UnusedUseStatementUnitTest.inc \MyNamespace\Depth\Pum
Same name and namespace in other branches
  1. 8.3 tests/Drupal/Classes/UnusedUseStatementUnitTest.inc \MyNamespace\Depth\Pum
  2. 8.3.x tests/Drupal/Classes/UnusedUseStatementUnitTest.inc \MyNamespace\Depth\Pum

Bla.

Hierarchy

  • class \MyNamespace\Depth\Pum uses \Test\TraitTest, \Test\AnotherTrait

Expanded class hierarchy of Pum

File

coder_sniffer/Drupal/Test/Classes/UnusedUseStatementUnitTest.inc, line 25

Namespace

MyNamespace\Depth
View source
class Pum {
  use TraitTest;
  use Test\AnotherTrait;

  /**
   * This data type should be fixed to be fully qualified.
   *
   * @var VarName
   */
  protected $x;

  /**
   * Aliased type that is otherwise unused.
   *
   * @var AliasVarName2
   */
  protected $y;

  /**
   * Description.
   */
  protected function test(ActuallyUsed $x, UsedOtherName $y) {
  }

  /**
   * Description.
   */
  protected function test2(\Thing\NotUsed $x) {
  }

  /**
   * PHP is not case sensitive.
   */
  protected function test3(MyURLHelper $x) {
  }

  /**
   * Don't need to use classes in the same namespace.
   */
  protected function test4(UnusedSameNamespace $x, AnotherUnusedSameNamespace $y) {
  }

  /**
   * Renamed class from same namespace.
   */
  protected function test5(CoreSomeClass $x) {
  }

  /**
   * Inline var declarations should also get fixed to the full namespace.
   */
  protected function test6($x) {

    /** @var VarName $y */
    $y = $x['test'];

    /** @var AliasVarName2 $z */
    $z = $x['test2'];
    return $y;
  }

  /**
   * Return declarations should also get fixed to the full namespace.
   *
   * @param array $x
   *   Some array.
   *
   * @return VarName
   *   The variable.
   */
  protected function test7($x) {
    return $x['test'];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Pum::$x protected property This data type should be fixed to be fully qualified.
Pum::$y protected property Aliased type that is otherwise unused.
Pum::test protected function Description.
Pum::test2 protected function Description.
Pum::test3 protected function PHP is not case sensitive.
Pum::test4 protected function Don't need to use classes in the same namespace.
Pum::test5 protected function Renamed class from same namespace.
Pum::test6 protected function Inline var declarations should also get fixed to the full namespace.
Pum::test7 protected function Return declarations should also get fixed to the full namespace.