# fluent-smtp/trunk/includes/Core/Reflection.php

FluentSMTP – WP Mail SMTP Plugin with Amazon SES, SendGrid, Mailgun, Postmark, Cloudflare, toSend, Gmail and Any SMTP, version trunk. 33 lines.

- Page: https://pluginprobe.com/plugins/fluent-smtp/trunk/code/includes/Core/Reflection.php
- Raw: https://pluginprobe.com/plugins/fluent-smtp/trunk/raw/includes/Core/Reflection.php
- Modified: 2025-08-28T09:06:40+00:00

Line numbers below start at 1. Link to a line or a range by appending a fragment to the
page URL, for example `https://pluginprobe.com/plugins/fluent-smtp/trunk/code/includes/Core/Reflection.php#L10-L20`.

```php
<?php

namespace FluentMail\Includes\Core;

use ReflectionParameter;
use ReflectionNamedType;

class Reflection
{
    private static function isPhp8OrHigher()
    {
        return PHP_VERSION_ID >= 80000;
    }

    public static function getClassName(ReflectionParameter $parameter)
    {
        if (static::isPhp8OrHigher()) {
            $type = $parameter->getType();
            if ($type instanceof ReflectionNamedType && !$type->isBuiltin()) {
                return $type->getName();
            }

            return null;
        }

        $class = $parameter->getClass();

        return $class ? $class->getName() : null;
    }
}



```
