From 851d2ff7401c980a410496420ff16877dd3ae377 Mon Sep 17 00:00:00 2001 From: Jake Spurlock Date: Wed, 14 Nov 2018 12:29:14 -0800 Subject: [PATCH 1/2] phpcbf fixer --- post-meta-inspector.php | 49 ++++++++++++++++++++++++++--------------- 1 file changed, 31 insertions(+), 18 deletions(-) diff --git a/post-meta-inspector.php b/post-meta-inspector.php index aa37cf8..2ca8eb9 100644 --- a/post-meta-inspector.php +++ b/post-meta-inspector.php @@ -10,8 +10,8 @@ define( 'POST_META_INSPECTOR_VERSION', '1.1.1' ); -class Post_Meta_Inspector -{ +class Post_Meta_Inspector { + private static $instance; @@ -20,19 +20,19 @@ class Post_Meta_Inspector public static function instance() { if ( ! isset( self::$instance ) ) { - self::$instance = new Post_Meta_Inspector; + self::$instance = new Post_Meta_Inspector(); self::setup_actions(); } return self::$instance; } private function __construct() { - /** Do nothing **/ + /** Do nothing */ } private static function setup_actions() { - add_action( 'init', array( self::$instance, 'action_init') ); + add_action( 'init', array( self::$instance, 'action_init' ) ); add_action( 'add_meta_boxes', array( self::$instance, 'action_add_meta_boxes' ) ); } @@ -49,16 +49,17 @@ public function action_init() { public function action_add_meta_boxes() { $this->view_cap = apply_filters( 'pmi_view_cap', 'manage_options' ); - if ( ! current_user_can( $this->view_cap ) || ! apply_filters( 'pmi_show_post_type', '__return_true', get_post_type() ) ) + if ( ! current_user_can( $this->view_cap ) || ! apply_filters( 'pmi_show_post_type', '__return_true', get_post_type() ) ) { return; + } add_meta_box( 'post-meta-inspector', __( 'Post Meta Inspector', 'post-meta-inspector' ), array( self::$instance, 'post_meta_inspector' ), get_post_type() ); } public function post_meta_inspector() { $toggle_length = apply_filters( 'pmi_toggle_long_value_length', 0 ); - $toggle_length = max( intval($toggle_length), 0); - $toggle_el = '' . __( 'Click to show…', 'post-meta-inspector' ) . ''; + $toggle_length = max( intval( $toggle_length ), 0 ); + $toggle_el = '' . __( 'Click to show…', 'post-meta-inspector' ) . ''; ?>