Test Setup Failed
Pull Request — developer (#249)
by Arkadiusz
08:32
created

Credits::process()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 6
rs 10
c 0
b 0
f 0
cc 1
nc 1
nop 0
1
<?php
2
3
/**
4
 * Credits view file.
5
 *
6
 * @copyright YetiForce Sp. z o.o
7
 * @license YetiForce Public License 3.0 (licenses/LicenseEN.txt or yetiforce.com)
8
 * @author  Arkadiusz Sołek <[email protected]>
9
 */
10
11
namespace YF\Modules\YetiForce\View;
12
13
/**
14
 * Show credits and licenses class.
15
 */
16
class Credits extends \App\Controller\View
17
{
18
	
19
	/** {@inheritdoc} */
20
	public function checkPermission(): bool
0 ignored issues
show
Coding Style introduced by
function checkPermission() does not seem to conform to the naming convention (^(?:is|has|should|may|supports)).

This check examines a number of code elements and verifies that they conform to the given naming conventions.

You can set conventions for local variables, abstract classes, utility classes, constant, properties, methods, parameters, interfaces, classes, exceptions and special methods.

Loading history...
21
	{
22
		return true;
23
	}
24
25
	/** {@inheritdoc} */
26
	protected function getTitle(): string
27
	{
28
		return \App\Language::translate('LBL_VIEW_CREDITS', $this->request->getModule());
29
	}
30
31
	/** {@inheritdoc} */
32
	public function process(): void
33
	{
34
		$qualifiedModuleName = $this->request->getModule(false);
0 ignored issues
show
Unused Code introduced by
The call to Request::getModule() has too many arguments starting with false.

This check compares calls to functions or methods with their respective definitions. If the call has more arguments than are defined, it raises an issue.

If a function is defined several times with a different number of parameters, the check may pick up the wrong definition and report false positives. One codebase where this has been known to happen is Wordpress.

In this case you can add the @ignore PhpDoc annotation to the duplicate definition and it will be ignored.

Loading history...
35
		$this->viewer->assign('QUALIFIED_MODULE', $qualifiedModuleName);
36
		$this->viewer->view('Credits.tpl', $qualifiedModuleName);
37
	}
38
}
39