diff --git a/core/attributedef.class.inc.php b/core/attributedef.class.inc.php index 40324d4509..8416be1d6e 100644 --- a/core/attributedef.class.inc.php +++ b/core/attributedef.class.inc.php @@ -3062,6 +3062,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)) @@ -3074,7 +3079,6 @@ class AttributeObjectKey extends AttributeDBFieldVoid } if (MetaModel::IsValidObject($proposedValue)) { - /** @var \DBObject $proposedValue */ return $proposedValue->GetKey(); } @@ -6511,6 +6515,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)) @@ -8300,9 +8309,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 317239d1a5..63b8784c68 100644 --- a/core/dbobject.class.php +++ b/core/dbobject.class.php @@ -608,11 +608,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 @@ -620,6 +619,8 @@ abstract class DBObject implements iDisplay * @return bool * @throws CoreException * @throws CoreUnexpectedValue + * + * @see DBWrite() */ public function Set($sAttCode, $value) {