You are here

public function RemoteAddressSniff::register in Coder 8.3.x

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

Returns an array of tokens this test wants to listen for.

Return value

array<int|string>

File

coder_sniffer/Drupal/Sniffs/Semantics/RemoteAddressSniff.php, line 32

Class

RemoteAddressSniff
Make sure that ip_address() or Drupal::request()->getClientIp() is used instead of $_SERVER['REMOTE_ADDR'].

Namespace

Drupal\Sniffs\Semantics

Code

public function register() {
  return [
    T_VARIABLE,
  ];
}