Completed
Push — master ( 76c71b...91372c )
by dima
05:24
created

IndexController   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 33
Duplicated Lines 0 %

Coupling/Cohesion

Components 1
Dependencies 2

Importance

Changes 3
Bugs 0 Features 0
Metric Value
wmc 2
lcom 1
cbo 2
dl 0
loc 33
rs 10
c 3
b 0
f 0

2 Methods

Rating   Name   Duplication   Size   Complexity  
A __construct() 0 4 1
A get() 0 5 1
1
<?php
2
3
namespace Frameworkless\Controllers;
4
5
use Core\Modules\UserList\UserList;
6
7
class IndexController extends BaseController {
8
	
9
	/**
10
	 *
11
	 * @var \Models\User\UserRepository $UserRepository
12
	 */
13
	protected $UserRepository;
14
15
	protected $userListModule;
16
17
	/**
18
	 * IndexController, constructed by container
19
	 *
20
	 * @param Twig_Environment $twig
0 ignored issues
show
Bug introduced by
There is no parameter named $twig. Was it maybe removed?

This check looks for PHPDoc comments describing methods or function parameters that do not exist on the corresponding method or function.

Consider the following example. The parameter $italy is not defined by the method finale(...).

/**
 * @param array $germany
 * @param array $island
 * @param array $italy
 */
function finale($germany, $island) {
    return "2:1";
}

The most likely cause is that the parameter was removed, but the annotation was not.

Loading history...
21
	 */
22
	public function __construct( UserList $userListModule) {
23
24
		$this->userListModule = $userListModule;
25
	}
26
27
	/**
28
	 * Return index page (/)
29
	 *
30
	 * @param array $args
31
	 * @return Response
32
	 */
33
	public function get($args) {
34
		return $this->render('pages/index.html.twig', [
35
				"content" => $this->userListModule->process($args),
36
		]);
37
	}
38
39
}
40