Passed
Pull Request — developer (#17138)
by
unknown
18:27
created

Calendar_RepeatEventsDelete_View::process()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 2
c 1
b 0
f 0
dl 0
loc 4
rs 10
cc 1
nc 1
nop 1
1
<?php
2
/**
3
 * Modal window for repeat events purpose.
4
 *
5
 * @package   View
6
 *
7
 * @copyright YetiForce S.A.
8
 * @license   YetiForce Public License 5.0 (licenses/LicenseEN.txt or yetiforce.com)
9
 * @author    Adrian Kon <[email protected]>
10
 */
11
12
/**
13
 * Modal window for repeat events purpose class.
14
 */
15
class Calendar_RepeatEventsDelete_View extends \App\Controller\Modal
16
{
17
	/** {@inheritdoc} */
18
	public $successBtnIcon = 'far fa-save';
19
20
	/** {@inheritdoc} */
21
	public $modalIcon = 'fas fa-save mr-2';
22
23
	/** {@inheritdoc} */
24
	protected $pageTitle = 'LBL_TITLE_TYPE_DELETE';
25
26
	public $showFooter = false;
27
28
	/** {@inheritdoc} */
29
	public function checkPermission(App\Request $request)
30
	{
31
		return true;
32
		//TODO
33
		if (!(\App\Process::hasEvent('showVisitPurpose')) && !(\App\Process::hasEvent('showSuperUserVisitPurpose'))) {
0 ignored issues
show
Unused Code introduced by
IfNode is not reachable.

This check looks for unreachable code. It uses sophisticated control flow analysis techniques to find statements which will never be executed.

Unreachable code is most often the result of return, die or exit statements that have been added for debug purposes.

function fx() {
    try {
        doSomething();
        return true;
    }
    catch (\Exception $e) {
        return false;
    }

    return false;
}

In the above example, the last return false will never be executed, because a return statement has already been met in every possible execution path.

Loading history...
34
			throw new \App\Exceptions\NoPermitted('ERR_PERMISSION_DENIED', 406);
35
		}
36
	}
37
38
	/** {@inheritdoc} */
39
	public function process(App\Request $request)
40
	{
41
		$viewer = $this->getViewer($request);
42
		$viewer->view('Modals/RepeatEventsDelete.tpl', $request->getModule());
43
	}
44
}
45