PluginProbe
FluentSMTP – WP Mail SMTP Plugin with Amazon SES, SendGrid, Mailgun, Postmark, Cloudflare, toSend, Gmail and Any SMTP / trunk
FluentSMTP – WP Mail SMTP Plugin with Amazon SES, SendGrid, Mailgun, Postmark, Cloudflare, toSend, Gmail and Any SMTP vtrunk
2.4.0 trunk 1.0.1 1.1.0 1.1.1 1.2.0 2.0.0 2.0.1 2.0.2 2.1.0 2.1.1 2.1.2 2.2.0 2.2.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.6 2.2.7 2.2.71 2.2.72 2.2.73 2.2.80 2.2.81 All 32 releases
fluent-smtp / includes / Core / Reflection.php

Reflection.php in FluentSMTP – WP Mail SMTP Plugin with Amazon SES, SendGrid, Mailgun, Postmark, Cloudflare, toSend, Gmail and Any SMTP trunk, at includes/Core/Reflection.php

33 lines 646 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace FluentMail\Includes\Core;
4
5 use ReflectionParameter;
6 use ReflectionNamedType;
7
8 class Reflection
9 {
10 private static function isPhp8OrHigher()
11 {
12 return PHP_VERSION_ID >= 80000;
13 }
14
15 public static function getClassName(ReflectionParameter $parameter)
16 {
17 if (static::isPhp8OrHigher()) {
18 $type = $parameter->getType();
19 if ($type instanceof ReflectionNamedType && !$type->isBuiltin()) {
20 return $type->getName();
21 }
22
23 return null;
24 }
25
26 $class = $parameter->getClass();
27
28 return $class ? $class->getName() : null;
29 }
30 }
31
32
33