etc/phpstan/DynamicReturnType.php
protected function getScopeDescription(Scope $scope) : string {
        if ($scope->isInClass()) {
            $description = $scope->getClassReflection()->getName();
            if ($scope->getFunctionName())       $description .= '::'.$scope->getFunctionName().'()';
            if ($scope->isInAnonymousFunction()) $description .= '{closure}';
            return $description;
        }

        if ($scope->getFunctionName()) {
            $description = $scope->getFunctionName().'()';
            if ($scope->isInAnonymousFunction()) $description .= '{closure}';
            return $description;
        }

        $description = $scope->isInAnonymousFunction() ? '{closure}' : '{main}';
        $description = trim($scope->getNamespace().'\\'.$description, '\\');
        return $description;
    }
protected function getScopeDescription(Scope $scope) : string {
        if ($scope->isInClass()) {
            $description = $scope->getClassReflection()->getName();
            if ($scope->getFunctionName())       $description .= '::'.$scope->getFunctionName().'()';
            if ($scope->isInAnonymousFunction()) $description .= '{closure}';
            return $description;
        }

        if ($scope->getFunctionName()) {
            $description = $scope->getFunctionName().'()';
            if ($scope->isInAnonymousFunction()) $description .= '{closure}';
            return $description;
        }

        $description = $scope->isInAnonymousFunction() ? '{closure}' : '{main}';
        $description = trim($scope->getNamespace().'\\'.$description, '\\');
        return $description;
    }
protected function getScopeDescription ( Scope $ scope ) : string { if ( $ scope -> isInClass ( ) ) { $ description = $ scope -> getClassReflection ( ) -> getName ( ) ; if ( $ scope -> getFunctionName ( ) ) $ description .= '::' . $ scope -> getFunctionName ( ) . '()' ; if ( $ scope -> isInAnonymousFunction ( ) ) $ description .= '{closure}' ; return $ description ; } if ( $ scope -> getFunctionName ( ) ) { $ description = $ scope -> getFunctionName ( ) . '()' ; if ( $ scope -> isInAnonymousFunction ( ) ) $ description .= '{closure}' ; return $ description ; } $ description = $ scope -> isInAnonymousFunction ( ) ? '{closure}' : '{main}' ; $ description = trim ( $ scope -> getNamespace ( ) . '\\' . $ description , '\\' ) ; return $ description ; }
Return a description of the passed scope.

@param  Scope $scope

@return string - scope description
Return a description of the passed scope .