public function getPropertyValue($type, $subject)
{
$method = 'get' . ucwords(strtolower($type));
$propertyValue = null;
if ($type !== 'closure' && $type !== 'method' && (isset($subject->{$type}) && $subject->{$type} !== null)) {
$propertyValue = $subject->{$type};
} elseif (method_exists($subject, $method)) {
$propertyValue = $subject->{$method}();
} elseif (method_exists($subject, 'getProperty')) {
$propertyValue = $subject->getProperty($type);
}
return $propertyValue;
}