Code Duplication    Length = 17-18 lines in 2 locations

src/Provider.php 1 location

@@ 65-82 (lines=18) @@
62
     * @param $key
63
     * @return array
64
     */
65
    protected function getRequiredOptions($key)
66
    {
67
        if ($key == self::PROVIDER_OPTIONS) {
68
            return [
69
                'accountSid',
70
                'authToken',
71
                'appId',
72
            ];
73
        } elseif ($key == self::MESSAGE_OPTIONS) {
74
            return [
75
                'data',
76
                'recipients',
77
                'template_id',
78
            ];
79
        } else {
80
            return []; // @codeCoverageIgnore
81
        }
82
    }
83
84
    /**
85
     * 获取接收使用的时间戳

src/VoiceProvider.php 1 location

@@ 23-39 (lines=17) @@
20
     * @param $key
21
     * @return array
22
     */
23
    protected function getRequiredOptions($key)
24
    {
25
        if ($key == self::PROVIDER_OPTIONS) {
26
            return [
27
                'accountSid',
28
                'authToken',
29
                'appId',
30
            ];
31
        } elseif ($key == self::MESSAGE_OPTIONS) {
32
            return [
33
                'recipients',
34
                'data',
35
            ];
36
        } else {
37
            return []; // @codeCoverageIgnore
38
        }
39
    }
40
41
    /**
42
     * 返回请求链接