You are here

DataTypeNamespaceUnitTest.inc in Coder 8.2

Namespace

Foo\Bar

File

coder_sniffer/Drupal/Test/Commenting/DataTypeNamespaceUnitTest.inc
View source
<?php

namespace Foo\Bar;

use Some\Namespaced\TestClass;

/**
 * Test.
 */
class Test {

  /**
   * Param and Return data types should be fully namespaced.
   *
   * @param TestClass $y
   *   Some description.
   *
   * @return TestClass
   *   Yep.
   */
  public function test1(TestClass $y) {
    return $y;
  }

  /**
   * Inline var data types should be converted.
   */
  public function test2(array $x) {

    /** @var TestClass $y */
    $y = $x['test'];
    return $y;
  }

}

Classes

Namesort descending Description
Test Test.