Completed
Push — master ( cf981f...f2efdb )
by frank
02:35
created
classes/autoptimizeScripts.php 1 patch
Braces   +10 added lines, -4 removed lines patch added patch discarded remove patch
@@ -1,5 +1,8 @@  discard block
 block discarded – undo
1 1
 <?php
2
-if ( ! defined( 'ABSPATH' ) ) exit; // Exit if accessed directly
2
+if ( ! defined( 'ABSPATH' ) ) {
3
+    exit;
4
+}
5
+// Exit if accessed directly
3 6
 
4 7
 class autoptimizeScripts extends autoptimizeBase {
5 8
     private $scripts = array();
@@ -22,7 +25,9 @@  discard block
 block discarded – undo
22 25
     //Reads the page and collects script tags
23 26
     public function read($options) {
24 27
         $noptimizeJS = apply_filters( 'autoptimize_filter_js_noptimize', false, $this->content );
25
-        if ($noptimizeJS) return false;
28
+        if ($noptimizeJS) {
29
+            return false;
30
+        }
26 31
 
27 32
         // only optimize known good JS?
28 33
         $whitelistJS = apply_filters( 'autoptimize_filter_js_whitelist', '', $this->content );
@@ -75,8 +80,9 @@  discard block
 block discarded – undo
75 80
         }
76 81
 
77 82
         //Should we add try-catch?
78
-        if($options['trycatch'] == true)
79
-            $this->trycatch = true;
83
+        if($options['trycatch'] == true) {
84
+                    $this->trycatch = true;
85
+        }
80 86
 
81 87
         // force js in head?    
82 88
         if($options['forcehead'] == true) {
Please login to merge, or discard this patch.