public function Test2::getValidators in Coder 8.3
Same name and namespace in other branches
- 8.2 coder_sniffer/Drupal/Test/Classes/ClassCreateInstanceUnitTest.inc \Test2::getValidators()
- 8.2 coder_sniffer/Drupal/Test/good/good.php \Test2::getValidators()
- 8.3.x tests/Drupal/Classes/ClassCreateInstanceUnitTest.inc \Test2::getValidators()
Using PHP 7 return type hints is fine.
Return value
ValidatorInterface[] The validators.
File
- tests/
Drupal/ 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),
];
}