@@ -83,9 +83,9 @@ private function set_admin() {
8383 // add a settings link to the plugins admin screen
8484 $ plugin_name = str_replace ( 'includes/class- ' , '' , plugin_basename ( __FILE__ ) );
8585 add_filter ( "plugin_action_links_ {$ plugin_name }" , static function ( $ actions ) {
86- return array_merge ( array (
86+ return array_merge ( [
8787 '<a href=" ' . esc_url ( admin_url ( 'options-general.php?page=wp-php-console ' ) ) . '"> ' . __ ( 'Settings ' , 'wp-php-console ' ) . '</a> ' ,
88- ) , $ actions );
88+ ] , $ actions );
8989 } );
9090
9191 // init settings
@@ -129,20 +129,21 @@ public function connect() {
129129 * Get WP PHP Console settings options.
130130 *
131131 * @since 1.4.0
132+ *
132133 * @return array
133134 */
134135 protected function get_options () {
135136
136- $ options = get_option ( 'wp_php_console ' , array () );
137+ $ options = get_option ( 'wp_php_console ' , [] );
137138
138- return wp_parse_args ( $ options , array (
139+ return wp_parse_args ( $ options , [
139140 'ip ' => '' ,
140141 'password ' => '' ,
141142 'register ' => false ,
142143 'short ' => false ,
143144 'ssl ' => false ,
144145 'stack ' => false ,
145- ) );
146+ ] );
146147 }
147148
148149
@@ -199,7 +200,7 @@ public function init() {
199200 if ( empty ( $ password ) ) {
200201
201202 // display admin notice and abort if no password has been set
202- add_action ( 'admin_notices ' , array ( $ this , 'password_notice ' ) );
203+ add_action ( 'admin_notices ' , [ $ this , 'password_notice ' ] );
203204 return ;
204205 }
205206
@@ -263,7 +264,7 @@ public function init() {
263264 $ this ->print_notice_exception ( $ e );
264265 }
265266
266- $ openBaseDirs = array ( ABSPATH , get_template_directory () ) ;
267+ $ openBaseDirs = [ ABSPATH , get_template_directory () ] ;
267268
268269 try {
269270 $ evalProvider ->addSharedVarReference ( 'dirs ' , $ openBaseDirs );
0 commit comments