Skip to content

Commit 2cdde47

Browse files
author
Shawn Hooper
committed
Fix linting errors shown in Travis
1 parent c703a83 commit 2cdde47

File tree

2 files changed

+41
-32
lines changed

2 files changed

+41
-32
lines changed

src/wpcli.php

Lines changed: 21 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -65,21 +65,25 @@ function __invoke( $args, $assoc_args ) {
6565
* Using this for now since there are issues with the PHPDoc syntax.
6666
* TODO: Use PHPDoc syntax.
6767
*/
68-
WP_CLI::add_command( 'phpcompat', 'PHPCompat_Command', array(
69-
'shortdesc' => 'Test compatibility with different PHP versions.',
70-
'synopsis' => array(
71-
array(
72-
'type' => 'positional',
73-
'name' => 'version',
74-
'optional' => false,
75-
'multiple' => false,
68+
WP_CLI::add_command(
69+
'phpcompat',
70+
'PHPCompat_Command',
71+
array(
72+
'shortdesc' => 'Test compatibility with different PHP versions.',
73+
'synopsis' => array(
74+
array(
75+
'type' => 'positional',
76+
'name' => 'version',
77+
'optional' => false,
78+
'multiple' => false,
79+
),
80+
array(
81+
'type' => 'assoc',
82+
'name' => 'scan',
83+
'optional' => true,
84+
'default' => 'active',
85+
'options' => array( 'active', 'all' ),
86+
),
7687
),
77-
array(
78-
'type' => 'assoc',
79-
'name' => 'scan',
80-
'optional' => true,
81-
'default' => 'active',
82-
'options' => array( 'active', 'all' ),
83-
),
84-
),
85-
));
88+
)
89+
);

wpengine-phpcompat.php

Lines changed: 20 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ function get_phpversions() {
117117
);
118118

119119
if ( version_compare( phpversion(), '5.3', '>=' ) ) {
120-
$versions = array( 'PHP 7.3' => '7.3') + $versions;
120+
$versions = array( 'PHP 7.3' => '7.3' ) + $versions;
121121
}
122122

123123
$old_versions = array( '5.6', '5.5', '5.4', '5.3' );
@@ -202,12 +202,14 @@ public function check_status() {
202202

203203
$active_job = false;
204204

205-
$jobs = get_posts( array(
206-
'posts_per_page' => -1,
207-
'post_type' => 'wpephpcompat_jobs',
208-
'orderby' => 'title',
209-
'order' => 'ASC',
210-
) );
205+
$jobs = get_posts(
206+
array(
207+
'posts_per_page' => -1,
208+
'post_type' => 'wpephpcompat_jobs',
209+
'orderby' => 'title',
210+
'order' => 'ASC',
211+
)
212+
);
211213

212214
if ( 0 < count( $jobs ) ) {
213215
$active_job = $jobs[0]->post_title;
@@ -308,14 +310,17 @@ public function clean_up() {
308310
* @since 1.0.0
309311
*/
310312
public function create_job_queue() {
311-
register_post_type( 'wpephpcompat_jobs', array(
312-
'labels' => array(
313-
'name' => __( 'Jobs', 'php-compatibility-checker' ),
314-
'singular_name' => __( 'Job', 'php-compatibility-checker' ),
315-
),
316-
'public' => false,
317-
'has_archive' => false,
318-
) );
313+
register_post_type(
314+
'wpephpcompat_jobs',
315+
array(
316+
'labels' => array(
317+
'name' => __( 'Jobs', 'php-compatibility-checker' ),
318+
'singular_name' => __( 'Job', 'php-compatibility-checker' ),
319+
),
320+
'public' => false,
321+
'has_archive' => false,
322+
)
323+
);
319324
}
320325

321326
/**

0 commit comments

Comments
 (0)