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

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