diff --git a/core/attributedef.class.inc.php b/core/attributedef.class.inc.php index cfaafad93..9b9446081 100644 --- a/core/attributedef.class.inc.php +++ b/core/attributedef.class.inc.php @@ -3061,6 +3061,11 @@ class AttributeObjectKey extends AttributeDBFieldVoid return ((int) $proposedValue) !== 0; } + /** + * @inheritDoc + * + * @param int|DBObject $proposedValue Object key or valid ({@see MetaModel::IsValidObject()}) datamodel object + */ public function MakeRealValue($proposedValue, $oHostObj) { if (is_null($proposedValue)) @@ -3073,7 +3078,6 @@ class AttributeObjectKey extends AttributeDBFieldVoid } if (MetaModel::IsValidObject($proposedValue)) { - /** @var \DBObject $proposedValue */ return $proposedValue->GetKey(); } @@ -6510,6 +6514,11 @@ class AttributeDateTime extends AttributeDBField } } + /** + * @inheritDoc + * + * @param int|string $proposedValue timestamp ({@see DateTime::getTimestamp()) or date as string, following the {@see GetInternalFormat} format. + */ public function MakeRealValue($proposedValue, $oHostObj) { if (is_null($proposedValue)) @@ -8299,9 +8308,9 @@ class AttributeBlob extends AttributeDefinition } /** - * Users can provide the document from an URL (including an URL on iTop itself) - * for CSV import. Administrators can even provide the path to a local file - * {@inheritDoc} + * {@inheritDoc} + * + * @param string $proposedValue Can be an URL (including an URL to iTop itself), or a local path (CSV import) * * @see AttributeDefinition::MakeRealValue() */ diff --git a/core/dbobject.class.php b/core/dbobject.class.php index fd4da584b..f898c6201 100644 --- a/core/dbobject.class.php +++ b/core/dbobject.class.php @@ -606,11 +606,10 @@ abstract class DBObject implements iDisplay * Attributes setter * * Set $sAttCode to $value. - * The value must be valid according to the type of attribute. + * The value must be valid according to the type of attribute : see the different {@see AttributeDefinition::MakeRealValue()} implementations * The value will not be recorded into the DB until DBObject::DBWrite() is called. * * @api - * @see DBWrite() * * @param string $sAttCode * @param mixed $value @@ -618,6 +617,8 @@ abstract class DBObject implements iDisplay * @return bool * @throws CoreException * @throws CoreUnexpectedValue + * + * @see DBWrite() */ public function Set($sAttCode, $value) {