Code Duplication    Length = 7-8 lines in 33 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/ApiKeyValTrait.php 14 locations

@@ 108-115 (lines=8) @@
105
     * @override
106
     * @inheritDoc
107
     */
108
    public function decr($key)
109
    {
110
        $command = Enum::DECR;
111
        $args = [$key];
112
113
        return $this->dispatch(Builder::build($command, $args));
114
    }
115
116
    /**
117
     * @override
118
     * @inheritDoc
@@ 350-357 (lines=8) @@
347
     * @override
348
     * @inheritDoc
349
     */
350
    public function del($key,...$keys)
351
    {
352
        $command = Enum::DEL;
353
        $keys[] = $key;
354
        $args = $keys;
355
356
        return $this->dispatch(Builder::build($command, $args));
357
    }
358
359
    /**
360
     * @override
@@ 363-370 (lines=8) @@
360
     * @override
361
     * @inheritDoc
362
     */
363
    public function dump($key)
364
    {
365
        // TODO: Implement dump() method.
366
        $command = Enum::DUMP;
367
        $args = [$key];
368
369
        return $this->dispatch(Builder::build($command, $args));
370
    }
371
372
    /**
373
     * @override
@@ 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
@@ 132-138 (lines=7) @@
129
     * @override
130
     * @inheritDoc
131
     */
132
    public function get($key)
133
    {
134
        $command = Enum::GET;
135
        $args = [$key];
136
137
        return $this->dispatch(Builder::build($command, $args));
138
    }
139
140
    /**
141
     * @override
@@ 462-468 (lines=7) @@
459
     * @override
460
     * @inheritDoc
461
     */
462
    public function ttl($key)
463
    {
464
        $command = Enum::TTL;
465
        $args = [$key];
466
467
        return $this->dispatch(Builder::build($command, $args));
468
    }
469
470
    /**
471
     * @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
@@ 96-102 (lines=7) @@
93
     * @override
94
     * @inheritDoc
95
     */
96
    public function bitPos($key, $bit, $start = 0, $end = -1)
97
    {
98
        $command = Enum::BITPOS;
99
        $args = [$key, $bit, $start, $end];
100
101
        return $this->dispatch(Builder::build($command, $args));
102
    }
103
104
    /**
105
     * @override
@@ 180-186 (lines=7) @@
177
     * @override
178
     * @inheritDoc
179
     */
180
    public function incr($key)
181
    {
182
        $command = Enum::INCR;
183
        $args = [$key];
184
185
        return $this->dispatch(Builder::build($command, $args));
186
    }
187
188
    /**
189
     * @override
@@ 338-344 (lines=7) @@
335
     * @override
336
     * @inheritDoc
337
     */
338
    public function strLen($key)
339
    {
340
        $command = Enum::STRLEN;
341
        $args = [$key];
342
343
        return $this->dispatch(Builder::build($command, $args));
344
    }
345
346
    /**
347
     * @override
@@ 413-419 (lines=7) @@
410
     * @override
411
     * @inheritDoc
412
     */
413
    public function persist($key)
414
    {
415
        $command = Enum::PERSIST;
416
        $args = [$key];
417
418
        return $this->dispatch(Builder::build($command, $args));
419
    }
420
421
    /**
422
     * @override
@@ 437-443 (lines=7) @@
434
     * @override
435
     * @inheritDoc
436
     */
437
    public function pExpireAt($key, $milTimestamp)
438
    {
439
        $command = Enum::PEXPIREAT;
440
        $args = [$key, $milTimestamp];
441
442
        return $this->dispatch(Builder::build($command, $args));
443
    }
444
445
    /**
446
     * @override
@@ 474-480 (lines=7) @@
471
     * @override
472
     * @inheritDoc
473
     */
474
    public function type($key)
475
    {
476
        $command = Enum::TYPE;
477
        $args = [$key];
478
479
        return $this->dispatch(Builder::build($command, $args));
480
    }
481
482
    /**
483
     * @override
@@ 559-565 (lines=7) @@
556
     * @override
557
     * @inheritDoc
558
     */
559
    public function pTtl($key)
560
    {
561
        $command = Enum::PTTL;
562
        $args = [$key];
563
564
        return $this->dispatch(Builder::build($command, $args));
565
    }
566
567
    /**
568
     * @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/ApiSetSortedTrait.php 3 locations

@@ 39-46 (lines=8) @@
36
     * @override
37
     * @inheritDoc
38
     */
39
    public function zCard($key)
40
    {
41
        $command = Enum::ZCARD;
42
        $args = [$key];
43
44
        return $this->dispatch(Builder::build($command, $args));
45
    }
46
47
    /**
48
     * @override
49
     * @inheritDoc
@@ 51-58 (lines=8) @@
48
     * @override
49
     * @inheritDoc
50
     */
51
    public function zCount($key, $min, $max)
52
    {
53
        $command = Enum::ZCOUNT;
54
        $args = [$key, $min, $max];
55
56
        return $this->dispatch(Builder::build($command, $args));
57
    }
58
59
    /**
60
     * @override
61
     * @inheritDoc
@@ 88-95 (lines=8) @@
85
     * @override
86
     * @inheritDoc
87
     */
88
    public function zLexCount($key, $min, $max)
89
    {
90
        $command = Enum::ZLEXCOUNT;
91
        $args = [$key, $min, $max];
92
93
        return $this->dispatch(Builder::build($command, $args));
94
    }
95
96
    /**
97
     * @override
98
     * @inheritDoc

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