Passed
Push — main ( 137754...ffd9e1 )
by TARIQ
04:53
created
brighty/wp-config.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -29,11 +29,9 @@
 block discarded – undo
29 29
 	function getenv_docker($env, $default) {
30 30
 		if ($fileEnv = getenv($env . '_FILE')) {
31 31
 			return rtrim(file_get_contents($fileEnv), "\r\n");
32
-		}
33
-		else if (($val = getenv($env)) !== false) {
32
+		} else if (($val = getenv($env)) !== false) {
34 33
 			return $val;
35
-		}
36
-		else {
34
+		} else {
37 35
 			return $default;
38 36
 		}
39 37
 	}
Please login to merge, or discard this patch.
wp-content/plugins/brighty-core/templates/woocommerce/edit-account.php 1 patch
Braces   +6 added lines, -12 removed lines patch added patch discarded remove patch
@@ -238,8 +238,7 @@  discard block
 block discarded – undo
238 238
 
239 239
                            echo get_avatar_url($has_account_manager); 
240 240
 
241
-                     }
242
-                     else {
241
+                     } else {
243 242
                      
244 243
                         $default = BRIGHTY_CORE_PLUGIN_URL.'public/assets/img/signin-bg.svg';
245 244
                         echo get_theme_mod( 'default_account_manager_photo',$default);
@@ -251,8 +250,7 @@  discard block
 block discarded – undo
251 250
 
252 251
                   if($has_account_manager){
253 252
                         echo $account_manager->display_name;
254
-                  }
255
-                  else {
253
+                  } else {
256 254
                         echo get_theme_mod( 'default_account_manager_name');
257 255
                   }
258 256
 
@@ -261,8 +259,7 @@  discard block
 block discarded – undo
261 259
                         
262 260
                         if($has_account_manager){
263 261
                               echo get_user_meta($account_manager->ID,'account_manager_position',true);
264
-                        }
265
-                          else {
262
+                        } else {
266 263
                            echo get_theme_mod( 'default_account_manager_position'); 
267 264
                           } ?></span>
268 265
                      </div>
@@ -273,8 +270,7 @@  discard block
 block discarded – undo
273 270
                   
274 271
                   if($has_account_manager){
275 272
                      echo get_user_meta($account_manager->ID,'description',true);
276
-               }
277
-               else {
273
+               } else {
278 274
                   echo get_theme_mod( 'default_account_manager_description'); 
279 275
                }
280 276
                   ?></p>
@@ -292,8 +288,7 @@  discard block
 block discarded – undo
292 288
                            <h4 class="mb-0"><?php
293 289
                            if($has_account_manager){
294 290
                               echo get_user_meta($account_manager->ID,'billing_phone',true);
295
-                        }
296
-                           else {
291
+                        } else {
297 292
                            echo get_theme_mod( 'default_account_manager_phone'); 
298 293
                            }
299 294
                            ?></h4>
@@ -310,8 +305,7 @@  discard block
 block discarded – undo
310 305
                            <p class="mb-0" style="font-size: 11px;"><?php 
311 306
                             if($has_account_manager){
312 307
                               echo $account_manager->user_email;
313
-                        }
314
-                           else {
308
+                        } else {
315 309
                            echo get_theme_mod( 'default_account_manager_email'); 
316 310
                            
317 311
                            }?></p>
Please login to merge, or discard this patch.
wp-content/plugins/brighty-core/templates/woocommerce/list-orders.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -24,8 +24,9 @@
 block discarded – undo
24 24
                 }
25 25
 
26 26
                }
27
-               if(!$exists)
28
-                array_push($listwa, ["$id" => [$id, $name, [$pid], $pname, [$oid], 1]]);
27
+               if(!$exists) {
28
+                               array_push($listwa, ["$id" => [$id, $name, [$pid], $pname, [$oid], 1]]);
29
+               }
29 30
            }
30 31
 
31 32
 
Please login to merge, or discard this patch.
plugins/brighty-core/templates/woocommerce/notifications-list.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -157,8 +157,7 @@
 block discarded – undo
157 157
 
158 158
           if($notification_thumbnail){
159 159
             $notifications_list .= '<img alt="" src="'.$notification_thumbnail.'" class="avatar-md rounded">';
160
-          }
161
-          else{
160
+          } else{
162 161
             $notifications_list .= '<svg style="    height: 40px;" class="icon icon-xxs me-2" fill="none" stroke="currentColor" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M8 12h.01M12 12h.01M16 12h.01M21 12c0 4.418-4.03 8-9 8a9.863 9.863 0 01-4.255-.949L3 20l1.395-3.72C3.512 15.042 3 13.574 3 12c0-4.418 4.03-8 9-8s9 3.582 9 8z"></path></svg>';
163 162
           }
164 163
           
Please login to merge, or discard this patch.
plugins/brighty-core/templates/woocommerce/my-account-top-menu.php 1 patch
Braces   +28 added lines, -7 removed lines patch added patch discarded remove patch
@@ -4,13 +4,34 @@
 block discarded – undo
4 4
 
5 5
    <div class="col-12 mb-5 account-settings-page-menu">
6 6
       
7
-      <a class="btn btn-transparent <?php if(is_wc_endpoint_url( 'profile' ) || is_wc_endpoint_url( 'edit-account' ) ) echo "active"; ?>" style="background:none; box-shadow:none;"  href="/my-account/profile/">My Profile</a>
8
-      <a class="btn btn-transparent <?php if(is_wc_endpoint_url( 'notifications-list' )) echo "active"; ?>" href="/my-account/notifications-list/">Notifications</a>
9
-      <a class="btn btn-transparent <?php if(is_wc_endpoint_url( 'documents' )) echo "active"; ?>"  href="/my-account/documents/" >Documents</a>
10
-      <a class="btn btn-transparent <?php if(is_wc_endpoint_url( 'edit-address' )) echo "active"; ?>" href="/my-account/edit-address/">Address</a>
11
-      <a class="btn btn-transparent <?php if(is_wc_endpoint_url( 'client' )) echo "active"; ?>" href="/my-account/client/">Client Profiles</a>
12
-      <a class="btn btn-transparent <?php if(is_wc_endpoint_url( 'security' )) echo "active"; ?>" href="/my-account/security/">Security </a>
13
-      <a class="btn btn-transparent <?php if(is_wc_endpoint_url( 'access' )) echo "active"; ?>" href="/my-account/access/">Access </a>
7
+      <a class="btn btn-transparent <?php if(is_wc_endpoint_url( 'profile' ) || is_wc_endpoint_url( 'edit-account' ) ) {
8
+    echo "active";
9
+}
10
+?>" style="background:none; box-shadow:none;"  href="/my-account/profile/">My Profile</a>
11
+      <a class="btn btn-transparent <?php if(is_wc_endpoint_url( 'notifications-list' )) {
12
+    echo "active";
13
+}
14
+?>" href="/my-account/notifications-list/">Notifications</a>
15
+      <a class="btn btn-transparent <?php if(is_wc_endpoint_url( 'documents' )) {
16
+    echo "active";
17
+}
18
+?>"  href="/my-account/documents/" >Documents</a>
19
+      <a class="btn btn-transparent <?php if(is_wc_endpoint_url( 'edit-address' )) {
20
+    echo "active";
21
+}
22
+?>" href="/my-account/edit-address/">Address</a>
23
+      <a class="btn btn-transparent <?php if(is_wc_endpoint_url( 'client' )) {
24
+    echo "active";
25
+}
26
+?>" href="/my-account/client/">Client Profiles</a>
27
+      <a class="btn btn-transparent <?php if(is_wc_endpoint_url( 'security' )) {
28
+    echo "active";
29
+}
30
+?>" href="/my-account/security/">Security </a>
31
+      <a class="btn btn-transparent <?php if(is_wc_endpoint_url( 'access' )) {
32
+    echo "active";
33
+}
34
+?>" href="/my-account/access/">Access </a>
14 35
 
15 36
       <div class="dropdown-divider mt-0"></div>
16 37
    </div>
Please login to merge, or discard this patch.
brighty/wp-content/plugins/brighty-core/admin/admin-ui-render.php 1 patch
Braces   +7 added lines, -2 removed lines patch added patch discarded remove patch
@@ -9,7 +9,9 @@  discard block
 block discarded – undo
9 9
  */
10 10
 
11 11
 // Exit if accessed directly
12
-if ( ! defined( 'ABSPATH' ) ) exit;
12
+if ( ! defined( 'ABSPATH' ) ) {
13
+    exit;
14
+}
13 15
 
14 16
 /**
15 17
  * Callback function for General Settings section
@@ -49,7 +51,10 @@  discard block
 block discarded – undo
49 51
 			<br>
50 52
 		
51 53
 		<!-- Text Input -->
52
-		<input type="text" name="BRIGHTY_CORE_settings[text_input]" class="regular-text" value="<?php if ( isset( $settings['text_input'] ) && ( ! empty($settings['text_input']) ) ) echo esc_attr($settings['text_input']); ?>"/>
54
+		<input type="text" name="BRIGHTY_CORE_settings[text_input]" class="regular-text" value="<?php if ( isset( $settings['text_input'] ) && ( ! empty($settings['text_input']) ) ) {
55
+    echo esc_attr($settings['text_input']);
56
+}
57
+?>"/>
53 58
 		<p class="description"><?php _e('Description of the text input field', 'brighty-core'); ?></p>
54 59
 		
55 60
 	</fieldset>
Please login to merge, or discard this patch.
brighty/wp-content/plugins/brighty-core/shortcodes/invoices-shortcode.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -57,8 +57,7 @@  discard block
 block discarded – undo
57 57
             if($payment_status=='topay'){
58 58
                 $payment_status_text = '<span class="fw-bold text-danger">Unpaid</span>';
59 59
                 
60
-            }
61
-            else{
60
+            } else{
62 61
                 $payment_status_text = '<span class="fw-bold text-warning">'.$payment_status.'</span>';;
63 62
             }
64 63
                 $overdue = '';
@@ -140,8 +139,7 @@  discard block
 block discarded – undo
140 139
         </div>
141 140
         ';
142 141
 
143
-    } 
144
-    else {
142
+    } else {
145 143
         
146 144
         return "No Invoices";
147 145
         
Please login to merge, or discard this patch.
brighty/wp-content/plugins/brighty-core/brighty-core.php 1 patch
Braces   +19 added lines, -5 removed lines patch added patch discarded remove patch
@@ -52,17 +52,31 @@
 block discarded – undo
52 52
  */
53 53
 
54 54
 // Exit if accessed directly
55
-if ( ! defined( 'ABSPATH' ) ) exit;
55
+if ( ! defined( 'ABSPATH' ) ) {
56
+    exit;
57
+}
56 58
 
57 59
 /**
58 60
  * Define constants
59 61
  *
60 62
  * @since 1.0
61 63
  */
62
-if ( ! defined( 'BRIGHTY_CORE_VERSION_NUM' ) ) 		define( 'BRIGHTY_CORE_VERSION_NUM'		, '1.0' ); // Plugin version constant
63
-if ( ! defined( 'BRIGHTY_CORE_PLUGIN' ) )		define( 'BRIGHTY_CORE_PLUGIN'		, trim( dirname( plugin_basename( __FILE__ ) ), '/' ) ); // Name of the plugin folder eg - 'brighty-core'
64
-if ( ! defined( 'BRIGHTY_CORE_PLUGIN_DIR' ) )	define( 'BRIGHTY_CORE_PLUGIN_DIR'	, plugin_dir_path( __FILE__ ) ); // Plugin directory absolute path with the trailing slash. Useful for using with includes eg - /var/www/html/wp-content/plugins/brighty-core/
65
-if ( ! defined( 'BRIGHTY_CORE_PLUGIN_URL' ) )	define( 'BRIGHTY_CORE_PLUGIN_URL'	, plugin_dir_url( __FILE__ ) ); // URL to the plugin folder with the trailing slash. Useful for referencing src eg - http://localhost/wp/wp-content/plugins/brighty-core/
64
+if ( ! defined( 'BRIGHTY_CORE_VERSION_NUM' ) ) {
65
+    define( 'BRIGHTY_CORE_VERSION_NUM'		, '1.0' );
66
+}
67
+// Plugin version constant
68
+if ( ! defined( 'BRIGHTY_CORE_PLUGIN' ) ) {
69
+    define( 'BRIGHTY_CORE_PLUGIN'		, trim( dirname( plugin_basename( __FILE__ ) ), '/' ) );
70
+}
71
+// Name of the plugin folder eg - 'brighty-core'
72
+if ( ! defined( 'BRIGHTY_CORE_PLUGIN_DIR' ) ) {
73
+    define( 'BRIGHTY_CORE_PLUGIN_DIR'	, plugin_dir_path( __FILE__ ) );
74
+}
75
+// Plugin directory absolute path with the trailing slash. Useful for using with includes eg - /var/www/html/wp-content/plugins/brighty-core/
76
+if ( ! defined( 'BRIGHTY_CORE_PLUGIN_URL' ) ) {
77
+    define( 'BRIGHTY_CORE_PLUGIN_URL'	, plugin_dir_url( __FILE__ ) );
78
+}
79
+// URL to the plugin folder with the trailing slash. Useful for referencing src eg - http://localhost/wp/wp-content/plugins/brighty-core/
66 80
 
67 81
 /**
68 82
  * Database upgrade todo
Please login to merge, or discard this patch.
brighty/wp-content/plugins/brighty-core/functions/helper-functions.php 1 patch
Braces   +2 added lines, -5 removed lines patch added patch discarded remove patch
@@ -27,9 +27,7 @@  discard block
 block discarded – undo
27 27
     // get name
28 28
 
29 29
     return $billing;
30
-  }
31
-
32
-  else {
30
+  } else {
33 31
     return get_post_meta($clientID,'billing_details',true);
34 32
   }
35 33
 
@@ -44,8 +42,7 @@  discard block
 block discarded – undo
44 42
     if($same_shipping_address){
45 43
        return get_client_billing_address($clientID); 
46 44
        
47
-    }
48
-    else{
45
+    } else{
49 46
         return get_post_meta($clientID,'shipping_details',true);
50 47
     }
51 48
   
Please login to merge, or discard this patch.