Passed
Pull Request — master (#1)
by
unknown
04:51
created
plugins/mail/init.php 2 patches
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -18,7 +18,7 @@  discard block
 block discarded – undo
18 18
 	}
19 19
 
20 20
 	function get_js() {
21
-		return file_get_contents(dirname(__FILE__) . "/mail.js");
21
+		return file_get_contents(dirname(__FILE__)."/mail.js");
22 22
 	}
23 23
 
24 24
 	function save() {
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
 		print "<div dojoType=\"dijit.layout.AccordionPane\" 
36 36
 			title=\"<i class='material-icons'>mail</i> ".__('Mail plugin')."\">";
37 37
 
38
-		print "<p>" . __("You can set predefined email addressed here (comma-separated list):") . "</p>";
38
+		print "<p>".__("You can set predefined email addressed here (comma-separated list):")."</p>";
39 39
 
40 40
 		print "<form dojoType=\"dijit.form.Form\">";
41 41
 
@@ -115,17 +115,17 @@  discard block
 block discarded – undo
115 115
 		$sth->execute(array_merge($ids, [$_SESSION['uid']]));
116 116
 
117 117
 		if (count($ids) > 1) {
118
-			$subject = __("[Forwarded]") . " " . __("Multiple articles");
118
+			$subject = __("[Forwarded]")." ".__("Multiple articles");
119 119
 		}
120 120
 
121 121
 		while ($line = $sth->fetch()) {
122 122
 
123 123
 			if (!$subject)
124
-				$subject = __("[Forwarded]") . " " . htmlspecialchars($line["title"]);
124
+				$subject = __("[Forwarded]")." ".htmlspecialchars($line["title"]);
125 125
 
126 126
 			$tpl->setVariable('ARTICLE_TITLE', strip_tags($line["title"]));
127 127
 			$tnote = strip_tags($line["note"]);
128
-			if( $tnote != ''){
128
+			if ($tnote != '') {
129 129
 				$tpl->setVariable('ARTICLE_NOTE', $tnote, true);
130 130
 				$tpl->addBlock('note');
131 131
 			}
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 			"message" => $message]);
211 211
 
212 212
 		if (!$rc) {
213
-			$reply['error'] =  $mailer->error();
213
+			$reply['error'] = $mailer->error();
214 214
 		} else {
215 215
 			//save_email_address($destination);
216 216
 			$reply['message'] = "UPDATE_COUNTERS";
Please login to merge, or discard this patch.
Braces   +9 added lines, -4 removed lines patch added patch discarded remove patch
@@ -30,7 +30,9 @@  discard block
 block discarded – undo
30 30
 	}
31 31
 
32 32
 	function hook_prefs_tab($args) {
33
-		if ($args != "prefPrefs") return;
33
+		if ($args != "prefPrefs") {
34
+			return;
35
+		}
34 36
 
35 37
 		print "<div dojoType=\"dijit.layout.AccordionPane\" 
36 38
 			title=\"<i class='material-icons'>mail</i> ".__('Mail plugin')."\">";
@@ -94,7 +96,9 @@  discard block
 block discarded – undo
94 96
 			$user_name = htmlspecialchars($row['full_name']);
95 97
 		}
96 98
 
97
-		if (!$user_name) $user_name = $_SESSION['name'];
99
+		if (!$user_name) {
100
+			$user_name = $_SESSION['name'];
101
+		}
98 102
 
99 103
 		print_hidden("from_email", "$user_email");
100 104
 		print_hidden("from_name", "$user_name");
@@ -120,8 +124,9 @@  discard block
 block discarded – undo
120 124
 
121 125
 		while ($line = $sth->fetch()) {
122 126
 
123
-			if (!$subject)
124
-				$subject = __("[Forwarded]") . " " . htmlspecialchars($line["title"]);
127
+			if (!$subject) {
128
+							$subject = __("[Forwarded]") . " " . htmlspecialchars($line["title"]);
129
+			}
125 130
 
126 131
 			$tpl->setVariable('ARTICLE_TITLE', strip_tags($line["title"]));
127 132
 			$tnote = strip_tags($line["note"]);
Please login to merge, or discard this patch.
plugins/share/init.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -17,15 +17,15 @@  discard block
 block discarded – undo
17 17
 	}
18 18
 
19 19
 	function get_js() {
20
-		return file_get_contents(dirname(__FILE__) . "/share.js");
20
+		return file_get_contents(dirname(__FILE__)."/share.js");
21 21
 	}
22 22
 
23 23
 	function get_css() {
24
-		return file_get_contents(dirname(__FILE__) . "/share.css");
24
+		return file_get_contents(dirname(__FILE__)."/share.css");
25 25
 	}
26 26
 
27 27
 	function get_prefs_js() {
28
-		return file_get_contents(dirname(__FILE__) . "/share_prefs.js");
28
+		return file_get_contents(dirname(__FILE__)."/share_prefs.js");
29 29
 	}
30 30
 
31 31
 
@@ -42,7 +42,7 @@  discard block
 block discarded – undo
42 42
 	function hook_prefs_tab_section($id) {
43 43
 		if ($id == "prefFeedsPublishedGenerated") {
44 44
 
45
-			print "<h3>" . __("You can disable all articles shared by unique URLs here.") . "</h3>";
45
+			print "<h3>".__("You can disable all articles shared by unique URLs here.")."</h3>";
46 46
 
47 47
 			print "<button class='alt-danger' dojoType='dijit.form.Button' onclick=\"return Plugins.Share.clearKeys()\">".
48 48
 				__('Unshare all articles')."</button> ";
@@ -100,7 +100,7 @@  discard block
 block discarded – undo
100 100
 				$sth->execute([$uuid, $param, $_SESSION['uid']]);
101 101
 			}
102 102
 
103
-			print "<header>" . __("You can share this article by the following unique URL:") . "</header>";
103
+			print "<header>".__("You can share this article by the following unique URL:")."</header>";
104 104
 
105 105
 			$url_path = get_self_url_prefix();
106 106
 			$url_path .= "/public.php?op=share&key=$uuid";
Please login to merge, or discard this patch.
plugins/af_readability/init.php 2 patches
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 			print_error("This plugin requires PHP 7.0.");
57 57
 		} else {
58 58
 
59
-			print "<h2>" . __("Global settings") . "</h2>";
59
+			print "<h2>".__("Global settings")."</h2>";
60 60
 
61 61
 			print_notice("Enable for specific feeds in the feed editor.");
62 62
 
@@ -85,7 +85,7 @@  discard block
 block discarded – undo
85 85
 			print "<fieldset>";
86 86
 			print "<label class='checkbox'> ";
87 87
 			print_checkbox("enable_share_anything", $enable_share_anything);
88
-			print " " . __("Provide full-text services to core code (bookmarklets) and other plugins");
88
+			print " ".__("Provide full-text services to core code (bookmarklets) and other plugins");
89 89
 			print "</label>";
90 90
 			print "</fieldset>";
91 91
 
@@ -99,13 +99,13 @@  discard block
 block discarded – undo
99 99
 			$this->host->set($this, "enabled_feeds", $enabled_feeds);
100 100
 
101 101
 			if (count($enabled_feeds) > 0) {
102
-				print "<h3>" . __("Currently enabled for (click to edit):") . "</h3>";
102
+				print "<h3>".__("Currently enabled for (click to edit):")."</h3>";
103 103
 
104 104
 				print "<ul class='panel panel-scrollable list list-unstyled'>";
105 105
 				foreach ($enabled_feeds as $f) {
106 106
 					print "<li><i class='material-icons'>rss_feed</i> <a href='#'
107 107
 						onclick='CommonDialogs.editFeed($f)'>".
108
-						Feeds::getFeedTitle($f) . "</a></li>";
108
+						Feeds::getFeedTitle($f)."</a></li>";
109 109
 				}
110 110
 				print "</ul>";
111 111
 			}
Please login to merge, or discard this patch.
Braces   +21 added lines, -8 removed lines patch added patch discarded remove patch
@@ -47,7 +47,9 @@  discard block
 block discarded – undo
47 47
 	}
48 48
 
49 49
 	function hook_prefs_tab($args) {
50
-		if ($args != "prefFeeds") return;
50
+		if ($args != "prefFeeds") {
51
+			return;
52
+		}
51 53
 
52 54
 		print "<div dojoType='dijit.layout.AccordionPane'
53 55
 			title=\"<i class='material-icons'>extension</i> ".__('Readability settings (af_readability)')."\">";
@@ -93,7 +95,9 @@  discard block
 block discarded – undo
93 95
 			print "</form>";
94 96
 
95 97
 			$enabled_feeds = $this->host->get($this, "enabled_feeds");
96
-			if (!is_array($enabled_feeds)) $enabled_feeds = array();
98
+			if (!is_array($enabled_feeds)) {
99
+				$enabled_feeds = array();
100
+			}
97 101
 
98 102
 			$enabled_feeds = $this->filter_unknown_feeds($enabled_feeds);
99 103
 			$this->host->set($this, "enabled_feeds", $enabled_feeds);
@@ -120,7 +124,9 @@  discard block
 block discarded – undo
120 124
 		print "<section>";
121 125
 
122 126
 		$enabled_feeds = $this->host->get($this, "enabled_feeds");
123
-		if (!is_array($enabled_feeds)) $enabled_feeds = array();
127
+		if (!is_array($enabled_feeds)) {
128
+			$enabled_feeds = array();
129
+		}
124 130
 
125 131
 		$key = array_search($feed_id, $enabled_feeds);
126 132
 		$checked = $key !== FALSE ? "checked" : "";
@@ -137,7 +143,9 @@  discard block
 block discarded – undo
137 143
 
138 144
 	function hook_prefs_save_feed($feed_id) {
139 145
 		$enabled_feeds = $this->host->get($this, "enabled_feeds");
140
-		if (!is_array($enabled_feeds)) $enabled_feeds = array();
146
+		if (!is_array($enabled_feeds)) {
147
+			$enabled_feeds = array();
148
+		}
141 149
 
142 150
 		$enable = checkbox_to_sql_bool($_POST["af_readability_enabled"]);
143 151
 		$key = array_search($feed_id, $enabled_feeds);
@@ -174,8 +182,9 @@  discard block
 block discarded – undo
174 182
 		if ($tmp && mb_strlen($tmp) < 1024 * 500) {
175 183
 			$tmpdoc = new DOMDocument("1.0", "UTF-8");
176 184
 
177
-			if (!@$tmpdoc->loadHTML($tmp))
178
-				return false;
185
+			if (!@$tmpdoc->loadHTML($tmp)) {
186
+							return false;
187
+			}
179 188
 
180 189
 			// this is the worst hack yet :(
181 190
 			if (strtolower($tmpdoc->encoding) != 'utf-8') {
@@ -237,10 +246,14 @@  discard block
 block discarded – undo
237 246
 	function hook_article_filter($article) {
238 247
 
239 248
 		$enabled_feeds = $this->host->get($this, "enabled_feeds");
240
-		if (!is_array($enabled_feeds)) return $article;
249
+		if (!is_array($enabled_feeds)) {
250
+			return $article;
251
+		}
241 252
 
242 253
 		$key = array_search($article["feed"]["id"], $enabled_feeds);
243
-		if ($key === FALSE) return $article;
254
+		if ($key === FALSE) {
255
+			return $article;
256
+		}
244 257
 
245 258
 		return $this->process_article($article);
246 259
 
Please login to merge, or discard this patch.
af_readability/vendor/andreskrey/Readability/Nodes/DOM/DOMElement.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,5 +6,5 @@
 block discarded – undo
6 6
 
7 7
 class DOMElement extends \DOMElement
8 8
 {
9
-    use NodeTrait;
9
+	use NodeTrait;
10 10
 }
Please login to merge, or discard this patch.
af_readability/vendor/andreskrey/Readability/Nodes/DOM/DOMCdataSection.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,5 +6,5 @@
 block discarded – undo
6 6
 
7 7
 class DOMCdataSection extends \DOMCdataSection
8 8
 {
9
-    use NodeTrait;
9
+	use NodeTrait;
10 10
 }
Please login to merge, or discard this patch.
af_readability/vendor/andreskrey/Readability/Nodes/DOM/DOMDocumentType.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,5 +6,5 @@
 block discarded – undo
6 6
 
7 7
 class DOMDocumentType extends \DOMDocumentType
8 8
 {
9
-    use NodeTrait;
9
+	use NodeTrait;
10 10
 }
Please login to merge, or discard this patch.
vendor/andreskrey/Readability/Nodes/DOM/DOMProcessingInstruction.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,5 +6,5 @@
 block discarded – undo
6 6
 
7 7
 class DOMProcessingInstruction extends \DOMProcessingInstruction
8 8
 {
9
-    use NodeTrait;
9
+	use NodeTrait;
10 10
 }
Please login to merge, or discard this patch.
af_readability/vendor/andreskrey/Readability/Nodes/DOM/DOMCharacterData.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -6,5 +6,5 @@
 block discarded – undo
6 6
 
7 7
 class DOMCharacterData extends \DOMCharacterData
8 8
 {
9
-    use NodeTrait;
9
+	use NodeTrait;
10 10
 }
Please login to merge, or discard this patch.
plugins/af_readability/vendor/andreskrey/Readability/Nodes/DOM/DOMNode.php 1 patch
Indentation   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -10,5 +10,5 @@
 block discarded – undo
10 10
  */
11 11
 class DOMNode extends \DOMNode
12 12
 {
13
-    use NodeTrait;
13
+	use NodeTrait;
14 14
 }
Please login to merge, or discard this patch.