Completed
Push — master ( 3ee909...1f6bf8 )
by Angus
03:33
created
application/models/User_Model.php 4 patches
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -71,7 +71,7 @@
 block discarded – undo
71 71
 			if($query->num_rows() > 0) {
72 72
 				//username exists, grab email
73 73
 				$email = $query->row('email');
74
-			}else{
74
+			} else {
75 75
 				//username doesn't exist, return FALSE
76 76
 				$email = FALSE;
77 77
 			}
Please login to merge, or discard this patch.
Upper-Lower-Casing   +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 User_Model extends CI_Model {
4 4
 	public $id;
Please login to merge, or discard this patch.
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -45,9 +45,9 @@  discard block
 block discarded – undo
45 45
 		$this->load->database();
46 46
 
47 47
 		$query = $this->db->select('*')
48
-		                  ->from('auth_users')
49
-		                  ->where('username', $username)
50
-		                  ->get();
48
+						  ->from('auth_users')
49
+						  ->where('username', $username)
50
+						  ->get();
51 51
 
52 52
 		return (bool) $query->num_rows();
53 53
 	}
@@ -69,9 +69,9 @@  discard block
 block discarded – undo
69 69
 			$this->load->database();
70 70
 
71 71
 			$query = $this->db->select('email')
72
-			                  ->from('auth_users')
73
-			                  ->where('username', $identity)
74
-			                  ->get();
72
+							  ->from('auth_users')
73
+							  ->where('username', $identity)
74
+							  ->get();
75 75
 
76 76
 			if($query->num_rows() > 0) {
77 77
 				//username exists, grab email
@@ -89,9 +89,9 @@  discard block
 block discarded – undo
89 89
 		$user = NULL;
90 90
 
91 91
 		$query = $this->db->select('*')
92
-		                  ->from('auth_users')
93
-		                  ->where('username', $username)
94
-		                  ->get();
92
+						  ->from('auth_users')
93
+						  ->where('username', $username)
94
+						  ->get();
95 95
 
96 96
 		if($query->num_rows() > 0) {
97 97
 			$user = $query->row();
@@ -120,12 +120,12 @@  discard block
 block discarded – undo
120 120
 		$api_key = NULL;
121 121
 		if($this->logged_in()) {
122 122
 			$this->db->select('api_key')
123
-			         ->where('id', $this->User->id)
124
-			         ->get('auth_users');
123
+					 ->where('id', $this->User->id)
124
+					 ->get('auth_users');
125 125
 
126 126
 			$query = $this->db->select('api_key')
127
-			                  ->where('id', $this->User->id)
128
-			                  ->get('auth_users');
127
+							  ->where('id', $this->User->id)
128
+							  ->get('auth_users');
129 129
 
130 130
 			if($query->num_rows() > 0) {
131 131
 				$api_key = $query->row('api_key');
@@ -137,9 +137,9 @@  discard block
 block discarded – undo
137 137
 	
138 138
 	public function get_id_from_api_key(string $api_key) {
139 139
 		$query = $this->db->select('id')
140
-		                  ->from('auth_users')
141
-		                  ->where('api_key', $api_key)
142
-		                  ->get();
140
+						  ->from('auth_users')
141
+						  ->where('api_key', $api_key)
142
+						  ->get();
143 143
 
144 144
 		if($query->num_rows() > 0) {
145 145
 			$userID = $query->row('id');
@@ -201,12 +201,12 @@  discard block
 block discarded – undo
201 201
 	}
202 202
 	public function hideLatestNotice() {
203 203
 		$idQuery = $this->db->select('1')
204
-		                    ->where('user_id', $this->User->id)
205
-		                    ->get('tracker_user_notices');
204
+							->where('user_id', $this->User->id)
205
+							->get('tracker_user_notices');
206 206
 		if($idQuery->num_rows() > 0) {
207 207
 			$success = (bool) $this->db->set('hidden_notice_id', '(SELECT id FROM tracker_notices ORDER BY id DESC LIMIT 1)', FALSE)
208
-			                           ->where('user_id', $this->User->id)
209
-			                           ->update('tracker_user_notices');
208
+									   ->where('user_id', $this->User->id)
209
+									   ->update('tracker_user_notices');
210 210
 		} else {
211 211
 			$success = (bool) $this->db->insert('tracker_user_notices', [
212 212
 				'user_id'           => $this->User->id,
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 			if($query->num_rows() > 0) {
77 77
 				//username exists, grab email
78 78
 				$email = $query->row('email');
79
-			}else{
79
+			} else {
80 80
 				//username doesn't exist, return FALSE
81 81
 				$email = FALSE;
82 82
 			}
@@ -108,7 +108,7 @@  discard block
 block discarded – undo
108 108
 	public function get_new_api_key() : string {
109 109
 		$api_key = NULL;
110 110
 		if($this->logged_in()) {
111
-			$api_key = substr("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", mt_rand(0, 51), 1) . substr(md5((string) time()), 1);
111
+			$api_key = substr("abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ", mt_rand(0, 51), 1).substr(md5((string) time()), 1);
112 112
 
113 113
 			$this->db->where('id', $this->id);
114 114
 			$this->db->update('auth_users', ['api_key' => $api_key]);
Please login to merge, or discard this patch.
application/config/email.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php defined('BASEPATH') OR exit('No direct script access allowed');
1
+<?php defined('BASEPATH') or exit('No direct script access allowed');
2 2
 
3 3
 /*
4 4
 | -------------------------------------------------------------------
Please login to merge, or discard this patch.
application/config/migration.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-defined('BASEPATH') OR exit('No direct script access allowed');
2
+defined('BASEPATH') or exit('No direct script access allowed');
3 3
 
4 4
 /*
5 5
 |--------------------------------------------------------------------------
Please login to merge, or discard this patch.
application/config/testing/migration.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php defined('BASEPATH') OR exit('No direct script access allowed');
1
+<?php defined('BASEPATH') or exit('No direct script access allowed');
2 2
 
3 3
 /*
4 4
 |--------------------------------------------------------------------------
Please login to merge, or discard this patch.
application/config/profiler.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-defined('BASEPATH') OR exit('No direct script access allowed');
2
+defined('BASEPATH') or exit('No direct script access allowed');
3 3
 
4 4
 /*
5 5
 | -------------------------------------------------------------------------
Please login to merge, or discard this patch.
application/config/user_agents.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-defined('BASEPATH') OR exit('No direct script access allowed');
2
+defined('BASEPATH') or exit('No direct script access allowed');
3 3
 
4 4
 /*
5 5
 | -------------------------------------------------------------------
Please login to merge, or discard this patch.
application/config/routes.php 2 patches
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php defined('BASEPATH') OR exit('No direct script access allowed');
1
+<?php defined('BASEPATH') or exit('No direct script access allowed');
2 2
 
3 3
 /*
4 4
 | -------------------------------------------------------------------------
Please login to merge, or discard this 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/config/mimes.php 2 patches
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@
 block discarded – undo
76 76
 	'jpeg'	=>	array('image/jpeg', 'image/pjpeg'),
77 77
 	'jpg'	=>	array('image/jpeg', 'image/pjpeg'),
78 78
 	'jpe'	=>	array('image/jpeg', 'image/pjpeg'),
79
-	'png'	=>	array('image/png',  'image/x-png'),
79
+	'png'	=>	array('image/png', 'image/x-png'),
80 80
 	'tiff'	=>	'image/tiff',
81 81
 	'tif'	=>	'image/tiff',
82 82
 	'css'	=>	array('text/css', 'text/plain'),
Please login to merge, or discard this patch.
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,4 +1,4 @@
 block discarded – undo
1
-<?php defined('BASEPATH') OR exit('No direct script access allowed');
1
+<?php defined('BASEPATH') or exit('No direct script access allowed');
2 2
 
3 3
 /*
4 4
 | -------------------------------------------------------------------
Please login to merge, or discard this patch.
application/config/doctypes.php 1 patch
Upper-Lower-Casing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,5 +1,5 @@
 block discarded – undo
1 1
 <?php
2
-defined('BASEPATH') OR exit('No direct script access allowed');
2
+defined('BASEPATH') or exit('No direct script access allowed');
3 3
 
4 4
 $_doctypes = array(
5 5
 	'xhtml11' => '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">',
Please login to merge, or discard this patch.