You are here

public function Test2::getValidators in Coder 8.2

Same name in this branch
  1. 8.2 coder_sniffer/Drupal/Test/Classes/ClassCreateInstanceUnitTest.inc \Test2::getValidators()
  2. 8.2 coder_sniffer/Drupal/Test/good/good.php \Test2::getValidators()
Same name and namespace in other branches
  1. 8.3 tests/Drupal/Classes/ClassCreateInstanceUnitTest.inc \Test2::getValidators()
  2. 8.3.x tests/Drupal/Classes/ClassCreateInstanceUnitTest.inc \Test2::getValidators()

Using PHP 7 return type hints is fine.

Return value

ValidatorInterface[] The validators.

File

coder_sniffer/Drupal/Test/Classes/ClassCreateInstanceUnitTest.inc, line 29

Class

Test2
Test class.

Code

public function getValidators() : array {
  return [
    new PublishedNodesValidator(),
    new MinimumNodesValidator($this->nrOfArticles),
    new AccessibleOnCurrentDomainValidator($this->sectionService),
  ];
}