You are here

public function PregSecuritySniff::registerFunctionNames in Coder 8.3

Same name and namespace in other branches
  1. 8.2 coder_sniffer/Drupal/Sniffs/Semantics/PregSecuritySniff.php \Drupal\Sniffs\Semantics\PregSecuritySniff::registerFunctionNames()
  2. 8.3.x coder_sniffer/Drupal/Sniffs/Semantics/PregSecuritySniff.php \Drupal\Sniffs\Semantics\PregSecuritySniff::registerFunctionNames()

Returns an array of function names this test wants to listen for.

Return value

array<string>

File

coder_sniffer/Drupal/Sniffs/Semantics/PregSecuritySniff.php, line 31

Class

PregSecuritySniff
Check the usage of the preg functions to ensure the insecure /e flag isn't used: https://www.drupal.org/node/750148

Namespace

Drupal\Sniffs\Semantics

Code

public function registerFunctionNames() {
  return [
    'preg_filter',
    'preg_grep',
    'preg_match',
    'preg_match_all',
    'preg_replace',
    'preg_replace_callback',
    'preg_split',
  ];
}