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

Breadcrumb

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

function Helpers::getIntOrNull

*

Parameters

int|bool $value: * * @return ?int

7 calls to Helpers::getIntOrNull()
Helpers::findContainingOpeningSquareBracket in vendor/sirbrillig/phpcs-variable-analysis/VariableAnalysis/Lib/Helpers.php
* Find the position of the square bracket containing the token at $stackPtr, * if any. * *
Helpers::getFunctionIndexForFunctionCallArgument in vendor/sirbrillig/phpcs-variable-analysis/VariableAnalysis/Lib/Helpers.php
* Find the index of the function keyword for a token in a function call's arguments * * For the variable `$foo` in the expression `doSomething($foo)`, this will * return the index of the `doSomething` token. * *
Helpers::getFunctionIndexForFunctionParameter in vendor/sirbrillig/phpcs-variable-analysis/VariableAnalysis/Lib/Helpers.php
* Find the index of the function keyword for a token in a function * definition's parameters. * * Does not work for tokens inside the "use". * * Will also work for the parenthesis that make up the function definition's …
Helpers::getUseIndexForUseImport in vendor/sirbrillig/phpcs-variable-analysis/VariableAnalysis/Lib/Helpers.php
* Find the token index of the "use" for a token inside a function use import * *
Helpers::isVariableArrayPushShortcut in vendor/sirbrillig/phpcs-variable-analysis/VariableAnalysis/Lib/Helpers.php
*

... See full list

File

vendor/sirbrillig/phpcs-variable-analysis/VariableAnalysis/Lib/Helpers.php, line 35

Class

Helpers

Namespace

VariableAnalysis\Lib

Code

public static function getIntOrNull($value) {
    return is_int($value) ? $value : null;
}

API Navigation

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