Completed
Push — master ( 45893c...373238 )
by Angus
02:39
created

Tracker_Model::updateLatestChapters()   B

Complexity

Conditions 6
Paths 5

Size

Total Lines 63
Code Lines 32

Duplication

Lines 9
Ratio 14.29 %

Code Coverage

Tests 0
CRAP Score 42

Importance

Changes 0
Metric Value
cc 6
eloc 32
nc 5
nop 0
dl 9
loc 63
ccs 0
cts 0
cp 0
crap 42
rs 8.6498
c 0
b 0
f 0

How to fix   Long Method   

Long Method

Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.

For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.

Commonly applied refactorings include:

1
<?php declare(strict_types=1); defined('BASEPATH') OR exit('No direct script access allowed');
2
3
include_once APPPATH.'models/Tracker/Tracker_Base_Model.php';
4
foreach (glob(APPPATH.'models/Tracker/*.php') as $filename) {
5
	/** @noinspection PhpIncludeInspection */
6
	include_once $filename;
7
}
8
class Tracker_Model extends Tracker_Base_Model {
9
	public $title;
10
	public $list;
11
	public $tag;
12
	public $favourites;
13
	public $category;
14
	public $portation;
15
	public $admin;
16
	public $stats;
17
	public $bug;
18
19 112
	public function __construct() {
20 112
		parent::__construct();
21
22
		//Modules
23 112
		$this->title      = new Tracker_Title_Model();
24 112
		$this->list       = new Tracker_List_Model();
25 112
		$this->favourites = new Tracker_Favourites_Model();
26 112
		$this->tag        = new Tracker_Tag_Model();
27 112
		$this->category   = new Tracker_Category_Model();
28 112
		$this->portation  = new Tracker_Portation_Model();
29 112
		$this->admin      = new Tracker_Admin_Model();
30 112
		$this->stats      = new Tracker_Stats_Model();
31 112
		$this->bug        = new Tracker_Bug_Model();
32 112
	}
33
}
34