Skip to content

Commit b482472

Browse files
committed
Fix newly reported PHPStan errors
1 parent cb1523f commit b482472

1 file changed

Lines changed: 1 addition & 34 deletions

File tree

src/Export_Command.php

Lines changed: 1 addition & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -271,7 +271,6 @@ private function validate_args( $args ) {
271271

272272
foreach ( $args as $key => $value ) {
273273
if ( is_callable( [ $this, 'check_' . $key ] ) ) {
274-
/** @phpstan-ignore argument.type */
275274
$result = call_user_func( [ $this, 'check_' . $key ], $value );
276275
if ( false === $result ) {
277276
$has_errors = true;
@@ -291,8 +290,6 @@ private function validate_args( $args ) {
291290

292291
/**
293292
* @param string $path
294-
*
295-
* @phpstan-ignore method.unused
296293
*/
297294
private function check_dir( $path ) {
298295
if ( empty( $path ) ) {
@@ -310,8 +307,6 @@ private function check_dir( $path ) {
310307

311308
/**
312309
* @param string $date
313-
*
314-
* @phpstan-ignore method.unused
315310
*/
316311
private function check_start_date( $date ) {
317312
if ( null === $date ) {
@@ -329,8 +324,6 @@ private function check_start_date( $date ) {
329324

330325
/**
331326
* @param string $date
332-
*
333-
* @phpstan-ignore method.unused
334327
*/
335328
private function check_end_date( $date ) {
336329
if ( null === $date ) {
@@ -348,8 +341,6 @@ private function check_end_date( $date ) {
348341

349342
/**
350343
* @param string $post_type
351-
*
352-
* @phpstan-ignore method.unused
353344
*/
354345
private function check_post_type( $post_type ) {
355346
if ( null === $post_type || 'any' === $post_type ) {
@@ -377,8 +368,6 @@ private function check_post_type( $post_type ) {
377368

378369
/**
379370
* @param string $post_type
380-
*
381-
* @phpstan-ignore method.unused
382371
*/
383372
private function check_post_type__not_in( $post_type ) {
384373
if ( null === $post_type ) {
@@ -406,8 +395,6 @@ private function check_post_type__not_in( $post_type ) {
406395

407396
/**
408397
* @param string $post__in
409-
*
410-
* @phpstan-ignore method.unused
411398
*/
412399
private function check_post__in( $post__in ) {
413400
if ( null === $post__in ) {
@@ -427,8 +414,6 @@ private function check_post__in( $post__in ) {
427414

428415
/**
429416
* @param string $start_id
430-
*
431-
* @phpstan-ignore method.unused
432417
*/
433418
private function check_start_id( $start_id ) {
434419
if ( null === $start_id ) {
@@ -449,8 +434,6 @@ private function check_start_id( $start_id ) {
449434

450435
/**
451436
* @param string $author
452-
*
453-
* @phpstan-ignore method.unused
454437
*/
455438
private function check_author( $author ) {
456439
if ( null === $author ) {
@@ -486,7 +469,7 @@ private function check_author( $author ) {
486469
}
487470

488471
/**
489-
* @phpstan-ignore method.unused
472+
* @param int|string|null $num
490473
*/
491474
private function check_max_num_posts( $num ) {
492475
if ( null !== $num && ( ! is_numeric( $num ) || $num <= 0 ) ) {
@@ -501,8 +484,6 @@ private function check_max_num_posts( $num ) {
501484

502485
/**
503486
* @param string $category
504-
*
505-
* @phpstan-ignore method.unused
506487
*/
507488
private function check_category( $category ) {
508489
if ( null === $category ) {
@@ -524,8 +505,6 @@ private function check_category( $category ) {
524505

525506
/**
526507
* @param string $status
527-
*
528-
* @phpstan-ignore method.unused
529508
*/
530509
private function check_post_status( $status ) {
531510
if ( null === $status ) {
@@ -549,8 +528,6 @@ private function check_post_status( $status ) {
549528

550529
/**
551530
* @param string|null $skip
552-
*
553-
* @phpstan-ignore method.unused
554531
*/
555532
private function check_skip_comments( $skip ) {
556533
if ( null === $skip ) {
@@ -567,8 +544,6 @@ private function check_skip_comments( $skip ) {
567544

568545
/**
569546
* @param string|null $skip
570-
*
571-
* @phpstan-ignore method.unused
572547
*/
573548
private function check_skip_authors( $skip ) {
574549
if ( null === $skip ) {
@@ -585,8 +560,6 @@ private function check_skip_authors( $skip ) {
585560

586561
/**
587562
* @param string|null $skip
588-
*
589-
* @phpstan-ignore method.unused
590563
*/
591564
private function check_skip_terms( $skip ) {
592565
if ( null === $skip ) {
@@ -603,8 +576,6 @@ private function check_skip_terms( $skip ) {
603576

604577
/**
605578
* @param string $size
606-
*
607-
* @phpstan-ignore method.unused
608579
*/
609580
private function check_max_file_size( $size ) {
610581
if ( ! is_numeric( $size ) ) {
@@ -619,8 +590,6 @@ private function check_max_file_size( $size ) {
619590

620591
/**
621592
* @param string $once
622-
*
623-
* @phpstan-ignore method.unused
624593
*/
625594
private function check_include_once( $once ) {
626595
if ( null === $once ) {
@@ -642,8 +611,6 @@ private function check_include_once( $once ) {
642611

643612
/**
644613
* @param string $allow_orphan_terms
645-
*
646-
* @phpstan-ignore method.unused
647614
*/
648615
private function check_allow_orphan_terms( $allow_orphan_terms ) {
649616
if ( null === $allow_orphan_terms ) {

0 commit comments

Comments
 (0)