Code Duplication    Length = 7-8 lines in 29 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/ApiCoreTrait.php 1 location

@@ 135-142 (lines=8) @@
132
     * @override
133
     * @inheritDoc
134
     */
135
    public function slaveOf($host, $port)
136
    {
137
        // TODO: Implement slaveOf() method.
138
        $command = Enum::SLAVEOF;
139
        $args = [$host, $port];
140
141
        return $this->dispatch(Builder::build($command, $args));
142
    }
143
144
    /**
145
     * @override

src/Redis/Command/Compose/ApiKeyValTrait.php 11 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
@@ 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
@@ 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
@@ 332-338 (lines=7) @@
329
     * @override
330
     * @inheritDoc
331
     */
332
    public function strLen($key)
333
    {
334
        // TODO: Implement strLen() method.
335
        $command = Enum::STRLEN;
336
        $args = [$key];
337
338
        return $this->dispatch(Builder::build($command, $args));
339
    }
340
341
    /**
@@ 345-352 (lines=8) @@
342
     * @override
343
     * @inheritDoc
344
     */
345
    public function del($key,...$keys)
346
    {
347
        $command = Enum::DEL;
348
        $keys[] = $key;
349
        $args = $keys;
350
351
        return $this->dispatch(Builder::build($command, $args));
352
    }
353
354
    /**
355
     * @override
@@ 358-365 (lines=8) @@
355
     * @override
356
     * @inheritDoc
357
     */
358
    public function dump($key)
359
    {
360
        // TODO: Implement dump() method.
361
        $command = Enum::DUMP;
362
        $args = [$key];
363
364
        return $this->dispatch(Builder::build($command, $args));
365
    }
366
367
    /**
368
     * @override
@@ 411-417 (lines=7) @@
408
     * @override
409
     * @inheritDoc
410
     */
411
    public function persist($key)
412
    {
413
        $command = Enum::PERSIST;
414
        $args = [$key];
415
416
        return $this->dispatch(Builder::build($command, $args));
417
    }
418
419
    /**
420
     * @override
@@ 462-468 (lines=7) @@
459
     * @override
460
     * @inheritDoc
461
     */
462
    public function ttl($key)
463
    {
464
        // TODO: Implement ttl() method.
465
        $command = Enum::TTL;
466
        $args = [$key];
467
468
        return $this->dispatch(Builder::build($command, $args));
469
    }
470
471
    /**
@@ 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
@@ 562-568 (lines=7) @@
559
     * @override
560
     * @inheritDoc
561
     */
562
    public function pTtl($key)
563
    {
564
        $command = Enum::PTTL;
565
        $args = [$key];
566
567
        return $this->dispatch(Builder::build($command, $args));
568
    }
569
570
    /**
571
     * @override

src/Redis/Command/Compose/ApiListTrait.php 4 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

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