Supported Versions: PHP 4, PHP 5, PHP 7, PHP 8
Find whether the type of a variable is string
<?php is_string(mixed $value): bool
<?php         }



        $extends = ObjectDeclarations::findExtendedClassName($phpcsFile, $stackPtr);

        if (empty($extends) || \is_string($extends) === false) {

            return '';

        }
<?php         if (empty($versionArray) === false) {

            foreach ($versionArray as $version => $present) {

                if (\is_string($present) === true && $this->supportsBelow($version) === true) {


                    $errorInfo['conditional_version'] = $version;

                    $errorInfo['condition']           = $present;
<?php             return false;

        }



        if (\is_string($this->functionWhitelist) === true) {

            if (\strpos($this->functionWhitelist, ',') !== false) {

                $this->functionWhitelist = \explode(',', $this->functionWhitelist);

            } else {
<?php         $scopeCloser = $class['scope_closer'];

        $className   = ObjectDeclarations::getName($phpcsFile, $stackPtr);



        if (empty($className) || \is_string($className) === false) {

            return;

        }
<?php             }



            $funcName = FunctionDeclarations::getName($phpcsFile, $nextFunc);

            if (empty($funcName) || \is_string($funcName) === false) {

                $nextFunc = $functionScopeCloser;

                continue;

            }
<?php         if (isset(BCTokens::ooScopeTokens()[$tokenCode]) === true) {

            $name = ObjectDeclarations::getName($phpcsFile, $stackPtr);



            if (isset($name) === false || \is_string($name) === false || $name === '') {

                return;

            }
<?php     public function process(File $phpcsFile, $stackPtr)

    {

        $algo = $this->getHashAlgorithmParameter($phpcsFile, $stackPtr);

        if (empty($algo) || \is_string($algo) === false) {

            return;

        }
<?php     public function process(File $phpcsFile, $stackPtr)

    {

        $algo = $this->getHashAlgorithmParameter($phpcsFile, $stackPtr);

        if (empty($algo) || \is_string($algo) === false) {

            return;

        }