Code Duplication    Length = 7-8 lines in 30 locations

src/Redis/Redis.php 30 locations

@@ 464-471 (lines=8) @@
461
        return $this->dispatch(Builder::build($command, $args));
462
    }
463
464
    public function decr($key)
465
    {
466
        // TODO: Implement decr() method.
467
        $command = Enum::DECR;
468
        $args = [$key];
469
470
        return $this->dispatch(Builder::build($command, $args));
471
    }
472
473
    public function decrBy($key, $decrement)
474
    {
@@ 482-489 (lines=8) @@
479
        return $this->dispatch(Builder::build($command, $args));
480
    }
481
482
    public function del($key,...$keys)
483
    {
484
        $command = Enum::DEL;
485
        $keys[] = $key;
486
        $args = $keys;
487
488
        return $this->dispatch(Builder::build($command, $args));
489
    }
490
491
    public function discard()
492
    {
@@ 499-506 (lines=8) @@
496
        return $this->dispatch(Builder::build($command));
497
    }
498
499
    public function dump($key)
500
    {
501
        // TODO: Implement dump() method.
502
        $command = Enum::DUMP;
503
        $args = [$key];
504
505
        return $this->dispatch(Builder::build($command, $args));
506
    }
507
508
    public function exists($key, ...$keys)
509
    {
@@ 536-542 (lines=7) @@
533
        return $this->dispatch(Builder::build($command, $args));
534
    }
535
536
    public function get($key)
537
    {
538
        $command = Enum::GET;
539
        $args = [$key];
540
541
        return $this->dispatch(Builder::build($command, $args));
542
    }
543
544
    public function getBit($key, $offset)
545
    {
@@ 571-577 (lines=7) @@
568
        return $this->dispatch(Builder::build($command, $args));
569
    }
570
571
    public function incr($key)
572
    {
573
        $command = Enum::INCR;
574
        $args = [$key];
575
576
        return $this->dispatch(Builder::build($command, $args));
577
    }
578
579
    public function incrBy($key, $increment)
580
    {
@@ 605-611 (lines=7) @@
602
        return $this->dispatch(Builder::build($command));
603
    }
604
605
    public function persist($key)
606
    {
607
        $command = Enum::PERSIST;
608
        $args = [$key];
609
610
        return $this->dispatch(Builder::build($command, $args));
611
    }
612
613
    public function pExpire($key, $milliseconds)
614
    {
@@ 656-663 (lines=8) @@
653
        return $this->dispatch(Builder::build($command, $args));
654
    }
655
656
    public function ttl($key)
657
    {
658
        // TODO: Implement ttl() method.
659
        $command = Enum::TTL;
660
        $args = [$key];
661
662
        return $this->dispatch(Builder::build($command, $args));
663
    }
664
665
    public function type($key)
666
    {
@@ 665-671 (lines=7) @@
662
        return $this->dispatch(Builder::build($command, $args));
663
    }
664
665
    public function type($key)
666
    {
667
        $command = Enum::TYPE;
668
        $args = [$key];
669
670
        return $this->dispatch(Builder::build($command, $args));
671
    }
672
673
    public function unLink($key, ...$keys)
674
    {
@@ 792-798 (lines=7) @@
789
        return $this->dispatch(Builder::build($command, $args));
790
    }
791
792
    public function ping($message = 'PING')
793
    {
794
        $command = Enum::PING;
795
        $args = [$message];
796
797
        return $this->dispatch(Builder::build($command, $args));
798
    }
799
800
    public function quit()
801
    {
@@ 815-821 (lines=7) @@
812
        return $this->dispatch(Builder::build($command, $args));
813
    }
814
815
    public function pTtl($key)
816
    {
817
        $command = Enum::PTTL;
818
        $args = [$key];
819
820
        return $this->dispatch(Builder::build($command, $args));
821
    }
822
823
    public function pSetEx($key, $milliseconds, $value)
824
    {
@@ 885-891 (lines=7) @@
882
        return $this->dispatch(Builder::build($command, $args));
883
    }
884
885
    public function hKeys($key)
886
    {
887
        $command = Enum::HKEYS;
888
        $args = [$key];
889
890
        return $this->dispatch(Builder::build($command, $args));
891
    }
892
893
    public function hLen($key)
894
    {
@@ 893-899 (lines=7) @@
890
        return $this->dispatch(Builder::build($command, $args));
891
    }
892
893
    public function hLen($key)
894
    {
895
        $command = Enum::HLEN;
896
        $args = [$key];
897
898
        return $this->dispatch(Builder::build($command, $args));
899
    }
900
901
    public function hMGet($key, ...$fields)
902
    {
@@ 950-956 (lines=7) @@
947
        return $this->dispatch(Builder::build($command, $args));
948
    }
949
950
    public function hVals($key)
951
    {
952
        $command = Enum::HVALS;
953
        $args = [$key];
954
955
        return $this->dispatch(Builder::build($command, $args));
956
    }
957
958
    public function geoAdd($key, array $coordinates)
959
    {
@@ 1028-1035 (lines=8) @@
1025
        return $this->dispatch(Builder::build($command, $args));
1026
    }
1027
1028
    public function publish($channel, $message)
1029
    {
1030
        // TODO: Implement publish() method.
1031
        $command = Enum::PUBLISH;
1032
        $args = [$channel, $message];
1033
1034
        return $this->dispatch(Builder::build($command, $args));
1035
    }
1036
1037
    public function pUnsubscribe(...$patterns)
1038
    {
@@ 1073-1080 (lines=8) @@
1070
        return $this->dispatch(Builder::build($command, $args));
1071
    }
1072
1073
    public function lLen($key)
1074
    {
1075
        // TODO: Implement lLen() method.
1076
        $command = Enum::LLEN;
1077
        $args = [$key];
1078
1079
        return $this->dispatch(Builder::build($command, $args));
1080
    }
1081
1082
    public function lPop($key)
1083
    {
@@ 1082-1089 (lines=8) @@
1079
        return $this->dispatch(Builder::build($command, $args));
1080
    }
1081
1082
    public function lPop($key)
1083
    {
1084
        // TODO: Implement lPop() method.
1085
        $command = Enum::LPOP;
1086
        $args = [$key];
1087
1088
        return $this->dispatch(Builder::build($command, $args));
1089
    }
1090
1091
    public function lPush($key,...$values)
1092
    {
@@ 1187-1193 (lines=7) @@
1184
        return $this->dispatch(Builder::build($command, $args));
1185
    }
1186
1187
    public function rPop($key)
1188
    {
1189
        $command = Enum::RPOP;
1190
        $args = [$key];
1191
1192
        return $this->dispatch(Builder::build($command, $args));
1193
    }
1194
1195
    public function rPopLPush($src, $dst)
1196
    {
@@ 1195-1202 (lines=8) @@
1192
        return $this->dispatch(Builder::build($command, $args));
1193
    }
1194
1195
    public function rPopLPush($src, $dst)
1196
    {
1197
        // TODO: Implement rPopLPush() method.
1198
        $command = Enum::RPOPLPUSH;
1199
        $args = [$src, $dst];
1200
1201
        return $this->dispatch(Builder::build($command, $args));
1202
    }
1203
1204
    public function rPush($key, ...$values)
1205
    {
@@ 1308-1315 (lines=8) @@
1305
        return $this->dispatch(Builder::build($command));
1306
    }
1307
1308
    public function clusterKeySlot($key)
1309
    {
1310
        // TODO: Implement clusterKeySlot() method.
1311
        $command = Enum::CLUSTER_KEYSLOT;
1312
        $args = [$key];
1313
1314
        return $this->dispatch(Builder::build($command, $args));
1315
    }
1316
1317
    public function clusterMeet($ip, $port)
1318
    {
@@ 1443-1450 (lines=8) @@
1440
        return $this->dispatch(Builder::build($command, $args));
1441
    }
1442
1443
    public function zCard($key)
1444
    {
1445
        // TODO: Implement zCard() method.
1446
        $command = Enum::ZCARD;
1447
        $args = [$key];
1448
1449
        return $this->dispatch(Builder::build($command, $args));
1450
    }
1451
1452
    public function zCount($key, $min, $max)
1453
    {
@@ 1452-1459 (lines=8) @@
1449
        return $this->dispatch(Builder::build($command, $args));
1450
    }
1451
1452
    public function zCount($key, $min, $max)
1453
    {
1454
        // TODO: Implement zCount() method.
1455
        $command = Enum::ZCOUNT;
1456
        $args = [$key, $min, $max];
1457
1458
        return $this->dispatch(Builder::build($command, $args));
1459
    }
1460
1461
    public function zIncrBy($key, $increment, $member)
1462
    {
@@ 1479-1486 (lines=8) @@
1476
        return $this->dispatch(Builder::build($command, $args));
1477
    }
1478
1479
    public function zLexCount($key, $min, $max)
1480
    {
1481
        // TODO: Implement zLexCount() method.
1482
        $command = Enum::ZLEXCOUNT;
1483
        $args = [$key, $min, $max];
1484
1485
        return $this->dispatch(Builder::build($command, $args));
1486
    }
1487
1488
    public function zRange($key, $star, $stop, array $options = [])
1489
    {
@@ 1547-1554 (lines=8) @@
1544
        return $this->dispatch(Builder::build($command, $args));
1545
    }
1546
1547
    public function zRemRangeByLex($key, $min, $max)
1548
    {
1549
        // TODO: Implement zRemRangeByLex() method.
1550
        $command = Enum::ZREMRANGEBYLEX;
1551
        $args = [$key, $min, $max];
1552
1553
        return $this->dispatch(Builder::build($command, $args));
1554
    }
1555
1556
    public function zRemRangeByRank($key, $start, $stop)
1557
    {
@@ 1565-1572 (lines=8) @@
1562
        return $this->dispatch(Builder::build($command, $args));
1563
    }
1564
1565
    public function zRemRangeByScore($key, $min, $max)
1566
    {
1567
        // TODO: Implement zRemRangeByScore() method.
1568
        $command = Enum::ZREMRANGEBYSCORE;
1569
        $args = [$key, $min, $max];
1570
1571
        return $this->dispatch(Builder::build($command, $args));
1572
    }
1573
1574
    public function zRevRange($key, $start, $stop, array $options = [])
1575
    {
@@ 1679-1686 (lines=8) @@
1676
        return $this->dispatch(Builder::build($command, $args));
1677
    }
1678
1679
    public function slaveOf($host, $port)
1680
    {
1681
        // TODO: Implement slaveOf() method.
1682
        $command = Enum::SLAVEOF;
1683
        $args = [$host, $port];
1684
1685
        return $this->dispatch(Builder::build($command, $args));
1686
    }
1687
1688
    public function sLowLog($command, array $args = [])
1689
    {
@@ 1697-1704 (lines=8) @@
1694
        return $this->dispatch(Builder::build($command, $args));
1695
    }
1696
1697
    public function sMembers($key)
1698
    {
1699
        // TODO: Implement sMembers() method.
1700
        $command = Enum::SMEMBERS;
1701
        $args = [$key];
1702
1703
        return $this->dispatch(Builder::build($command, $args));
1704
    }
1705
1706
    public function sMove($src, $dst, $members)
1707
    {
@@ 1726-1733 (lines=8) @@
1723
        return $this->dispatch(Builder::build($command, $args));
1724
    }
1725
1726
    public function sPop($key, $count)
1727
    {
1728
        // TODO: Implement sPop() method.
1729
        $command = Enum::SPOP;
1730
        $args = [$key, $count];
1731
1732
        return $this->dispatch(Builder::build($command, $args));
1733
    }
1734
1735
    public function sRandMember($key, $count)
1736
    {
@@ 1735-1742 (lines=8) @@
1732
        return $this->dispatch(Builder::build($command, $args));
1733
    }
1734
1735
    public function sRandMember($key, $count)
1736
    {
1737
        // TODO: Implement sRandMember() method.
1738
        $command = Enum::SRANDMEMBER;
1739
        $args = [$key, $count];
1740
1741
        return $this->dispatch(Builder::build($command, $args));
1742
    }
1743
1744
    public function sRem($key, ...$members)
1745
    {
@@ 1754-1761 (lines=8) @@
1751
        return $this->dispatch(Builder::build($command, $args));
1752
    }
1753
1754
    public function strLen($key)
1755
    {
1756
        // TODO: Implement strLen() method.
1757
        $command = Enum::STRLEN;
1758
        $args = [$key];
1759
1760
        return $this->dispatch(Builder::build($command, $args));
1761
    }
1762
1763
    public function subscribe(...$channels)
1764
    {
@@ 1819-1826 (lines=8) @@
1816
        return $this->dispatch(Builder::build($command));
1817
    }
1818
1819
    public function sCard($key)
1820
    {
1821
        // TODO: Implement sCard() method.
1822
        $command = Enum::SCARD;
1823
        $args = [$key];
1824
1825
        return $this->dispatch(Builder::build($command, $args));
1826
    }
1827
1828
    public function sDiff(...$keys)
1829
    {