diff --git a/lib/internal/Magento/Framework/Serialize/README.md b/lib/internal/Magento/Framework/Serialize/README.md index f724a87bc3bba2ca8358130e5ce2f7609f0be8c5..e636fc79818af6f749745cde1f2d76fea0473dcf 100644 --- a/lib/internal/Magento/Framework/Serialize/README.md +++ b/lib/internal/Magento/Framework/Serialize/README.md @@ -1,5 +1,5 @@ # Serialize -**Serialize** provides *SerializerInterface* and a few serializers to support different kinds of needs of serializing/unserializing of data. Here are list of serializers in this library: +**Serialize** libaray provides *SerializerInterface* and multiple implementations of serializer to support different kinds of needs of serializing/unserializing of data. Here are list of serializers in this library: - * **Json** (recommended) - It can be used to serialize string, integer, float, boolean, or array data to json string; it unserializes json string to string, integer, float, boolean, or array. This is the recommended serializer. \ No newline at end of file + * **Json** (default) - It can be used to serialize string, integer, float, boolean, or array data to json string; it unserializes json string to string, integer, float, boolean, or array. This is the recommended serializer. \ No newline at end of file diff --git a/lib/internal/Magento/Framework/Serialize/SerializerInterface.php b/lib/internal/Magento/Framework/Serialize/SerializerInterface.php index d3c856687f408007ab5a892f9c3267acbb253d92..1dc70da80f39455690d34e750b07b9270c2d8d5e 100644 --- a/lib/internal/Magento/Framework/Serialize/SerializerInterface.php +++ b/lib/internal/Magento/Framework/Serialize/SerializerInterface.php @@ -10,16 +10,16 @@ interface SerializerInterface /** * Serialize data into string * - * @param string|integer|float|boolean|array|null $data - * @return string|boolean + * @param string|int|float|bool|array|null $data + * @return string|bool */ public function serialize($data); /** - * Unserialize the given string into data + * Unserialize the given string * * @param string $string - * @return string|integer|float|boolean|array|null + * @return string|int|float|bool|array|null */ public function unserialize($string); } diff --git a/lib/internal/Magento/Framework/Serialize/Test/Unit/Serializer/JsonTest.php b/lib/internal/Magento/Framework/Serialize/Test/Unit/Serializer/JsonTest.php index 1f36b7b729e9beaa9dc5bf00ee97b0e81748853a..38fa7d2a66f7f179a93bd11f45a35a996f937fe8 100644 --- a/lib/internal/Magento/Framework/Serialize/Test/Unit/Serializer/JsonTest.php +++ b/lib/internal/Magento/Framework/Serialize/Test/Unit/Serializer/JsonTest.php @@ -22,7 +22,6 @@ class JsonTest extends \PHPUnit_Framework_TestCase /** * @param null|bool|array $value - * @param int $objectDecodeType * @dataProvider serializeUnserializeDataProvider */ public function testSerializeUnserialize($value) @@ -37,6 +36,7 @@ class JsonTest extends \PHPUnit_Framework_TestCase { return [ [''], + ['string'], [null], [false], [['a' => 'b']],