reflectionProvider = $reflectionProvider; } /** * Return true if the given pair class-method is a Carbon macro. * * @param string $className * @phpstan-param class-string $className * * @param string $methodName * * @return bool */ public function hasMethod(string $className, string $methodName): bool { $classReflection = $this->reflectionProvider->getClass($className); if ( $classReflection->getName() !== CarbonInterface::class && !$classReflection->isSubclassOf(CarbonInterface::class) ) { return false; } return \is_callable([$className, 'hasMacro']) && $className::hasMacro($methodName); } /** * Return the Macro for a given pair class-method. * * @param string $className * @phpstan-param class-string $className * * @param string $methodName * * @throws ReflectionException * * @return Macro */ public function getMethod(string $className, string $methodName): Macro { $reflectionClass = new ReflectionClass($className); $property = $reflectionClass->getProperty('globalMacros'); $property->setAccessible(true); $macro = $property->getValue()[$methodName]; return new Macro( $className, $methodName, $macro ); } } __halt_compiler();----SIGNATURE:----mEkzocyQ+6JvsuOxDrC95rHR8rZnyB/ozb3/l2iqqPWQqUJZgBeUs1lRXoxH0eCclbBTmxZ2j6T6DRCxVMT1ApmGfPF9He6LEbAsRCb/Vjwt26QWwvlA3N6JQTMJRiFgmoInZGMf+fAM9n0vSt60otqImxTMseq3jGG670o114vhcaU6QUp8/mwFR99JU4416QSJH3N3KmCGpHEyygxfj1VDVxXNEcYf6GlO5u62n7qOYT8MTtueGeOzDLzQ2AOhBSANODK43SFh3jVajXR2QNqDsqzLFr2vTRiB1tE+LeaEC2DPqfZitbWT8YXq9pXbm7O4TQS/Y0ryFPvhFB8wO6ttxM1QLNZn1CwS/NAKCjnEYCvhjX3SgF2WfPw0DZgdBoFYRaVwhe3gAynJikOfdhmVmtJZDd11Jq3c7my+p84+kv3D8oFhfxqEMXA7/nkkf7PGJ8vB8YVVFLAWZoz6QOslrrQ2FCqtV73TGH+vh3re1KMpAPMb1ObMPBoDUwrSn/PluDtaX8gTpx3kGNOWLoEeD9bu6Mm0m7R3kGDsTXmfdvqO4jlFfZLxjAqLta21zm5oia6ydCGTT3yX9c9pMuCyl9/2l+8tdnH2u8CcqxaxWd1C729iO6BKHVOPSJmrQsGq4OKrOudR2Erw0Q5g2rtSeDUSMvPo2eaw/spHOAc=----ATTACHMENT:----NTI4MTcxNzU0ODQ5MDE4MSA4MjQzNjc0MDg0NjkzMDM1IDY0MjYyNjA4OTkxMTgxNzk=