Skip to content

Commit 2417b76

Browse files
committed
Added/fixed spacing for consistency
1 parent 4586c26 commit 2417b76

5 files changed

Lines changed: 10 additions & 10 deletions

File tree

app/Core.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,7 @@ public function clear_object_cache_ajax() {
101101
try {
102102
self::$cache->flush();
103103
} catch (Exception $e) {
104-
$result = ['success' => false, 'message' => $e->getMessage()];
104+
$result = [ 'success' => false, 'message' => $e->getMessage() ];
105105
}
106106

107107
echo json_encode( $result );

app/EnqueueScripts.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@ class EnqueueScripts extends Plugin {
77
function __construct() {
88

99
// Enqueue frontend/backend scripts
10-
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_frontend_scripts') );
11-
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts') );
10+
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_frontend_scripts' ) );
11+
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_admin_scripts' ) );
1212

1313
// Inject plugin settings into page head
1414
$this->inject_javascript_settings();
@@ -19,7 +19,7 @@ function __construct() {
1919
if( in_array( 'frontend', $enqueue_font_awesome) )
2020
add_action( 'wp_enqueue_scripts', array( $this, 'enqueue_font_awesome' ) );
2121
if( in_array( 'backend', $enqueue_font_awesome) )
22-
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_font_awesome') );
22+
add_action( 'admin_enqueue_scripts', array( $this, 'enqueue_font_awesome' ) );
2323
}
2424

2525
}
@@ -90,7 +90,7 @@ private function inject_javascript_settings() {
9090

9191
$args = array(
9292
'variable_name' => $this->prefix( 'plugin_settings', '_' ),
93-
'target' => ['wp', 'admin']
93+
'target' => [ 'wp', 'admin' ]
9494
);
9595

9696
$values = array(

app/Helpers.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ class Helpers extends Plugin {
1717
*/
1818
public static function show_notice( $msg, $type = 'error', $is_dismissible = false ) {
1919

20-
add_action( 'admin_notices', function() use (&$msg, &$type, &$is_dismissible) {
20+
add_action( 'admin_notices', function() use ( &$msg, &$type, &$is_dismissible ) {
2121

2222
$class = 'notice notice-' . $type . ( $is_dismissible ? ' is-dismissible' : '' );
2323
printf( '<div class="%1$s"><p>%2$s</p></div>', $class, $msg );

app/Plugin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -268,7 +268,7 @@ public static function prefix( $field_name = null, $before = '', $after = '_' )
268268
* @since 0.1.0
269269
*/
270270
public static function is_production() {
271-
return ( !defined( 'WP_ENV' ) || ( defined('WP_ENV' ) && !in_array( WP_ENV, array('development', 'staging') ) ) );
271+
return ( !defined( 'WP_ENV' ) || ( defined('WP_ENV' ) && !in_array( WP_ENV, array( 'development', 'staging' ) ) ) );
272272
}
273273

274274
/**
@@ -278,7 +278,7 @@ public static function is_production() {
278278
* @since 0.1.0
279279
*/
280280
public function is_ajax() {
281-
return defined('DOING_AJAX') && DOING_AJAX;
281+
return defined( 'DOING_AJAX' ) && DOING_AJAX;
282282
}
283283

284284
}

app/PostTypes/Clients.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public function add_post_type_client() {
2929
$labels = [ 'menu_name' => 'Client List' ];
3030

3131
$options = array(
32-
'supports' => array('title'),
32+
'supports' => array( 'title' ),
3333
'exclude_from_search' => true,
3434
'publicly_queryable' => true,
3535
'show_ui' => true,
@@ -48,7 +48,7 @@ public function add_post_type_client() {
4848
), $options, $labels
4949
);
5050

51-
$cpt->icon('dashicons-star-filled');
51+
$cpt->icon( 'dashicons-star-filled' );
5252
$cpt->register();
5353

5454
// Add fields

0 commit comments

Comments
 (0)