Code Duplication    Length = 11-15 lines in 4 locations

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

@@ 1800-1810 (lines=11) @@
1797
        }
1798
1799
        // relation type
1800
        if (isset($relationType)) {
1801
            $query->where(
1802
                $query->expr->gt(
1803
                    $query->expr->bitAnd(
1804
                        $this->dbHandler->quoteColumn('relation_type', 'ezcontentobject_link'),
1805
                        $query->bindValue($relationType, null, \PDO::PARAM_INT)
1806
                    ),
1807
                    0
1808
                )
1809
            );
1810
        }
1811
1812
        $statement = $query->prepare();
1813
        $statement->execute();
@@ 1857-1867 (lines=11) @@
1854
        );
1855
1856
        // relation type
1857
        if (isset($relationType)) {
1858
            $query->where(
1859
                $query->expr->gt(
1860
                    $query->expr->bitAnd(
1861
                        $this->dbHandler->quoteColumn('relation_type', 'ezcontentobject_link'),
1862
                        $query->bindValue($relationType, null, \PDO::PARAM_INT)
1863
                    ),
1864
                    0
1865
                )
1866
            );
1867
        }
1868
1869
        $statement = $query->prepare();
1870

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