1
0
mirror of https://github.com/Chouchen/ShikiryuRSS.git synced 2024-05-09 03:11:31 +02:00
ShikiryuRSS/src/SRSSTools.php
2023-04-17 14:28:01 +02:00

29 lines
539 B
PHP

<?php
namespace Shikiryu\SRSS;
use ReflectionProperty;
use Shikiryu\SRSS\Validator\Formator;
class SRSSTools
{
/**
* @throws \ReflectionException
*/
public static function getPropertyType($object, $property): ?string
{
$rp = new ReflectionProperty($object, $property);
return $rp->getType()?->getName();
}
/**
* @param string $string
*
* @return string
*/
public static function getRSSDate(string $string)
{
return Formator::checkDate($string);
}
}