Skip to content

Commit 7ab108a

Browse files
committed
Update the class and method comment to highlight that this should only be used in a single case
1 parent e8f9b35 commit 7ab108a

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

lib/internal/Magento/Framework/Serialize/JsonConverter.php

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,17 @@
66
namespace Magento\Framework\Serialize;
77

88
/**
9-
* Used to convert \Magento\Framework\DataObject to Json
10-
*
11-
* @deprecated @see \Magento\Framework\Serialize\Serializer\Json::serialize
9+
* This class was introducted only for usage in the \Magento\Framework\DataObject::toJson method.
10+
* It should not be used in other cases and instead \Magento\Framework\Serialize\Serializer\Json::serialize
11+
* should be used.
1212
*/
1313
class JsonConverter
1414
{
1515
/**
16-
* @param $data
16+
* This method should only be used by \Magento\Framework\DataObject::toJson
17+
* All other cases should use \Magento\Framework\Serialize\Serializer\Json::serialize directly
18+
*
19+
* @param string|int|float|bool|array|null $data
1720
* @return bool|string
1821
* @throws \InvalidArgumentException
1922
*/

0 commit comments

Comments
 (0)