Code Duplication    Length = 11-15 lines in 4 locations

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

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

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

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