Code Duplication    Length = 11-15 lines in 4 locations

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

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

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

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