Code Duplication    Length = 3-4 lines in 2 locations

src/Server/Data/DataAssertions.php 1 location

@@ 128-131 (lines=4) @@
125
126
        $hasErrors = false;
127
        foreach ($inputAttributes as $property) {
128
            if (false === in_array($property, $properties)) {
129
                $hasErrors = true;
130
                $errorBag->offsetSet(null, new InvalidAttributeError($property, $data[JsonApiTransformer::TYPE_KEY]));
131
            }
132
        }
133
134
        if ($hasErrors) {

src/Server/Data/DataObject.php 1 location

@@ 196-198 (lines=3) @@
193
            );
194
195
            foreach (array_keys($relationshipData[JsonApiTransformer::ATTRIBUTES_KEY]) as $property) {
196
                if (false === in_array($property, $properties, true)) {
197
                    $errorBag->offsetSet(null, new InvalidAttributeError($property, $relationshipData[JsonApiTransformer::TYPE_KEY]));
198
                }
199
            }
200
        }
201
    }