Passed
Push — master ( 5a5c41...fade3b )
by Cody
04:50 queued 10s
created
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
 	public 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
 	public 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
 	public 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.
plugins/af_readability/vendor/andreskrey/Readability/Nodes/DOM/DOMAttr.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 DOMAttr extends \DOMAttr
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/DOMText.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 DOMText extends \DOMText
8 8
 {
9
-    use NodeTrait;
9
+	use NodeTrait;
10 10
 }
Please login to merge, or discard this patch.