Passed
Push — master ( 5a5c41...fade3b )
by Cody
04:50 queued 10s
created
classes/pref/labels.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 
36 36
 			print "</section>";
37 37
 
38
-			print "<header>" . __("Colors") . "</header>";
38
+			print "<header>".__("Colors")."</header>";
39 39
 			print "<section>";
40 40
 
41 41
 			print "<table>";
@@ -93,7 +93,7 @@  discard block
 block discarded – undo
93 93
 
94 94
 		while ($line = $sth->fetch()) {
95 95
 			$label = array();
96
-			$label['id'] = 'LABEL:' . $line['id'];
96
+			$label['id'] = 'LABEL:'.$line['id'];
97 97
 			$label['bare_id'] = $line['id'];
98 98
 			$label['name'] = $line['caption'];
99 99
 			$label['fg_color'] = $line['fg_color'];
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 		print "<div dojoType='fox.Toolbar'>";
255 255
 
256 256
 		print "<div dojoType='fox.form.DropDownButton'>".
257
-				"<span>" . __('Select')."</span>";
257
+				"<span>".__('Select')."</span>";
258 258
 		print "<div dojoType=\"dijit.Menu\" style=\"display: none;\">";
259 259
 		print "<div onclick=\"dijit.byId('labelTree').model.setAllChecked(true)\"
260 260
 			dojoType=\"dijit.MenuItem\">".__('All')."</div>";
Please login to merge, or discard this patch.
classes/pref/users.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 				}
53 53
 
54 54
 				print "<fieldset>";
55
-				print "<label>" . __("Login:") . "</label>";
55
+				print "<label>".__("Login:")."</label>";
56 56
 				print "<input style='font-size : 16px'
57 57
 					dojoType='dijit.form.ValidationTextBox' required='1'
58 58
 					$sel_disabled name='login' value=\"$login\">";
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 
66 66
 				print "<fieldset>";
67 67
 
68
-				print "<label>" . __('Access level: ') . "</label> ";
68
+				print "<label>".__('Access level: ')."</label> ";
69 69
 
70 70
 				if (!$sel_disabled) {
71 71
 					print_select_hash("access_level", $access_level, $access_level_names,
@@ -79,7 +79,7 @@  discard block
 block discarded – undo
79 79
 				print "</fieldset>";
80 80
 				print "<fieldset>";
81 81
 
82
-				print "<label>" . __("New password:") . "</label> ";
82
+				print "<label>".__("New password:")."</label> ";
83 83
 				print "<input dojoType='dijit.form.TextBox' type='password' size='20' placeholder='Change password'
84 84
 					name='password'>";
85 85
 
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 				print "<section>";
92 92
 
93 93
 				print "<fieldset>";
94
-				print "<label>" . __("E-mail:") . "</label> ";
94
+				print "<label>".__("E-mail:")."</label> ";
95 95
 				print "<input dojoType='dijit.form.TextBox' size='30' name='email'
96 96
 					value=\"$email\">";
97 97
 				print "</fieldset>";
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
 			}
338 338
 
339 339
 			print "<div dojoType='fox.form.DropDownButton'>".
340
-					"<span>" . __('Select')."</span>";
340
+					"<span>".__('Select')."</span>";
341 341
 			print "<div dojoType='dijit.Menu' style='display: none'>";
342 342
 			print "<div onclick=\"Tables.select('prefUserList', true)\"
343 343
 				dojoType='dijit.MenuItem'>".__('All')."</div>";
@@ -405,12 +405,12 @@  discard block
 block discarded – undo
405 405
 				print "<td align='center'><input onclick='Tables.onRowChecked(this); event.stopPropagation();'
406 406
 					dojoType='dijit.form.CheckBox' type='checkbox'></td>";
407 407
 
408
-				print "<td title='".__('Click to edit')."'><i class='material-icons'>person</i> " . $line["login"] . "</td>";
408
+				print "<td title='".__('Click to edit')."'><i class='material-icons'>person</i> ".$line["login"]."</td>";
409 409
 
410
-				print "<td>" .	$access_level_names[$line["access_level"]] . "</td>";
411
-				print "<td>" . $line["num_feeds"] . "</td>";
412
-				print "<td>" . $line["created"] . "</td>";
413
-				print "<td>" . $line["last_login"] . "</td>";
410
+				print "<td>".$access_level_names[$line["access_level"]]."</td>";
411
+				print "<td>".$line["num_feeds"]."</td>";
412
+				print "<td>".$line["created"]."</td>";
413
+				print "<td>".$line["last_login"]."</td>";
414 414
 
415 415
 				print "</tr>";
416 416
 
Please login to merge, or discard this patch.
classes/debug.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -40,7 +40,7 @@  discard block
 block discarded – undo
40 40
 
41 41
         $ts = strftime("%H:%M:%S", time());
42 42
         if (function_exists('posix_getpid')) {
43
-            $ts = "$ts/" . posix_getpid();
43
+            $ts = "$ts/".posix_getpid();
44 44
         }
45 45
 
46 46
         if (Debug::$logfile) {
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 
61 61
                     if (!$locked) {
62 62
                         fclose($fp);
63
-                        user_error("Unable to lock debugging log file: " . Debug::$logfile, E_USER_WARNING);
63
+                        user_error("Unable to lock debugging log file: ".Debug::$logfile, E_USER_WARNING);
64 64
                         return;
65 65
                     }
66 66
                 }
@@ -77,7 +77,7 @@  discard block
 block discarded – undo
77 77
                     return;
78 78
 
79 79
             } else {
80
-                user_error("Unable to open debugging log file: " . Debug::$logfile, E_USER_WARNING);
80
+                user_error("Unable to open debugging log file: ".Debug::$logfile, E_USER_WARNING);
81 81
             }
82 82
         }
83 83
 
Please login to merge, or discard this patch.
classes/logger/syslog.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@
 block discarded – undo
24 24
 			$priority = LOG_INFO;
25 25
 		}
26 26
 
27
-		$errname = Logger::$errornames[$errno] . " ($errno)";
27
+		$errname = Logger::$errornames[$errno]." ($errno)";
28 28
 
29 29
 		syslog($priority, "[tt-rss] $errname ($file:$line) $errstr");
30 30
 
Please login to merge, or discard this patch.
classes/logger/sql.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@
 block discarded – undo
23 23
 
24 24
 			foreach ($server_params as $n => $p) {
25 25
 				if (isset($_SERVER[$p]))
26
-					$context .= "\n$n: " . $_SERVER[$p];
26
+					$context .= "\n$n: ".$_SERVER[$p];
27 27
 			}
28 28
 
29 29
 			// passed error message may contain invalid unicode characters, failing to insert an error here
Please login to merge, or discard this patch.
classes/digest.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 					time() - $preferred_ts <= 7200
38 38
 				) {
39 39
 
40
-					Debug::log("Sending digest for UID:" . $line['id'] . " - " . $line["email"]);
40
+					Debug::log("Sending digest for UID:".$line['id']." - ".$line["email"]);
41 41
 
42 42
 					$do_catchup = get_pref('DIGEST_CATCHUP', $line['id'], false);
43 43
 
@@ -123,13 +123,13 @@  discard block
 block discarded – undo
123 123
 
124 124
 		$sth = $pdo->prepare("SELECT ttrss_entries.title,
125 125
 				ttrss_feeds.title AS feed_title,
126
-				COALESCE(ttrss_feed_categories.title, '" . __('Uncategorized') . "') AS cat_title,
126
+				COALESCE(ttrss_feed_categories.title, '" . __('Uncategorized')."') AS cat_title,
127 127
 				date_updated,
128 128
 				ttrss_user_entries.ref_id,
129 129
 				link,
130 130
 				score,
131 131
 				content,
132
-				" . SUBSTRING_FOR_DATE . "(last_updated,1,19) AS last_updated
132
+				" . SUBSTRING_FOR_DATE."(last_updated,1,19) AS last_updated
133 133
 			FROM
134 134
 				ttrss_user_entries,ttrss_entries,ttrss_feeds
135 135
 			LEFT JOIN
@@ -165,7 +165,7 @@  discard block
 block discarded – undo
165 165
 				$user_id);
166 166
 
167 167
 			if (get_pref('ENABLE_FEED_CATS', $user_id)) {
168
-				$line['feed_title'] = $line['cat_title'] . " / " . $line['feed_title'];
168
+				$line['feed_title'] = $line['cat_title']." / ".$line['feed_title'];
169 169
 			}
170 170
 
171 171
 			$article_labels = Article::get_article_labels($line["ref_id"], $user_id);
Please login to merge, or discard this patch.
classes/ccache.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -135,7 +135,7 @@  discard block
 block discarded – undo
135 135
 				$sth->execute([":uid" => $owner_uid, ":cat" => $feed_id]);
136 136
 
137 137
 				while ($line = $sth->fetch()) {
138
-					CCache::update((int)$line["id"], $owner_uid, false, false);
138
+					CCache::update((int) $line["id"], $owner_uid, false, false);
139 139
 				}
140 140
 			}
141 141
 
@@ -197,7 +197,7 @@  discard block
 block discarded – undo
197 197
 					$sth->execute([$owner_uid, $feed_id]);
198 198
 
199 199
 					if ($row = $sth->fetch()) {
200
-						CCache::update((int)$row["cat_id"], $owner_uid, true, true, true);
200
+						CCache::update((int) $row["cat_id"], $owner_uid, true, true, true);
201 201
 					}
202 202
 				}
203 203
 			}
Please login to merge, or discard this patch.
classes/feeditem/common.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -175,7 +175,7 @@
 block discarded – undo
175 175
 
176 176
 			// we don't support numeric tags
177 177
 			if (is_numeric($cat))
178
-				$cat = 't:' . $cat;
178
+				$cat = 't:'.$cat;
179 179
 
180 180
 			$cat = preg_replace('/[,\'\"]/', "", $cat);
181 181
 
Please login to merge, or discard this patch.
classes/handler/public.php 1 patch
Spacing   +28 added lines, -29 removed lines patch added patch discarded remove patch
@@ -7,7 +7,7 @@  discard block
 block discarded – undo
7 7
 
8 8
 		require_once "lib/MiniTemplator.class.php";
9 9
 
10
-		$note_style = 	"background-color : #fff7d5;
10
+		$note_style = "background-color : #fff7d5;
11 11
 			border-width : 1px; ".
12 12
 			"padding : 5px; border-style : dashed; border-color : #e7d796;".
13 13
 			"margin-bottom : 1em; color : #9a8c59;";
@@ -73,8 +73,8 @@  discard block
 block discarded – undo
73 73
 		$feed_site_url = $qfh_ret[2];
74 74
 		/* $last_error = $qfh_ret[3]; */
75 75
 
76
-		$feed_self_url = get_self_url_prefix() .
77
-			"/public.php?op=rss&id=$feed&key=" .
76
+		$feed_self_url = get_self_url_prefix().
77
+			"/public.php?op=rss&id=$feed&key=".
78 78
 			Feeds::get_feed_access_key($feed, false, $owner_uid);
79 79
 
80 80
 		if (!$feed_site_url) $feed_site_url = get_self_url_prefix();
@@ -102,8 +102,7 @@  discard block
 block discarded – undo
102 102
 				}
103 103
 
104 104
 				$tpl->setVariable('ARTICLE_ID',
105
-					htmlspecialchars($orig_guid ? $line['link'] :
106
-							$this->make_article_tag_uri($line['id'], $line['date_entered'])), true);
105
+					htmlspecialchars($orig_guid ? $line['link'] : $this->make_article_tag_uri($line['id'], $line['date_entered'])), true);
107 106
 				$tpl->setVariable('ARTICLE_LINK', htmlspecialchars($line['link']), true);
108 107
 				$tpl->setVariable('ARTICLE_TITLE', htmlspecialchars($line['title']), true);
109 108
 				$tpl->setVariable('ARTICLE_EXCERPT', $line["content_preview"], true);
@@ -112,7 +111,7 @@  discard block
 block discarded – undo
112 111
 					$feed_site_url, false, $line["id"]);
113 112
 
114 113
 				if ($line['note']) {
115
-					$content = "<div style=\"$note_style\">Article note: " . $line['note'] . "</div>" .
114
+					$content = "<div style=\"$note_style\">Article note: ".$line['note']."</div>".
116 115
 						$content;
117 116
 					$tpl->setVariable('ARTICLE_NOTE', htmlspecialchars($line['note']), true);
118 117
 				}
@@ -201,7 +200,7 @@  discard block
 block discarded – undo
201 200
 				$article = array();
202 201
 
203 202
 				$article['id'] = $line['link'];
204
-				$article['link']	= $line['link'];
203
+				$article['link'] = $line['link'];
205 204
 				$article['title'] = $line['title'];
206 205
 				$article['excerpt'] = $line["content_preview"];
207 206
 				$article['content'] = sanitize($line["content"], false, $owner_uid, $feed_site_url, false, $line["id"]);
@@ -277,13 +276,13 @@  discard block
 block discarded – undo
277 276
 			WHERE ttrss_users.id = ttrss_settings_profiles.owner_uid AND login = ? ORDER BY title");
278 277
 			$sth->execute([$login]);
279 278
 
280
-			$rv = [ [ "value" => 0, "label" => __("Default profile") ] ];
279
+			$rv = [["value" => 0, "label" => __("Default profile")]];
281 280
 
282 281
 			while ($line = $sth->fetch()) {
283 282
 				$id = $line["id"];
284 283
 				$title = $line["title"];
285 284
 
286
-				array_push($rv, [ "label" => $title, "value" => $id ]);
285
+				array_push($rv, ["label" => $title, "value" => $id]);
287 286
 			}
288 287
 	    }
289 288
 
@@ -384,7 +383,7 @@  discard block
 block discarded – undo
384 383
             list ($og_image, $og_stream) = Article::get_article_image($enclosures, $line['content'], $line["site_url"]);
385 384
 
386 385
             if ($og_image) {
387
-                $rv .= "<meta property='og:image' content=\"" . htmlspecialchars($og_image) . "\"/>";
386
+                $rv .= "<meta property='og:image' content=\"".htmlspecialchars($og_image)."\"/>";
388 387
             }
389 388
 
390 389
             $rv .= "<body class='flat ttrss_utility ttrss_zoom'>";
@@ -393,9 +392,9 @@  discard block
 block discarded – undo
393 392
 			if ($line["link"]) {
394 393
 				$rv .= "<h1><a target='_blank' rel='noopener noreferrer'
395 394
 					title=\"".htmlspecialchars($line['title'])."\"
396
-					href=\"" .htmlspecialchars($line["link"]) . "\">" .	$line["title"] . "</a></h1>";
395
+					href=\"" .htmlspecialchars($line["link"])."\">".$line["title"]."</a></h1>";
397 396
 			} else {
398
-				$rv .= "<h1>" . $line["title"] . "</h1>";
397
+				$rv .= "<h1>".$line["title"]."</h1>";
399 398
 			}
400 399
 
401 400
 			$rv .= "<div class='content post'>";
@@ -448,8 +447,8 @@  discard block
 block discarded – undo
448 447
 		$feed = clean($_REQUEST["id"]);
449 448
 		$key = clean($_REQUEST["key"]);
450 449
 		$is_cat = clean($_REQUEST["is_cat"]);
451
-		$limit = (int)clean($_REQUEST["limit"]);
452
-		$offset = (int)clean($_REQUEST["offset"]);
450
+		$limit = (int) clean($_REQUEST["limit"]);
451
+		$offset = (int) clean($_REQUEST["offset"]);
453 452
 
454 453
 		$search = clean($_REQUEST["q"]);
455 454
 		$view_mode = clean($_REQUEST["view-mode"]);
@@ -692,9 +691,9 @@  discard block
 block discarded – undo
692 691
 			$return = clean($_REQUEST['return']);
693 692
 
694 693
 			if ($_REQUEST['return'] && mb_strpos($return, SELF_URL_PATH) === 0) {
695
-				header("Location: " . clean($_REQUEST['return']));
694
+				header("Location: ".clean($_REQUEST['return']));
696 695
 			} else {
697
-				header("Location: " . get_self_url_prefix());
696
+				header("Location: ".get_self_url_prefix());
698 697
 			}
699 698
 		}
700 699
 	}
@@ -786,7 +785,7 @@  discard block
 block discarded – undo
786 785
 					print "<input type='hidden' name='op' value='subscribe'>";
787 786
 
788 787
 					print "<fieldset>";
789
-					print "<label style='display : inline'>" . __("Multiple feed URLs found:") . "</label>";
788
+					print "<label style='display : inline'>".__("Multiple feed URLs found:")."</label>";
790 789
 					print "<select name='feed_url' dojoType='dijit.form.Select'>";
791 790
 
792 791
 					foreach ($feed_urls as $url => $name) {
@@ -805,9 +804,9 @@  discard block
 block discarded – undo
805 804
 					print "</form>";
806 805
 				}
807 806
 
808
-				$tp_uri = get_self_url_prefix() . "/prefs.php";
807
+				$tp_uri = get_self_url_prefix()."/prefs.php";
809 808
 
810
-				if ($rc['code'] <= 2){
809
+				if ($rc['code'] <= 2) {
811 810
 					$sth = $this->pdo->prepare("SELECT id FROM ttrss_feeds WHERE
812 811
 					feed_url = ? AND owner_uid = ?");
813 812
 					$sth->execute([$feed_url, $_SESSION['uid']]);
@@ -895,7 +894,7 @@  discard block
 block discarded – undo
895 894
 					list($timestamp, $resetpass_token) = explode(":", $resetpass_token_full);
896 895
 
897 896
 					if ($timestamp && $resetpass_token &&
898
-						$timestamp >= time() - 15*60*60 &&
897
+						$timestamp >= time() - 15 * 60 * 60 &&
899 898
 						$resetpass_token == $hash) {
900 899
 
901 900
 							$sth = $this->pdo->prepare("UPDATE ttrss_users SET resetpass_token = NULL
@@ -935,8 +934,8 @@  discard block
 block discarded – undo
935 934
 				<input dojoType='dijit.form.TextBox' type='email' name='email' value='' required>
936 935
 				</fieldset>";
937 936
 
938
-			$_SESSION["pwdreset:testvalue1"] = rand(1,10);
939
-			$_SESSION["pwdreset:testvalue2"] = rand(1,10);
937
+			$_SESSION["pwdreset:testvalue1"] = rand(1, 10);
938
+			$_SESSION["pwdreset:testvalue2"] = rand(1, 10);
940 939
 
941 940
 			print "<fieldset>
942 941
 				<label>".T_sprintf("How much is %d + %d:", $_SESSION["pwdreset:testvalue1"], $_SESSION["pwdreset:testvalue2"])."</label>
@@ -981,8 +980,8 @@  discard block
 block discarded – undo
981 980
 
982 981
 					if ($id) {
983 982
 						$resetpass_token = sha1(get_random_bytes(128));
984
-						$resetpass_link = get_self_url_prefix() . "/public.php?op=forgotpass&hash=" . $resetpass_token .
985
-							"&login=" . urlencode($login);
983
+						$resetpass_link = get_self_url_prefix()."/public.php?op=forgotpass&hash=".$resetpass_token.
984
+							"&login=".urlencode($login);
986 985
 
987 986
 						require_once "lib/MiniTemplator.class.php";
988 987
 
@@ -1009,7 +1008,7 @@  discard block
 block discarded – undo
1009 1008
 
1010 1009
 						if (!$rc) print_error($mailer->error());
1011 1010
 
1012
-						$resetpass_token_full = time() . ":" . $resetpass_token;
1011
+						$resetpass_token_full = time().":".$resetpass_token;
1013 1012
 
1014 1013
 						$sth = $this->pdo->prepare("UPDATE ttrss_users
1015 1014
 							SET resetpass_token = ?
@@ -1099,12 +1098,12 @@  discard block
 block discarded – undo
1099 1098
 				if ($op == "performupdate") {
1100 1099
 					if ($updater->isUpdateRequired()) {
1101 1100
 
1102
-						print "<h2>" . T_sprintf("Performing updates to version %d", SCHEMA_VERSION) . "</h2>";
1101
+						print "<h2>".T_sprintf("Performing updates to version %d", SCHEMA_VERSION)."</h2>";
1103 1102
 
1104 1103
 						for ($i = $updater->getSchemaVersion() + 1; $i <= SCHEMA_VERSION; $i++) {
1105 1104
 							print "<ul>";
1106 1105
 
1107
-							print "<li class='text-info'>" . T_sprintf("Updating to version %d", $i) . "</li>";
1106
+							print "<li class='text-info'>".T_sprintf("Updating to version %d", $i)."</li>";
1108 1107
 
1109 1108
 							print "<li>";
1110 1109
 							$result = $updater->performUpdateTo($i, true);
@@ -1123,7 +1122,7 @@  discard block
 block discarded – undo
1123 1122
 
1124 1123
 								return;
1125 1124
 							} else {
1126
-								print "<li class='text-success'>" . __("Completed.") . "</li>";
1125
+								print "<li class='text-success'>".__("Completed.")."</li>";
1127 1126
 								print "</ul>";
1128 1127
 							}
1129 1128
 						}
@@ -1191,7 +1190,7 @@  discard block
 block discarded – undo
1191 1190
 
1192 1191
 		$timestamp = date("Y-m-d", strtotime($timestamp));
1193 1192
 
1194
-		return "tag:" . parse_url(get_self_url_prefix(), PHP_URL_HOST) . ",$timestamp:/$id";
1193
+		return "tag:".parse_url(get_self_url_prefix(), PHP_URL_HOST).",$timestamp:/$id";
1195 1194
 	}
1196 1195
 
1197 1196
 	// this should be used very carefully because this endpoint is exposed to unauthenticated users
Please login to merge, or discard this patch.