Code Duplication    Length = 7-8 lines in 34 locations

src/Redis/Command/Compose/ApiChannelTrait.php 1 location

@@ 46-53 (lines=8) @@
43
     * @override
44
     * @inheritDoc
45
     */
46
    public function publish($channel, $message)
47
    {
48
        // TODO: Implement publish() method.
49
        $command = Enum::PUBLISH;
50
        $args = [$channel, $message];
51
52
        return $this->dispatch(Builder::build($command, $args));
53
    }
54
55
    /**
56
     * @override

src/Redis/Command/Compose/ApiClusterTrait.php 1 location

@@ 112-119 (lines=8) @@
109
     * @override
110
     * @inheritDoc
111
     */
112
    public function clusterKeySlot($key)
113
    {
114
        // TODO: Implement clusterKeySlot() method.
115
        $command = Enum::CLUSTER_KEYSLOT;
116
        $args = [$key];
117
118
        return $this->dispatch(Builder::build($command, $args));
119
    }
120
121
    /**
122
     * @override

src/Redis/Command/Compose/ApiConnTrait.php 1 location

@@ 33-39 (lines=7) @@
30
     * @override
31
     * @inheritDoc
32
     */
33
    public function ping($message = 'PING')
34
    {
35
        $command = Enum::PING;
36
        $args = [$message];
37
38
        return $this->dispatch(Builder::build($command, $args));
39
    }
40
41
    /**
42
     * @override

src/Redis/Command/Compose/ApiListTrait.php 5 locations

@@ 114-120 (lines=7) @@
111
     * @override
112
     * @inheritDoc
113
     */
114
    public function lLen($key)
115
    {
116
        // TODO: Implement lLen() method.
117
        $command = Enum::LLEN;
118
        $args = [$key];
119
120
        return $this->dispatch(Builder::build($command, $args));
121
    }
122
123
    /**
@@ 127-134 (lines=8) @@
124
     * @override
125
     * @inheritDoc
126
     */
127
    public function lPop($key)
128
    {
129
        // TODO: Implement lPop() method.
130
        $command = Enum::LPOP;
131
        $args = [$key];
132
133
        return $this->dispatch(Builder::build($command, $args));
134
    }
135
136
    /**
137
     * @override
@@ 211-218 (lines=8) @@
208
     * @override
209
     * @inheritDoc
210
     */
211
    public function rPop($key)
212
    {
213
        $command = Enum::RPOP;
214
        $args = [$key];
215
216
        return $this->dispatch(Builder::build($command, $args));
217
    }
218
219
    /**
220
     * @override
221
     * @inheritDoc
@@ 223-230 (lines=8) @@
220
     * @override
221
     * @inheritDoc
222
     */
223
    public function rPopLPush($src, $dst)
224
    {
225
        // TODO: Implement rPopLPush() method.
226
        $command = Enum::RPOPLPUSH;
227
        $args = [$src, $dst];
228
229
        return $this->dispatch(Builder::build($command, $args));
230
    }
231
232
    /**
233
     * @override
@@ 160-166 (lines=7) @@
157
     * @override
158
     * @inheritDoc
159
     */
160
    public function lRange($key, $start = 0, $stop = -1)
161
    {
162
        $command = Enum::LRANGE;
163
        $args = [$key, $start, $stop];
164
165
        return $this->dispatch(Builder::build($command, $args));
166
    }
167
168
    /**
169
     * @override

src/Redis/Command/Compose/ApiSetHashTrait.php 3 locations

@@ 95-101 (lines=7) @@
92
     * @override
93
     * @inheritDoc
94
     */
95
    public function hKeys($key)
96
    {
97
        $command = Enum::HKEYS;
98
        $args = [$key];
99
100
        return $this->dispatch(Builder::build($command, $args));
101
    }
102
103
    /**
104
     * @override
@@ 107-114 (lines=8) @@
104
     * @override
105
     * @inheritDoc
106
     */
107
    public function hLen($key)
108
    {
109
        $command = Enum::HLEN;
110
        $args = [$key];
111
112
        return $this->dispatch(Builder::build($command, $args));
113
    }
114
115
    /**
116
     * @override
117
     * @inheritDoc
@@ 188-195 (lines=8) @@
185
     * @override
186
     * @inheritDoc
187
     */
188
    public function hVals($key)
189
    {
190
        $command = Enum::HVALS;
191
        $args = [$key];
192
193
        return $this->dispatch(Builder::build($command, $args));
194
    }
195
196
    /**
197
     * @override
198
     * @inheritDoc

src/Redis/Command/Compose/ApiSetTrait.php 4 locations

@@ 88-95 (lines=8) @@
85
     * @override
86
     * @inheritDoc
87
     */
88
    public function sMembers($key)
89
    {
90
        // TODO: Implement sMembers() method.
91
        $command = Enum::SMEMBERS;
92
        $args = [$key];
93
94
        return $this->dispatch(Builder::build($command, $args));
95
    }
96
97
    /**
98
     * @override
@@ 115-122 (lines=8) @@
112
     * @override
113
     * @inheritDoc
114
     */
115
    public function sPop($key, $count)
116
    {
117
        // TODO: Implement sPop() method.
118
        $command = Enum::SPOP;
119
        $args = [$key, $count];
120
121
        return $this->dispatch(Builder::build($command, $args));
122
    }
123
124
    /**
125
     * @override
@@ 128-135 (lines=8) @@
125
     * @override
126
     * @inheritDoc
127
     */
128
    public function sRandMember($key, $count)
129
    {
130
        // TODO: Implement sRandMember() method.
131
        $command = Enum::SRANDMEMBER;
132
        $args = [$key, $count];
133
134
        return $this->dispatch(Builder::build($command, $args));
135
    }
136
137
    /**
138
     * @override
@@ 210-217 (lines=8) @@
207
     * @override
208
     * @inheritDoc
209
     */
210
    public function sCard($key)
211
    {
212
        // TODO: Implement sCard() method.
213
        $command = Enum::SCARD;
214
        $args = [$key];
215
216
        return $this->dispatch(Builder::build($command, $args));
217
    }
218
219
    /**
220
     * @override

src/Redis/Command/Compose/ApiKeyValTrait.php 14 locations

@@ 21-27 (lines=7) @@
18
     * @override
19
     * @inheritDoc
20
     */
21
    public function append($key, $value)
22
    {
23
        $command = Enum::APPEND;
24
        $args = [$key, $value];
25
26
        return $this->dispatch(Builder::build($command, $args));
27
    }
28
29
    /**
30
     * @override
@@ 181-187 (lines=7) @@
178
     * @override
179
     * @inheritDoc
180
     */
181
    public function incr($key)
182
    {
183
        $command = Enum::INCR;
184
        $args = [$key];
185
186
        return $this->dispatch(Builder::build($command, $args));
187
    }
188
189
    /**
190
     * @override
@@ 475-481 (lines=7) @@
472
     * @override
473
     * @inheritDoc
474
     */
475
    public function type($key)
476
    {
477
        $command = Enum::TYPE;
478
        $args = [$key];
479
480
        return $this->dispatch(Builder::build($command, $args));
481
    }
482
483
    /**
484
     * @override
@@ 33-39 (lines=7) @@
30
     * @override
31
     * @inheritDoc
32
     */
33
    public function bitCount($key, $start = 0, $end = -1)
34
    {
35
        $command = Enum::BITCOUNT;
36
        $args = [$key, $start, $end];
37
38
        return $this->dispatch(Builder::build($command, $args));
39
    }
40
41
    /**
42
     * @override
@@ 97-103 (lines=7) @@
94
     * @override
95
     * @inheritDoc
96
     */
97
    public function bitPos($key, $bit, $start = 0, $end = -1)
98
    {
99
        $command = Enum::BITPOS;
100
        $args = [$key, $bit, $start, $end];
101
102
        return $this->dispatch(Builder::build($command, $args));
103
    }
104
105
    /**
106
     * @override
@@ 109-116 (lines=8) @@
106
     * @override
107
     * @inheritDoc
108
     */
109
    public function decr($key)
110
    {
111
        $command = Enum::DECR;
112
        $args = [$key];
113
114
        return $this->dispatch(Builder::build($command, $args));
115
    }
116
117
    /**
118
     * @override
119
     * @inheritDoc
@@ 133-139 (lines=7) @@
130
     * @override
131
     * @inheritDoc
132
     */
133
    public function get($key)
134
    {
135
        $command = Enum::GET;
136
        $args = [$key];
137
138
        return $this->dispatch(Builder::build($command, $args));
139
    }
140
141
    /**
142
     * @override
@@ 339-345 (lines=7) @@
336
     * @override
337
     * @inheritDoc
338
     */
339
    public function strLen($key)
340
    {
341
        $command = Enum::STRLEN;
342
        $args = [$key];
343
344
        return $this->dispatch(Builder::build($command, $args));
345
    }
346
347
    /**
348
     * @override
@@ 351-358 (lines=8) @@
348
     * @override
349
     * @inheritDoc
350
     */
351
    public function del($key,...$keys)
352
    {
353
        $command = Enum::DEL;
354
        $keys[] = $key;
355
        $args = $keys;
356
357
        return $this->dispatch(Builder::build($command, $args));
358
    }
359
360
    /**
361
     * @override
@@ 364-371 (lines=8) @@
361
     * @override
362
     * @inheritDoc
363
     */
364
    public function dump($key)
365
    {
366
        // TODO: Implement dump() method.
367
        $command = Enum::DUMP;
368
        $args = [$key];
369
370
        return $this->dispatch(Builder::build($command, $args));
371
    }
372
373
    /**
374
     * @override
@@ 414-420 (lines=7) @@
411
     * @override
412
     * @inheritDoc
413
     */
414
    public function persist($key)
415
    {
416
        $command = Enum::PERSIST;
417
        $args = [$key];
418
419
        return $this->dispatch(Builder::build($command, $args));
420
    }
421
422
    /**
423
     * @override
@@ 438-444 (lines=7) @@
435
     * @override
436
     * @inheritDoc
437
     */
438
    public function pExpireAt($key, $milTimestamp)
439
    {
440
        $command = Enum::PEXPIREAT;
441
        $args = [$key, $milTimestamp];
442
443
        return $this->dispatch(Builder::build($command, $args));
444
    }
445
446
    /**
447
     * @override
@@ 463-469 (lines=7) @@
460
     * @override
461
     * @inheritDoc
462
     */
463
    public function ttl($key)
464
    {
465
        $command = Enum::TTL;
466
        $args = [$key];
467
468
        return $this->dispatch(Builder::build($command, $args));
469
    }
470
471
    /**
472
     * @override
@@ 560-566 (lines=7) @@
557
     * @override
558
     * @inheritDoc
559
     */
560
    public function pTtl($key)
561
    {
562
        $command = Enum::PTTL;
563
        $args = [$key];
564
565
        return $this->dispatch(Builder::build($command, $args));
566
    }
567
568
    /**
569
     * @override

src/Redis/Command/Compose/ApiCoreTrait.php 1 location

@@ 141-148 (lines=8) @@
138
     * @override
139
     * @inheritDoc
140
     */
141
    public function slaveOf($host, $port)
142
    {
143
        // TODO: Implement slaveOf() method.
144
        $command = Enum::SLAVEOF;
145
        $args = [$host, $port];
146
147
        return $this->dispatch(Builder::build($command, $args));
148
    }
149
150
    /**
151
     * @override

src/Redis/Command/Compose/ApiSetSortedTrait.php 4 locations

@@ 21-27 (lines=7) @@
18
     * @override
19
     * @inheritDoc
20
     */
21
    public function zAdd($key, array $options = [], ...$scoreMembers)
22
    {
23
        $command = Enum::ZADD;
24
        $args = array_merge([$key], $options, $scoreMembers);
25
26
        return $this->dispatch(Builder::build($command, $args));
27
    }
28
29
    /**
30
     * @override
@@ 33-40 (lines=8) @@
30
     * @override
31
     * @inheritDoc
32
     */
33
    public function zCard($key)
34
    {
35
        $command = Enum::ZCARD;
36
        $args = [$key];
37
38
        return $this->dispatch(Builder::build($command, $args));
39
    }
40
41
    /**
42
     * @override
43
     * @inheritDoc
@@ 45-52 (lines=8) @@
42
     * @override
43
     * @inheritDoc
44
     */
45
    public function zCount($key, $min, $max)
46
    {
47
        $command = Enum::ZCOUNT;
48
        $args = [$key, $min, $max];
49
50
        return $this->dispatch(Builder::build($command, $args));
51
    }
52
53
    /**
54
     * @override
55
     * @inheritDoc
@@ 82-89 (lines=8) @@
79
     * @override
80
     * @inheritDoc
81
     */
82
    public function zLexCount($key, $min, $max)
83
    {
84
        $command = Enum::ZLEXCOUNT;
85
        $args = [$key, $min, $max];
86
87
        return $this->dispatch(Builder::build($command, $args));
88
    }
89
90
    /**
91
     * @override
92
     * @inheritDoc