Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Make a string lowercase
<?php strtolower(string $string): string
<?php $tokens = $phpcsFile->getTokens();
$function = $tokens[$stackPtr]['content'];
$functionLc = \strtolower($function);
if (isset($this->targetFunctions[$functionLc]) === false) {
return;
<?php }
$functionName = $tokens[$stackPtr]['content'];
$functionNameLc = \strtolower($functionName);
if (isset($this->hashAlgoFunctions[$functionNameLc]) === false) {
<?php }
return TextStrings::stripQuotes(\strtolower($algoParam['raw']));
}
}
<?php }
$patterns = [];
$functionNameLc = \strtolower($functionName);
if ($functionNameLc === 'preg_replace_callback_array') {
<?php public function stringToErrorCode($baseString)
{
return \preg_replace('`[^a-z0-9_]`i', '_', \strtolower($baseString));
}
<?php }
$className = \substr($FQClassName, 1); // Remove global namespace indicator.
$classNameLc = \strtolower($className);
if (isset($this->newClasses[$classNameLc]) === false) {
return;
<?php foreach ($typeHints as $hint) {
$typeHintLc = \strtolower($hint);
if (isset($this->newClasses[$typeHintLc]) === true) {
$itemInfo = [
<?php }
$name = \ltrim($name, '\\');
$nameLC = \strtolower($name);
if (isset($this->newExceptions[$nameLC]) === true) {
$itemInfo = [
<?php }
$returnTypeHint = \ltrim($returnTypeHint, '\\');
$returnTypeHintLc = \strtolower($returnTypeHint);
if (isset($this->newClasses[$returnTypeHintLc]) === false) {
return;
<?php $type = \ltrim($properties['type'], '?'); // Trim off potential nullability.
$type = \strtolower($type);
$typeToken = $properties['type_token'];
if ($this->supportsBelow('7.3') === true) {
<?php }
$className = \substr($FQClassName, 1); // Remove global namespace indicator.
$classNameLc = \strtolower($className);
if (isset($this->removedClasses[$classNameLc]) === false) {
return;
<?php foreach ($typeHints as $hint) {
$typeHintLc = \strtolower($hint);
if (isset($this->removedClasses[$typeHintLc]) === true) {
$itemInfo = [
<?php }
$name = \ltrim($name, '\\');
$nameLC = \strtolower($name);
if (isset($this->removedExceptions[$nameLC]) === true) {
$itemInfo = [
<?php }
$returnTypeHint = \ltrim($returnTypeHint, '\\');
$returnTypeHintLc = \strtolower($returnTypeHint);
if (isset($this->removedClasses[$returnTypeHintLc]) === false) {
return;
<?php $tokens = $phpcsFile->getTokens();
if (\strtolower($tokens[$stackPtr]['content']) !== 'class') {
return;
}