Code Duplication    Length = 8-8 lines in 2 locations

src/Transformer/Transformer.php 1 location

@@ 295-302 (lines=8) @@
292
     *
293
     * @param array $array
294
     */
295
    protected static function formatScalarValues(array &$array)
296
    {
297
        $array = self::arrayToScalarValue($array);
298
299
        if (\is_array($array) && !array_key_exists(Serializer::SCALAR_VALUE, $array)) {
300
            self::loopScalarValues($array, 'formatScalarValues');
301
        }
302
    }
303
304
    /**
305
     * @param array $array

src/Transformer/Helpers/RecursiveFormatterHelper.php 1 location

@@ 90-97 (lines=8) @@
87
     *
88
     * @param array $array
89
     */
90
    public static function formatScalarValues(array &$array)
91
    {
92
        $array = self::arrayToScalarValue($array);
93
94
        if (\is_array($array) && !array_key_exists(Serializer::SCALAR_VALUE, $array)) {
95
            self::loopScalarValues($array, 'formatScalarValues');
96
        }
97
    }
98
99
    /**
100
     * Simplifies the data structure by removing an array level if data is scalar and has one element in array.