Code Duplication    Length = 33-34 lines in 2 locations

src/Tests/Serialize/Serializer/SwaggerSerializerTest.php 2 locations

@@ 81-114 (lines=34) @@
78
    /**
79
     * @return array
80
     */
81
    public function serializationProvider(): array
82
    {
83
        return [
84
            [
85
                new Foo('5', new Bar(6, new Meh(1), new Meh(2), new Meh(3))),
86
                json_encode([
87
                    'a'   => '5',
88
                    'bar' => [
89
                        'b'    => 6,
90
                        'meh'  => ['c' => 1],
91
                        'mehs' => [
92
                            ['c' => 2],
93
                            ['c' => 3],
94
                        ]
95
                    ]
96
                ])
97
            ],
98
            [
99
                // Since this will not pass validation, were going to allow it
100
                new Foo('5', new Bar(6, new Meh([1]), new Meh(2), new Meh(3))),
101
                json_encode([
102
                    'a'   => '5',
103
                    'bar' => [
104
                        'b'    => 6,
105
                        'meh'  => ['c' => [1]],
106
                        'mehs' => [
107
                            ['c' => 2],
108
                            ['c' => 3],
109
                        ]
110
                    ]
111
                ])
112
            ]
113
        ];
114
    }
115
116
    /**
117
     * @return array
@@ 119-151 (lines=33) @@
116
    /**
117
     * @return array
118
     */
119
    public function deserializationProvider(): array
120
    {
121
        return [
122
            [
123
                json_encode([
124
                    'a'   => '5',
125
                    'bar' => [
126
                        'b'    => 6,
127
                        'meh'  => ['c' => 1],
128
                        'mehs' => [
129
                            ['c' => 2],
130
                            ['c' => 3],
131
                        ]
132
                    ]
133
                ]),
134
                new Foo('5', new Bar(6, new Meh(1), new Meh(2), new Meh(3))),
135
            ],
136
            [
137
                json_encode([
138
                    'a'   => '5',
139
                    'bar' => [
140
                        'b'    => 6,
141
                        'meh'  => ['c' => [1]],
142
                        'mehs' => [
143
                            ['c' => 2],
144
                            ['c' => 3],
145
                        ]
146
                    ]
147
                ]),
148
                new Foo('5', new Bar(6, new Meh([1]), new Meh(2), new Meh(3))),
149
            ]
150
        ];
151
    }
152
153
    /**
154
     * @return \stdClass