public static function isPropertySettable($object, string $propertyName): bool
    {
        if (!is_object($object)) {
            throw new \InvalidArgumentException('$object must be an object, ' . gettype($object) . ' given.', 1259828920);
        }

        $className = TypeHandling::getTypeForValue($object);
        if (($object instanceof \stdClass && array_key_exists($propertyName, get_object_vars($object))) || array_key_exists($propertyName, get_class_vars($className))) {
            return true;
        }
        return is_callable([$object, self::buildSetterMethodName($propertyName)]);
    }
public static function isPropertySettable($object, string $propertyName): bool
    {
        if (!is_object($object)) {
            throw new \InvalidArgumentException('$object must be an object, ' . gettype($object) . ' given.', 1259828920);
        }

        $className = TypeHandling::getTypeForValue($object);
        if (($object instanceof \stdClass && array_key_exists($propertyName, get_object_vars($object))) || array_key_exists($propertyName, get_class_vars($className))) {
            return true;
        }
        return is_callable([$object, self::buildSetterMethodName($propertyName)]);
    }
public static function isPropertySettable ( $ object , string $ propertyName ) : bool { if ( ! is_object ( $ object ) ) { throw new \ InvalidArgumentException ( '$object must be an object, ' . gettype ( $ object ) . ' given.' , 1259828920 ) ; } $ className = TypeHandling :: getTypeForValue ( $ object ) ; if ( ( $ object instanceof \ stdClass && array_key_exists ( $ propertyName , get_object_vars ( $ object ) ) ) || array_key_exists ( $ propertyName , get_class_vars ( $ className ) ) ) { return true ; } return is_callable ( [ $ object , self :: buildSetterMethodName ( $ propertyName ) ] ) ; }
Tells if the value of the specified property can be set 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 set by this Object Accessor .