Code Duplication    Length = 3-3 lines in 2 locations

src/Api/Broadcast.php 1 location

@@ 55-57 (lines=3) @@
52
    {
53
        $allowedOptionsKeys = $this->getAllowedOptionsKeys();
54
        foreach ($options as $key => $value) {
55
            if (!\in_array($key, $allowedOptionsKeys, true)) {
56
                throw new InvalidOptionException(sprintf('Only "%s" are allowed keys for options.', implode(', ', $allowedOptionsKeys)));
57
            }
58
59
            if ($key === self::OPTION_NOTIFICATION_TYPE) {
60
                $this->isValidNotificationType($value);

src/Api/Send.php 1 location

@@ 89-91 (lines=3) @@
86
    {
87
        $allowedOptionsKeys = $this->getAllowedOptionsKeys();
88
        foreach ($options as $key => $value) {
89
            if (!\in_array($key, $allowedOptionsKeys, true)) {
90
                throw new InvalidOptionException(sprintf('Only "%s" are allowed keys for options.', implode(', ', $allowedOptionsKeys)));
91
            }
92
93
            if ($key === self::OPTION_MESSAGING_TYPE) {
94
                $this->isValidMessagingType($value);