Code Duplication    Length = 11-15 lines in 4 locations

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

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

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

@@ 1792-1802 (lines=11) @@
1789
        }
1790
1791
        // relation type
1792
        if (isset($relationType)) {
1793
            $query->where(
1794
                $query->expr->gt(
1795
                    $query->expr->bitAnd(
1796
                        $this->dbHandler->quoteColumn('relation_type', 'ezcontentobject_link'),
1797
                        $query->bindValue($relationType, null, \PDO::PARAM_INT)
1798
                    ),
1799
                    0
1800
                )
1801
            );
1802
        }
1803
1804
        $statement = $query->prepare();
1805
        $statement->execute();
@@ 1849-1859 (lines=11) @@
1846
        );
1847
1848
        // relation type
1849
        if (isset($relationType)) {
1850
            $query->where(
1851
                $query->expr->gt(
1852
                    $query->expr->bitAnd(
1853
                        $this->dbHandler->quoteColumn('relation_type', 'ezcontentobject_link'),
1854
                        $query->bindValue($relationType, null, \PDO::PARAM_INT)
1855
                    ),
1856
                    0
1857
                )
1858
            );
1859
        }
1860
1861
        $statement = $query->prepare();
1862