Code Duplication    Length = 10-11 lines in 2 locations

src/scripts/getFromS3.php 1 location

@@ 11-20 (lines=10) @@
8
9
use Aws\S3\S3Client;
10
11
function usage()
12
{
13
    echo("Usage: php ". basename(__FILE__) . " [-h] [--force] --bucket <s3 bucket> --file <filename> --to <filepath>\n");
14
    echo("--help, -h: Print this help\n");
15
    echo("--bucket <s3 bucket>: Name of the S3 bucket\n");
16
    echo("--file <filename>: Name of the file in the S3 bucket\n");
17
    echo("--to <filepath>: Full path to file where to save. You can override original filename.\n");
18
    echo("--force: Force download even if file exists locally\n\n");
19
    exit(0);
20
}
21
22
function check_input_parameters($options)
23
{

src/scripts/putInS3.php 1 location

@@ 11-21 (lines=11) @@
8
9
use Aws\S3\S3Client;
10
11
function usage()
12
{
13
    echo("Usage: php ". basename(__FILE__) . " [-h] [--rrs::] [--encrypt::] --bucket <s3 bucket> --file <filename> --from <filepath>\n");
14
    echo("--help, -h: Print this help\n");
15
    echo("--bucket <s3 bucket>: Name of the S3 bucket\n");
16
    echo("--file <filename>: Name of the file to create in bucket. You can override local filename.\n");
17
    echo("--from <filepath>: Full path to file to send to S3\n");
18
    echo("--rrs: Activate type of storage in S3: REDUCED_REDUNDANCY\n");
19
    echo("--encrypt: Activate Server encryption: AES256\n\n");
20
    exit(0);
21
}
22
23
function check_input_parameters(&$options)
24
{