Code Duplication    Length = 3-6 lines in 2 locations

src/scripts/getFromS3.php 1 location

@@ 26-28 (lines=3) @@
23
        isset($options['help']))
24
        usage();
25
26
    if (!isset($options['bucket']) || !isset($options['file']) ||
27
        !isset($options['to']))
28
        throw new \SA\CpeSdk\CpeException("Missing mandatory parameter!");
29
}
30
31
$options = getopt("h", array("bucket:", "file:", "to:", "force::", "help::"));

src/scripts/putInS3.php 1 location

@@ 27-32 (lines=6) @@
24
        isset($options['help']))
25
        usage();
26
    
27
    if (!isset($options['bucket']) || !isset($options['file']) ||
28
        !isset($options['from']))
29
    {
30
        print "Error: Missing mandatory parameter !\n";
31
        usage();
32
    }
33
34
    $options['bucket'] = rtrim( $options['bucket'], "/");
35
}