Code Duplication    Length = 12-12 lines in 3 locations

src/IPub/MobileDetect/Events/OnRequestHandler.php 3 locations

@@ 291-302 (lines=12) @@
288
	 *
289
	 * @return bool
290
	 */
291
	private function needPhoneResponseModify() : bool
292
	{
293
		if (($this->deviceView->getViewType() === NULL || $this->deviceView->isPhoneView()) && $this->mobileDetect->isMobile() && !$this->mobileDetect->isTablet()) {
294
			$this->onResponseHandler->modifyResponseClosure = function ($deviceView) {
295
				return $deviceView->modifyPhoneResponse();
296
			};
297
298
			return TRUE;
299
		}
300
301
		return FALSE;
302
	}
303
304
	/**
305
	 * If a modified Response for tablet devices is needed
@@ 309-320 (lines=12) @@
306
	 *
307
	 * @return bool
308
	 */
309
	private function needTabletResponseModify() : bool
310
	{
311
		if (($this->deviceView->getViewType() === NULL || $this->deviceView->isTabletView()) && $this->mobileDetect->isTablet()) {
312
			$this->onResponseHandler->modifyResponseClosure = function (Helpers\DeviceView $deviceView) {
313
				return $deviceView->modifyTabletResponse();
314
			};
315
316
			return TRUE;
317
		}
318
319
		return FALSE;
320
	}
321
322
	/**
323
	 * If a modified Response for mobile devices is needed
@@ 327-338 (lines=12) @@
324
	 *
325
	 * @return bool
326
	 */
327
	private function needMobileResponseModify() : bool
328
	{
329
		if (($this->deviceView->getViewType() === NULL || $this->deviceView->isMobileView()) && $this->mobileDetect->isMobile()) {
330
			$this->onResponseHandler->modifyResponseClosure = function (Helpers\DeviceView $deviceView) {
331
				return $deviceView->modifyMobileResponse();
332
			};
333
334
			return TRUE;
335
		}
336
337
		return FALSE;
338
	}
339
340
	/**
341
	 * If a modified Response for non-mobile devices is needed