Code Duplication    Length = 14-14 lines in 2 locations

src/ClaimCheck/Sns/SnsExtendedClientConfiguration.php 1 location

@@ 35-48 (lines=14) @@
32
     * @param string $s3BucketName
33
     * @throws ExceptionInterface
34
     */
35
    public function __construct(S3Client $s3Client, $s3BucketName)
36
    {
37
        if (!$s3BucketName) {
38
            throw new InvalidArgumentException('S3 Bucket Name is required and cannot be empty.');
39
        }
40
        
41
        $this->s3Client = $s3Client;
42
        $this->s3BucketName = $s3BucketName;
43
        $this->claimCheckFactory = new ClaimCheckFactory($s3BucketName);
44
        $this->claimCheckSerializer = new ClaimCheckSerializerChain(array(
45
            new ClaimCheckJsonSerializer(),
46
            new JsonSnsMessageSerializer(),
47
        ));
48
    }
49
50
    /**
51
     * @return S3Client

src/ClaimCheck/Sqs/SqsExtendedClientConfiguration.php 1 location

@@ 38-51 (lines=14) @@
35
     * @param string $s3BucketName
36
     * @throws ExceptionInterface
37
     */
38
    public function __construct(S3Client $s3Client, $s3BucketName)
39
    {
40
        if (!$s3BucketName) {
41
            throw new InvalidArgumentException('S3 Bucket Name is required and cannot be empty.');
42
        }
43
        
44
        $this->s3Client = $s3Client;
45
        $this->s3BucketName = $s3BucketName;
46
        $this->claimCheckFactory = new ClaimCheckFactory($s3BucketName);
47
        $this->claimCheckSerializer = new ClaimCheckSerializerChain(array(
48
            new ClaimCheckJsonSerializer(),
49
            new JsonSnsMessageSerializer(),
50
        ));
51
    }
52
53
    /**
54
     * @return S3Client