Code Duplication    Length = 8-8 lines in 7 locations

lib/Doctrine/DBAL/Platforms/DB2Platform.php 1 location

@@ 799-806 (lines=8) @@
796
    /**
797
     * {@inheritDoc}
798
     */
799
    public function getLocateExpression($str, $substr, $startPos = false)
800
    {
801
        if ($startPos == false) {
802
            return 'LOCATE(' . $substr . ', ' . $str . ')';
803
        }
804
805
        return 'LOCATE(' . $substr . ', ' . $str . ', '.$startPos.')';
806
    }
807
808
    /**
809
     * {@inheritDoc}

lib/Doctrine/DBAL/Platforms/DrizzlePlatform.php 1 location

@@ 600-607 (lines=8) @@
597
    /**
598
     * {@inheritDoc}
599
     */
600
    public function getLocateExpression($str, $substr, $startPos = false)
601
    {
602
        if ($startPos == false) {
603
            return 'LOCATE(' . $substr . ', ' . $str . ')';
604
        }
605
606
        return 'LOCATE(' . $substr . ', ' . $str . ', '.$startPos.')';
607
    }
608
609
    /**
610
     * {@inheritDoc}

lib/Doctrine/DBAL/Platforms/MySqlPlatform.php 1 location

@@ 101-108 (lines=8) @@
98
    /**
99
     * {@inheritDoc}
100
     */
101
    public function getLocateExpression($str, $substr, $startPos = false)
102
    {
103
        if ($startPos == false) {
104
            return 'LOCATE(' . $substr . ', ' . $str . ')';
105
        }
106
107
        return 'LOCATE(' . $substr . ', ' . $str . ', '.$startPos.')';
108
    }
109
110
    /**
111
     * {@inheritDoc}

lib/Doctrine/DBAL/Platforms/OraclePlatform.php 1 location

@@ 86-93 (lines=8) @@
83
    /**
84
     * {@inheritDoc}
85
     */
86
    public function getLocateExpression($str, $substr, $startPos = false)
87
    {
88
        if ($startPos == false) {
89
            return 'INSTR('.$str.', '.$substr.')';
90
        }
91
92
        return 'INSTR('.$str.', '.$substr.', '.$startPos.')';
93
    }
94
95
    /**
96
     * {@inheritDoc}

lib/Doctrine/DBAL/Platforms/SQLAnywherePlatform.php 1 location

@@ 953-960 (lines=8) @@
950
    /**
951
     * {@inheritdoc}
952
     */
953
    public function getLocateExpression($str, $substr, $startPos = false)
954
    {
955
        if ($startPos == false) {
956
            return 'LOCATE(' . $str . ', ' . $substr . ')';
957
        }
958
959
        return 'LOCATE(' . $str . ', ' . $substr . ', ' . $startPos . ')';
960
    }
961
962
    /**
963
     * {@inheritdoc}

lib/Doctrine/DBAL/Platforms/SqlitePlatform.php 1 location

@@ 118-125 (lines=8) @@
115
    /**
116
     * {@inheritDoc}
117
     */
118
    public function getLocateExpression($str, $substr, $startPos = false)
119
    {
120
        if ($startPos == false) {
121
            return 'LOCATE('.$str.', '.$substr.')';
122
        }
123
124
        return 'LOCATE('.$str.', '.$substr.', '.$startPos.')';
125
    }
126
127
    /**
128
     * {@inheritdoc}

lib/Doctrine/DBAL/Platforms/SQLServerPlatform.php 1 location

@@ 989-996 (lines=8) @@
986
    /**
987
     * {@inheritDoc}
988
     */
989
    public function getLocateExpression($str, $substr, $startPos = false)
990
    {
991
        if ($startPos == false) {
992
            return 'CHARINDEX(' . $substr . ', ' . $str . ')';
993
        }
994
995
        return 'CHARINDEX(' . $substr . ', ' . $str . ', ' . $startPos . ')';
996
    }
997
998
    /**
999
     * {@inheritDoc}