public static function isPropertyGettable($object, string $propertyName): bool
    {
        if (!is_object($object)) {
            throw new \InvalidArgumentException('$object must be an object, ' . gettype($object) . ' given.', 1259828921);
        }
        if (($object instanceof \ArrayAccess && $object->offsetExists($propertyName)) || ($object instanceof \stdClass && array_key_exists($propertyName, get_object_vars($object)))) {
            return true;
        }
        $uppercasePropertyName = ucfirst($propertyName);
        if (is_callable([$object, 'get' . $uppercasePropertyName]) || is_callable([$object, 'is' . $uppercasePropertyName]) || is_callable([$object, 'has' . $uppercasePropertyName])) {
            return true;
        }
        $className = TypeHandling::getTypeForValue($object);
        return array_key_exists($propertyName, get_class_vars($className));
    }
public static function isPropertyGettable($object, string $propertyName): bool
    {
        if (!is_object($object)) {
            throw new \InvalidArgumentException('$object must be an object, ' . gettype($object) . ' given.', 1259828921);
        }
        if (($object instanceof \ArrayAccess && $object->offsetExists($propertyName)) || ($object instanceof \stdClass && array_key_exists($propertyName, get_object_vars($object)))) {
            return true;
        }
        $uppercasePropertyName = ucfirst($propertyName);
        if (is_callable([$object, 'get' . $uppercasePropertyName]) || is_callable([$object, 'is' . $uppercasePropertyName]) || is_callable([$object, 'has' . $uppercasePropertyName])) {
            return true;
        }
        $className = TypeHandling::getTypeForValue($object);
        return array_key_exists($propertyName, get_class_vars($className));
    }
public static function isPropertyGettable ( $ object , string $ propertyName ) : bool { if ( ! is_object ( $ object ) ) { throw new \ InvalidArgumentException ( '$object must be an object, ' . gettype ( $ object ) . ' given.' , 1259828921 ) ; } if ( ( $ object instanceof \ ArrayAccess && $ object -> offsetExists ( $ propertyName ) ) || ( $ object instanceof \ stdClass && array_key_exists ( $ propertyName , get_object_vars ( $ object ) ) ) ) { return true ; } $ uppercasePropertyName = ucfirst ( $ propertyName ) ; if ( is_callable ( [ $ object , 'get' . $ uppercasePropertyName ] ) || is_callable ( [ $ object , 'is' . $ uppercasePropertyName ] ) || is_callable ( [ $ object , 'has' . $ uppercasePropertyName ] ) ) { return true ; } $ className = TypeHandling :: getTypeForValue ( $ object ) ; return array_key_exists ( $ propertyName , get_class_vars ( $ className ) ) ; }
Tells if the value of the specified property can be retrieved by this Object Accessor.

@param object $object Object containing the property
@param string $propertyName Name of the property to check
@return boolean
@throws \InvalidArgumentException
Tells if the value of the specified property can be retrieved by this Object Accessor .