Code Duplication    Length = 3-4 lines in 2 locations

src/Server/Query/QueryObject.php 2 locations

@@ 111-114 (lines=4) @@
108
        $transformer = $serializer->getTransformer();
109
110
        foreach ($included->get() as $resource => $data) {
111
            if (null === $transformer->getMappingByAlias($resource)) {
112
                $errorBag->offsetSet(null, new InvalidParameterError($resource, strtolower($paramName)));
113
                continue;
114
            }
115
116
            if (is_array($data)) {
117
                foreach ($data as $subResource) {
@@ 118-120 (lines=3) @@
115
116
            if (is_array($data)) {
117
                foreach ($data as $subResource) {
118
                    if (null === $transformer->getMappingByAlias($subResource)) {
119
                        $errorBag->offsetSet(null, new InvalidParameterError($subResource, strtolower($paramName)));
120
                    }
121
                }
122
            }
123
        }