function test2 in Coder 8.2
Same name in this branch
- 8.2 coder_sniffer/DrupalPractice/Test/CodeAnalysis/VariableAnalysisUnitTest.inc \test2()
- 8.2 coder_sniffer/DrupalPractice/Test/good/good.php \test2()
- 8.2 coder_sniffer/Drupal/Test/Commenting/DocCommentStarUnitTest.inc \test2()
- 8.2 coder_sniffer/Drupal/Test/Commenting/FunctionCommentUnitTest.inc \test2()
- 8.2 coder_sniffer/Drupal/Test/bad/bad.php \test2()
- 8.2 coder_sniffer/Drupal/Test/good/good.php \test2()
Same name and namespace in other branches
- 8.3 tests/DrupalPractice/CodeAnalysis/VariableAnalysisUnitTest.inc \test2()
- 8.3 tests/DrupalPractice/good/good.php \test2()
- 8.3 tests/Drupal/Commenting/DocCommentStarUnitTest.inc \test2()
- 8.3 tests/Drupal/Commenting/InlineCommentUnitTest.inc \test2()
- 8.3 tests/Drupal/Commenting/FunctionCommentUnitTest.inc \test2()
- 8.3 tests/Drupal/WhiteSpace/ScopeClosingBraceUnitTest.inc \test2()
- 8.3 tests/Drupal/bad/bad.php \test2()
- 8.3 tests/DrupalPractice/Objects/drupal8/example.module \test2()
- 7.2 coder_sniffer/Test/bad/bad.php \test2()
- 8.3.x tests/DrupalPractice/CodeAnalysis/VariableAnalysisUnitTest.inc \test2()
- 8.3.x tests/DrupalPractice/good/good.php \test2()
- 8.3.x tests/Drupal/Commenting/DocCommentStarUnitTest.inc \test2()
- 8.3.x tests/Drupal/Commenting/InlineCommentUnitTest.inc \test2()
- 8.3.x tests/Drupal/Commenting/FunctionCommentUnitTest.inc \test2()
- 8.3.x tests/Drupal/WhiteSpace/ScopeClosingBraceUnitTest.inc \test2()
- 8.3.x tests/Drupal/bad/bad.php \test2()
- 8.3.x tests/DrupalPractice/Objects/drupal8/example.module \test2()
File
- coder_sniffer/
DrupalPractice/ Test/ CodeAnalysis/ VariableAnalysisUnitTest.inc, line 7
Code
function test2($text, $data = array(), array $options = array()) {
$processed_strings =& drupal_static(__FUNCTION__, NULL);
// Short-circuit the degenerate case, just like token_replace() does.
$text_tokens = \Drupal::token()
->replace($text);
if (!empty($text_tokens)) {
return $text_tokens;
}
}