Code Duplication    Length = 15-15 lines in 3 locations

eZ/Publish/Core/Search/Legacy/Tests/Content/HandlerContentTest.php 1 location

@@ 229-243 (lines=15) @@
226
227
    protected $contentTypeHandler;
228
229
    protected function getContentTypeHandler()
230
    {
231
        if (!isset($this->contentTypeHandler)) {
232
            $this->contentTypeHandler = new ContentTypeHandler(
233
                new ContentTypeGateway(
234
                    $this->getDatabaseHandler(),
235
                    $this->getLanguageMaskGenerator()
236
                ),
237
                new ContentTypeMapper($this->getConverterRegistry()),
238
                $this->getMock('eZ\\Publish\\Core\\Persistence\\Legacy\\Content\\Type\\Update\\Handler')
239
            );
240
        }
241
242
        return $this->contentTypeHandler;
243
    }
244
245
    protected function getConverterRegistry()
246
    {

eZ/Publish/Core/Search/Legacy/Tests/Content/HandlerLocationSortTest.php 1 location

@@ 134-148 (lines=15) @@
131
132
    protected $contentTypeHandler;
133
134
    protected function getContentTypeHandler()
135
    {
136
        if (!isset($this->contentTypeHandler)) {
137
            $this->contentTypeHandler = new ContentTypeHandler(
138
                new ContentTypeGateway(
139
                    $this->getDatabaseHandler(),
140
                    $this->getLanguageMaskGenerator()
141
                ),
142
                new ContentTypeMapper($this->getConverterRegistry()),
143
                $this->getMock('eZ\\Publish\\Core\\Persistence\\Legacy\\Content\\Type\\Update\\Handler')
144
            );
145
        }
146
147
        return $this->contentTypeHandler;
148
    }
149
150
    protected $fieldRegistry;
151

eZ/Publish/Core/Search/Legacy/Tests/Content/HandlerLocationTest.php 1 location

@@ 202-216 (lines=15) @@
199
200
    protected $contentTypeHandler;
201
202
    protected function getContentTypeHandler()
203
    {
204
        if (!isset($this->contentTypeHandler)) {
205
            $this->contentTypeHandler = new ContentTypeHandler(
206
                new ContentTypeGateway(
207
                    $this->getDatabaseHandler(),
208
                    $this->getLanguageMaskGenerator()
209
                ),
210
                new ContentTypeMapper($this->getConverterRegistry()),
211
                $this->getMock('eZ\\Publish\\Core\\Persistence\\Legacy\\Content\\Type\\Update\\Handler')
212
            );
213
        }
214
215
        return $this->contentTypeHandler;
216
    }
217
218
    protected $fieldRegistry;
219