Code Duplication    Length = 10-10 lines in 2 locations

Service/Encrypter.php 1 location

@@ 62-71 (lines=10) @@
59
            return $this->encrypter->encrypt($input, $instructions, $serialization, $shared_protected_header, $shared_unprotected_header, $aad);
60
        }
61
62
        if (1 < count($instructions) && $serialization !== JSONSerializationModes::JSON_SERIALIZATION) {
63
            $result = [];
64
            foreach($instructions as $instruction) {
65
                $result[] = $this->encryptData($input, [$instruction], $serialization, $shared_protected_header, $shared_unprotected_header, $aad);
66
            }
67
68
            return $result;
69
        } else {
70
            return $this->encryptData($input, $instructions, $serialization, $shared_protected_header, $shared_unprotected_header, $aad);
71
        }
72
    }
73
74
    /**

Service/Signer.php 1 location

@@ 68-77 (lines=10) @@
65
            return $this->signer->sign($input, $instructions, $serialization, $detached_signature, $detached_payload);
66
        }
67
68
        if (1 < count($instructions) && $serialization !== JSONSerializationModes::JSON_SERIALIZATION) {
69
            $result = [];
70
            foreach($instructions as $instruction) {
71
                $result[] = $this->signData($input, [$instruction], $serialization, $detached_signature, $detached_payload);
72
            }
73
74
            return $result;
75
        } else {
76
            return $this->signData($input, $instructions, $serialization, $detached_signature, $detached_payload);
77
        }
78
    }
79
80
    /**