Code Duplication    Length = 11-15 lines in 4 locations

eZ/Publish/Core/Persistence/Legacy/Content/UrlAlias/Gateway/DoctrineDatabase.php 2 locations

@@ 151-161 (lines=11) @@
148
            )
149
        );
150
151
        if ($languageId !== false) {
152
            $query->where(
153
                $query->expr->gt(
154
                    $query->expr->bitAnd(
155
                        $this->dbHandler->quoteColumn('lang_mask'),
156
                        $query->bindValue($languageId, null, \PDO::PARAM_INT)
157
                    ),
158
                    0
159
                )
160
            );
161
        }
162
163
        $statement = $query->prepare();
164
        $statement->execute();
@@ 215-229 (lines=15) @@
212
            $limit,
213
            $offset
214
        );
215
        if (isset($languageCode)) {
216
            $query->where(
217
                $query->expr->gt(
218
                    $query->expr->bitAnd(
219
                        $this->dbHandler->quoteColumn('lang_mask'),
220
                        $query->bindValue(
221
                            $this->languageMaskGenerator->generateLanguageIndicator($languageCode, false),
222
                            null,
223
                            \PDO::PARAM_INT
224
                        )
225
                    ),
226
                    0
227
                )
228
            );
229
        }
230
        $statement = $query->prepare();
231
        $statement->execute();
232

eZ/Publish/Core/Persistence/Legacy/Content/Gateway/DoctrineDatabase.php 2 locations

@@ 1872-1882 (lines=11) @@
1869
        }
1870
1871
        // relation type
1872
        if (isset($relationType)) {
1873
            $query->where(
1874
                $query->expr->gt(
1875
                    $query->expr->bitAnd(
1876
                        $this->dbHandler->quoteColumn('relation_type', 'ezcontentobject_link'),
1877
                        $query->bindValue($relationType, null, \PDO::PARAM_INT)
1878
                    ),
1879
                    0
1880
                )
1881
            );
1882
        }
1883
1884
        $statement = $query->prepare();
1885
        $statement->execute();
@@ 1929-1939 (lines=11) @@
1926
        );
1927
1928
        // relation type
1929
        if (isset($relationType)) {
1930
            $query->where(
1931
                $query->expr->gt(
1932
                    $query->expr->bitAnd(
1933
                        $this->dbHandler->quoteColumn('relation_type', 'ezcontentobject_link'),
1934
                        $query->bindValue($relationType, null, \PDO::PARAM_INT)
1935
                    ),
1936
                    0
1937
                )
1938
            );
1939
        }
1940
1941
        $statement = $query->prepare();
1942