You are here

class Test2 in Coder 8.3

Same name in this branch
  1. 8.3 tests/Drupal/Commenting/FunctionCommentUnitTest.inc \Test2
  2. 8.3 tests/Drupal/Classes/ClassCreateInstanceUnitTest.inc \Test2
Same name and namespace in other branches
  1. 8.2 coder_sniffer/Drupal/Test/Commenting/FunctionCommentUnitTest.inc \Test2
  2. 8.2 coder_sniffer/Drupal/Test/Classes/ClassCreateInstanceUnitTest.inc \Test2
  3. 8.2 coder_sniffer/Drupal/Test/good/good.php \Test2
  4. 8.3.x tests/Drupal/Commenting/FunctionCommentUnitTest.inc \Test2
  5. 8.3.x tests/Drupal/Classes/ClassCreateInstanceUnitTest.inc \Test2

Test class.

Hierarchy

Expanded class hierarchy of Test2

File

tests/Drupal/Classes/ClassCreateInstanceUnitTest.inc, line 21

View source
class Test2 {

  /**
   * Using PHP 7 return type hints is fine.
   *
   * @return ValidatorInterface[]
   *   The validators.
   */
  public function getValidators() : array {
    return [
      new PublishedNodesValidator(),
      new MinimumNodesValidator($this->nrOfArticles),
      new AccessibleOnCurrentDomainValidator($this->sectionService),
    ];
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Test2::getValidators public function Using PHP 7 return type hints is fine.