@@ -9,9 +9,9 @@ discard block |
||
| 9 | 9 | |
| 10 | 10 | function __construct() { |
| 11 | 11 | |
| 12 | - add_action( 'gravityview_log_error', array( $this, 'log_error'), 10, 2 ); |
|
| 12 | + add_action( 'gravityview_log_error', array( $this, 'log_error' ), 10, 2 ); |
|
| 13 | 13 | |
| 14 | - add_action( 'gravityview_log_debug', array( $this, 'log_debug'), 10, 2 ); |
|
| 14 | + add_action( 'gravityview_log_debug', array( $this, 'log_debug' ), 10, 2 ); |
|
| 15 | 15 | |
| 16 | 16 | // Enable debug with Gravity Forms Logging Add-on |
| 17 | 17 | add_filter( 'gform_logging_supported', array( $this, 'enable_gform_logging' ) ); |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | include_once( GRAVITYVIEW_DIR . 'includes/class-debug-bar.php' ); |
| 37 | 37 | } |
| 38 | 38 | |
| 39 | - $panels[] = new GravityView_Debug_Bar; |
|
| 39 | + $panels[ ] = new GravityView_Debug_Bar; |
|
| 40 | 40 | |
| 41 | 41 | return $panels; |
| 42 | 42 | } |
@@ -46,7 +46,7 @@ discard block |
||
| 46 | 46 | * @param array $supported_plugins List of plugins |
| 47 | 47 | */ |
| 48 | 48 | public function enable_gform_logging( $supported_plugins ) { |
| 49 | - $supported_plugins['gravityview'] = 'GravityView'; |
|
| 49 | + $supported_plugins[ 'gravityview' ] = 'GravityView'; |
|
| 50 | 50 | return $supported_plugins; |
| 51 | 51 | } |
| 52 | 52 | |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | * @return string "print_r" or "var_export" |
| 75 | 75 | */ |
| 76 | 76 | static function get_print_function() { |
| 77 | - if( ob_get_level() > 0 ) { |
|
| 77 | + if ( ob_get_level() > 0 ) { |
|
| 78 | 78 | $function = 'var_export'; |
| 79 | 79 | } else { |
| 80 | 80 | $function = 'print_r'; |
@@ -95,17 +95,17 @@ discard block |
||
| 95 | 95 | $hash = md5( json_encode( $notice ) ); |
| 96 | 96 | |
| 97 | 97 | if ( ! isset( self::$notices_hash[ $hash ] ) ) { |
| 98 | - self::$notices[] = $notice; |
|
| 98 | + self::$notices[ ] = $notice; |
|
| 99 | 99 | self::$notices_hash[ $hash ] = true; |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | - if ( class_exists("GFLogging") ) { |
|
| 102 | + if ( class_exists( "GFLogging" ) ) { |
|
| 103 | 103 | GFLogging::include_logger(); |
| 104 | - GFLogging::log_message( 'gravityview', $function( $message, true ) . $function($data, true), KLogger::DEBUG ); |
|
| 104 | + GFLogging::log_message( 'gravityview', $function( $message, true ) . $function( $data, true ), KLogger::DEBUG ); |
|
| 105 | 105 | } |
| 106 | 106 | } |
| 107 | 107 | |
| 108 | - static function log_error( $message = '', $data = null ) { |
|
| 108 | + static function log_error( $message = '', $data = null ) { |
|
| 109 | 109 | |
| 110 | 110 | $function = self::get_print_function(); |
| 111 | 111 | |
@@ -118,13 +118,13 @@ discard block |
||
| 118 | 118 | $hash = md5( json_encode( $error ) ); |
| 119 | 119 | |
| 120 | 120 | if ( ! isset( self::$errors_hash[ $hash ] ) ) { |
| 121 | - self::$errors[] = $error; |
|
| 121 | + self::$errors[ ] = $error; |
|
| 122 | 122 | self::$errors_hash[ $hash ] = true; |
| 123 | 123 | } |
| 124 | 124 | |
| 125 | - if ( class_exists("GFLogging") ) { |
|
| 125 | + if ( class_exists( "GFLogging" ) ) { |
|
| 126 | 126 | GFLogging::include_logger(); |
| 127 | - GFLogging::log_message( 'gravityview', $function ( $message, true ) . $function ( $error, true), KLogger::ERROR ); |
|
| 127 | + GFLogging::log_message( 'gravityview', $function( $message, true ) . $function( $error, true ), KLogger::ERROR ); |
|
| 128 | 128 | } |
| 129 | 129 | } |
| 130 | 130 | |
@@ -141,7 +141,7 @@ discard block |
||
| 141 | 141 | */ |
| 142 | 142 | static function is_logging_active( $plugin = 'gravityview' ) { |
| 143 | 143 | |
| 144 | - if( ! class_exists( 'GFLogging') ) { |
|
| 144 | + if ( ! class_exists( 'GFLogging' ) ) { |
|
| 145 | 145 | return false; |
| 146 | 146 | } |
| 147 | 147 | |