Code Duplication    Length = 4-6 lines in 2 locations

src/Command/ValidationCommand.php 2 locations

@@ 151-154 (lines=4) @@
148
            $docHeader = $doc->getData();
149
150
            if ('core' == $fileType) {
151
                if (!array_key_exists('collection', $docHeader) || empty($docHeader['collection'])) {
152
                    $this->validationErrors[$path] = 'Core import, header "collection" is required';
153
                    continue;
154
                }
155
            } else {
156
                if (!array_key_exists('target', $docHeader) || empty($docHeader['target'])) {
157
                    $this->validationErrors[$path] = 'Param import, header "target" is required';
@@ 155-160 (lines=6) @@
152
                    $this->validationErrors[$path] = 'Core import, header "collection" is required';
153
                    continue;
154
                }
155
            } else {
156
                if (!array_key_exists('target', $docHeader) || empty($docHeader['target'])) {
157
                    $this->validationErrors[$path] = 'Param import, header "target" is required';
158
                    continue;
159
                }
160
            }
161
162
            $this->parseContent($doc->getContent(), $path, $file->getExtension());
163
        }