Completed
Push — master ( 7d0d17...e8691f )
by Angus
02:48
created

TitleHistory::__construct()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Code Coverage

Tests 0
CRAP Score 2

Importance

Changes 0
Metric Value
cc 1
eloc 2
nc 1
nop 0
dl 0
loc 3
ccs 0
cts 3
cp 0
crap 2
rs 10
c 0
b 0
f 0
1
<?php defined('BASEPATH') OR exit('No direct script access allowed');
2
3
class TitleHistory extends Auth_Controller {
4
	public function __construct() {
5
		parent::__construct();
6
	}
7
8
	public function index(int $titleID, int $page = 1) {
9
		$this->header_data['title'] = "Title History";
10
		$this->header_data['page']  = "title-history";
11
12
		//CHECK: Should we only allow people to see history for series they are tracking?
13
		$historyData = $this->History->getTitleHistory((int) $titleID, $page);
0 ignored issues
show
Coding Style introduced by
Equals sign not aligned with surrounding assignments; expected 20 spaces but found 1 space

This check looks for multiple assignments in successive lines of code. It will report an issue if the operators are not in a straight line.

To visualize

$a = "a";
$ab = "ab";
$abc = "abc";

will produce issues in the first and second line, while this second example

$a   = "a";
$ab  = "ab";
$abc = "abc";

will produce no issues.

Loading history...
14
		$this->body_data['historyData'] = $historyData['rows'];
15
		$this->body_data['currentPage'] = $page;
16
		$this->body_data['totalPages']  = $historyData['totalPages'];
17
18
		$this->_render_page("TitleHistory");
19
	}
20
}
21