Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. DeprecatedFunctionsSniff.php

function DeprecatedFunctionsSniff::__construct

Constructor.

Uses the Reflection API to get a list of deprecated functions.

File

vendor/squizlabs/php_codesniffer/src/Standards/Generic/Sniffs/PHP/DeprecatedFunctionsSniff.php, line 34

Class

DeprecatedFunctionsSniff

Namespace

PHP_CodeSniffer\Standards\Generic\Sniffs\PHP

Code

public function __construct() {
    $functions = get_defined_functions();
    foreach ($functions['internal'] as $functionName) {
        $function = new ReflectionFunction($functionName);
        if ($function->isDeprecated() === true) {
            $this->forbiddenFunctions[$functionName] = null;
        }
    }
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal