Code Duplication    Length = 4-6 lines in 4 locations

src/psalm-language-server.php 2 locations

@@ 108-111 (lines=4) @@
105
    $options['c'] = $options['config'];
106
}
107
108
if (isset($options['c']) && is_array($options['c'])) {
109
    fwrite(STDERR, 'Too many config files provided' . PHP_EOL);
110
    exit(1);
111
}
112
113
if (array_key_exists('h', $options)) {
114
    echo <<<HELP
@@ 215-220 (lines=6) @@
212
213
$path_to_config = get_path_to_config($options);
214
215
if (isset($options['tcp'])) {
216
    if (!is_string($options['tcp'])) {
217
        fwrite(STDERR, 'tcp url should be a string' . PHP_EOL);
218
        exit(1);
219
    }
220
}
221
222
$find_dead_code = isset($options['find-dead-code']);
223

src/psalm.php 2 locations

@@ 170-173 (lines=4) @@
167
    $options['c'] = $options['config'];
168
}
169
170
if (isset($options['c']) && is_array($options['c'])) {
171
    fwrite(STDERR, 'Too many config files provided' . PHP_EOL);
172
    exit(1);
173
}
174
175
176
if (array_key_exists('h', $options)) {
@@ 692-695 (lines=4) @@
689
}
690
691
if (isset($options['use-baseline'])) {
692
    if (!is_string($options['use-baseline'])) {
693
        fwrite(STDERR, '--use-baseline must be a string' . PHP_EOL);
694
        exit(1);
695
    }
696
697
    $baseline_file_path = $options['use-baseline'];
698
} else {