Conditions | 3 |
Paths | 4 |
Total Lines | 15 |
Code Lines | 10 |
Lines | 0 |
Ratio | 0 % |
Tests | 0 |
CRAP Score | 12 |
Changes | 0 |
1 | <?php defined('BASEPATH') or exit('No direct script access allowed'); |
||
8 | public function index(int $page = 1) { |
||
9 | if($page === 0) redirect('user/history/1'); |
||
10 | |||
11 | $this->header_data['title'] = "History"; |
||
12 | $this->header_data['page'] = "history"; |
||
13 | |||
14 | $historyData = $this->History->userGetHistory($page); |
||
|
|||
15 | $this->body_data['historyData'] = $historyData['rows']; |
||
16 | $this->body_data['currentPage'] = $page; |
||
17 | $this->body_data['totalPages'] = $historyData['totalPages']; |
||
18 | |||
19 | if($page > $this->body_data['totalPages']) redirect('user/history/1'); |
||
20 | |||
21 | $this->_render_page('User/History'); |
||
22 | } |
||
23 | } |
||
24 |
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
will produce issues in the first and second line, while this second example
will produce no issues.