Code Duplication    Length = 3-5 lines in 2 locations

bin/cli.php 1 location

@@ 45-49 (lines=5) @@
42
}
43
44
// Check URI option
45
if (!array_key_exists('u', $arguments) && !array_key_exists('uri', $arguments)) {
46
    echo "Option `--uri` is required\n";
47
    echo "Use `--help` flag for show help notices\n";
48
    exit();
49
}
50
51
// Check and setup environment
52
if (array_key_exists('e', $arguments) || array_key_exists('env', $arguments)) {

application/library/Application/CliBootstrap.php 1 location

@@ 51-53 (lines=3) @@
48
    {
49
        $arguments = getopt("u:", ["uri:"]);
50
51
        if (!array_key_exists('u', $arguments) && !array_key_exists('uri', $arguments)) {
52
            throw new ApplicationException('Attribute `--uri` is required');
53
        }
54
55
        $uri = $arguments['u'] ?? $arguments['uri'];
56