Completed
Push — master ( 5ae889...256588 )
by Angus
08:21
created
application/models/Tracker/Tracker_Favourites_Model.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1); defined('BASEPATH') OR exit('No direct script access allowed');
1
+<?php declare(strict_types = 1); defined('BASEPATH') OR exit('No direct script access allowed');
2 2
 
3 3
 class Tracker_Favourites_Model extends Tracker_Base_Model {
4 4
 	public function __construct() {
@@ -14,8 +14,8 @@  discard block
 block discarded – undo
14 14
 			          tf.chapter, tf.updated_at', FALSE)
15 15
 			->from('tracker_favourites AS tf')
16 16
 			->join('tracker_chapters AS tc', 'tf.chapter_id = tc.id', 'left')
17
-			->join('tracker_titles AS tt',   'tc.title_id = tt.id',   'left')
18
-			->join('tracker_sites AS ts',    'tt.site_id = ts.id',    'left')
17
+			->join('tracker_titles AS tt', 'tc.title_id = tt.id', 'left')
18
+			->join('tracker_sites AS ts', 'tt.site_id = ts.id', 'left')
19 19
 			->where('tc.user_id', $this->User->id) //CHECK: Is this inefficient? Would it be better to have a user_id column in tracker_favourites?
20 20
 			->order_by('tf.id DESC')
21 21
 			->limit($rowsPerPage, ($rowsPerPage * ($page - 1)))
@@ -50,8 +50,8 @@  discard block
 block discarded – undo
50 50
 			          tf.chapter, tf.updated_at', FALSE)
51 51
 			->from('tracker_favourites AS tf')
52 52
 			->join('tracker_chapters AS tc', 'tf.chapter_id = tc.id', 'left')
53
-			->join('tracker_titles AS tt',   'tc.title_id = tt.id',   'left')
54
-			->join('tracker_sites AS ts',    'tt.site_id = ts.id',    'left')
53
+			->join('tracker_titles AS tt', 'tc.title_id = tt.id', 'left')
54
+			->join('tracker_sites AS ts', 'tt.site_id = ts.id', 'left')
55 55
 			->where('tc.user_id', $this->User->id) //CHECK: Is this inefficient? Would it be better to have a user_id column in tracker_favourites?
56 56
 			->order_by('tf.id DESC')
57 57
 			->get();
Please login to merge, or discard this patch.
application/models/Tracker/Tracker_Portation_Model.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1); defined('BASEPATH') OR exit('No direct script access allowed');
1
+<?php declare(strict_types = 1); defined('BASEPATH') OR exit('No direct script access allowed');
2 2
 
3 3
 //http://english.stackexchange.com/a/141735
4 4
 class Tracker_Portation_Model extends Tracker_Base_Model {
@@ -61,7 +61,7 @@  discard block
 block discarded – undo
61 61
 
62 62
 		$arr = [];
63 63
 		if($query->num_rows() > 0) {
64
-			foreach ($query->result() as $row) {
64
+			foreach($query->result() as $row) {
65 65
 				$arr[$row->category][] = [
66 66
 					'site'            => $row->site,
67 67
 					'title_url'       => $row->title_url,
@@ -94,15 +94,15 @@  discard block
 block discarded – undo
94 94
 		$enclosure_esc = preg_quote($enclosure, '/');
95 95
 
96 96
 		$output = array();
97
-		foreach ($fields as $field) {
98
-			if ($field === NULL && $nullToMysqlNull) {
97
+		foreach($fields as $field) {
98
+			if($field === NULL && $nullToMysqlNull) {
99 99
 				$output[] = 'NULL';
100 100
 				continue;
101 101
 			}
102 102
 
103 103
 			// Enclose fields containing $delimiter, $enclosure or whitespace
104
-			if ($encloseAll || preg_match("/(?:${delimiter_esc}|${enclosure_esc}|\s)/", $field)) {
105
-				$output[] = $enclosure . str_replace($enclosure, $enclosure . $enclosure, $field) . $enclosure;
104
+			if($encloseAll || preg_match("/(?:${delimiter_esc}|${enclosure_esc}|\s)/", $field)) {
105
+				$output[] = $enclosure.str_replace($enclosure, $enclosure.$enclosure, $field).$enclosure;
106 106
 			} else {
107 107
 				$output[] = $field;
108 108
 			}
@@ -116,10 +116,10 @@  discard block
 block discarded – undo
116 116
 			$csvArr[] = $headers;
117 117
 		}
118 118
 
119
-		foreach ($fields as $field) {
120
-			$csvArr[] = $this->arrayToCSV($field, $delimiter, $enclosure,$encloseAll,$nullToMysqlNull);
119
+		foreach($fields as $field) {
120
+			$csvArr[] = $this->arrayToCSV($field, $delimiter, $enclosure, $encloseAll, $nullToMysqlNull);
121 121
 		}
122 122
 
123
-		return implode(PHP_EOL,$csvArr);
123
+		return implode(PHP_EOL, $csvArr);
124 124
 	}
125 125
 }
Please login to merge, or discard this patch.
application/controllers/AdminCLI.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -64,7 +64,7 @@
 block discarded – undo
64 64
 		print "Testing site\n";
65 65
 		switch($type) {
66 66
 			case 'update':
67
-				if(!is_null($extra )) {
67
+				if(!is_null($extra)) {
68 68
 					print_r($this->Tracker->sites->{$site}->getTitleData($extra));
69 69
 				}
70 70
 				break;
Please login to merge, or discard this patch.
application/config/autoload.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -139,4 +139,4 @@
 block discarded – undo
139 139
 	'History_Model'      => 'History'
140 140
 );
141 141
 
142
-require_once APPPATH . '../vendor/erusev/parsedown/Parsedown.php';
142
+require_once APPPATH.'../vendor/erusev/parsedown/Parsedown.php';
Please login to merge, or discard this patch.
application/models/Tracker/Tracker_Issue_Model.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php declare(strict_types=1); defined('BASEPATH') OR exit('No direct script access allowed');
1
+<?php declare(strict_types = 1); defined('BASEPATH') OR exit('No direct script access allowed');
2 2
 
3 3
 class Tracker_Issue_Model extends Tracker_Base_Model {
4 4
 	public function __construct() {
Please login to merge, or discard this patch.
application/controllers/ReportIssue.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,12 +12,12 @@
 block discarded – undo
12 12
 		$this->header_data['page']  = "report-issue";
13 13
 
14 14
 		$this->form_validation->set_rules('issue_description', 'Description', 'required|max_length[255]');
15
-		$this->form_validation->set_rules('issue_url',         'URL',         'valid_url');
15
+		$this->form_validation->set_rules('issue_url', 'URL', 'valid_url');
16 16
 
17 17
 		$this->body_data['issue_submitted'] = FALSE;
18 18
 		if($isValid = $this->form_validation->run() === TRUE) {
19 19
 			//send report
20
-			$this->body_data['issue_submitted'] = $this->Tracker->issue->report("USERID:" . $this->User->id . " ||| " . $this->input->post('issue_description'), NULL, $this->input->post('issue_url'));
20
+			$this->body_data['issue_submitted'] = $this->Tracker->issue->report("USERID:".$this->User->id." ||| ".$this->input->post('issue_description'), NULL, $this->input->post('issue_url'));
21 21
 		}
22 22
 
23 23
 		if(!$isValid) {
Please login to merge, or discard this patch.
application/config/routes.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 //TEMP
80 80
 $route['user/dashboard_beta'] = 'User/DashboardBeta';
81 81
 
82
-$route['api/internal/get_list']                                                  = 'API/Internal/GetList';
82
+$route['api/internal/get_list'] = 'API/Internal/GetList';
83 83
 $route['api/internal/get_list/(all|reading|on-hold|plan-to-read|(custom(?:1|2|3)))'] = 'API/Internal/GetList/index/$1';
84 84
 
85 85
 $route['ajax/username_check']['post'] = 'Ajax/UsernameCheck'; //rate limited
@@ -101,7 +101,7 @@  discard block
 block discarded – undo
101 101
 
102 102
 $route['import_amr']                  = 'Import_AMR';
103 103
 
104
-$route['report_issue']      = 'ReportIssue';
104
+$route['report_issue'] = 'ReportIssue';
105 105
 
106 106
 $route['stats']       = 'Stats';
107 107
 $route['help']        = 'Help';
Please login to merge, or discard this patch.
application/models/Tracker/Tracker_Stats_Model.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1); defined('BASEPATH') OR exit('No direct script access allowed');
1
+<?php declare(strict_types = 1); defined('BASEPATH') OR exit('No direct script access allowed');
2 2
 
3 3
 class Tracker_Stats_Model extends Tracker_Base_Model {
4 4
 	public function __construct() {
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 				], FALSE)
29 29
 				->from('tracker_chapters')
30 30
 				->join('tracker_titles', 'tracker_titles.id = tracker_chapters.title_id', 'left')
31
-				->join('tracker_sites','tracker_titles.site_id = tracker_sites.id', 'left')
31
+				->join('tracker_sites', 'tracker_titles.site_id = tracker_sites.id', 'left')
32 32
 				->where('tracker_sites.status', 'enabled')
33 33
 				->group_by('tracker_chapters.title_id')
34 34
 				->having('count > 1')
Please login to merge, or discard this patch.
_scripts/generate_foolslide.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@  discard block
 block discarded – undo
1
-<?php declare(strict_types=1);
1
+<?php declare(strict_types = 1);
2 2
 
3 3
 if(!extension_loaded('gd')) die('GD ext is required to run this!');
4 4
 
@@ -9,7 +9,7 @@  discard block
 block discarded – undo
9 9
 	private $className;
10 10
 
11 11
 	public function __construct() {
12
-		if(isset($_SERVER['argv']) && count($_SERVER['argv']) === 3){
12
+		if(isset($_SERVER['argv']) && count($_SERVER['argv']) === 3) {
13 13
 			$this->baseURL   = rtrim($_SERVER['argv'][1], '/');
14 14
 			$this->className = $_SERVER['argv'][2];
15 15
 
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 
30 30
 		$this->updateDocs();
31 31
 
32
-		$domain =  preg_replace('#^https?://(.*?)(?:/.*?)?$#', '$1', $this->baseURL);
32
+		$domain = preg_replace('#^https?://(.*?)(?:/.*?)?$#', '$1', $this->baseURL);
33 33
 		say("\nAdmin SQL:");
34 34
 		say("INSERT INTO `mangatracker_development`.`tracker_sites` (`id`, `site`, `site_class`, `status`, `use_custom`) VALUES (NULL, '{$domain}', '{$this->className}', 'enabled', 'Y');");
35 35
 		say("INSERT INTO `mangatracker_production`.`tracker_sites` (`id`, `site`, `site_class`, `status`, `use_custom`) VALUES (NULL, '{$domain}', '{$this->className}', 'enabled', 'Y');");
@@ -97,12 +97,12 @@  discard block
 block discarded – undo
97 97
 
98 98
 		//Update @updated
99 99
 		$currentDate = date("Y-m-d", time());
100
-		$baseFile = str_replace("@updated      {$matches[1]}","@updated      {$currentDate}", $baseFile);
100
+		$baseFile = str_replace("@updated      {$matches[1]}", "@updated      {$currentDate}", $baseFile);
101 101
 
102 102
 		//Update @version
103 103
 		$currentVersion = explode('.', $matches[2]);
104
-		$newVersion = "{$currentVersion[0]}.{$currentVersion[1]}.". (((int) $currentVersion[2]) + 1);
105
-		$baseFile = str_replace("@version      {$matches[2]}","@version      {$newVersion}", $baseFile);
104
+		$newVersion = "{$currentVersion[0]}.{$currentVersion[1]}.".(((int) $currentVersion[2]) + 1);
105
+		$baseFile = str_replace("@version      {$matches[2]}", "@version      {$newVersion}", $baseFile);
106 106
 
107 107
 		//Add @require
108 108
 		// @resource     fontAwesome
Please login to merge, or discard this patch.