• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Yoast / wordpress-seo / 2a894cf47d0e70869069e2d63512a3138ffd4ae5

14 Mar 2024 02:18PM UTC coverage: 53.672% (-0.08%) from 53.753%
2a894cf47d0e70869069e2d63512a3138ffd4ae5

Pull #21233

github

web-flow
Merge 927fc8baa into d84bd62f7
Pull Request #21233: WIP: Create FTC via WP CLI

7584 of 13912 branches covered (54.51%)

Branch coverage included in aggregate %.

0 of 92 new or added lines in 5 files covered. (0.0%)

669 existing lines in 1 file now uncovered.

29510 of 55200 relevant lines covered (53.46%)

40522.4 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/commands/ask-trait.php
1
<?php
2

3
namespace Yoast\WP\SEO\Commands;
4

5
use WP_CLI;
6

7
trait Ask_Trait {
8
        
NEW
9
        private function ask( $question, $options = [] ) {
×
NEW
10
                if ( ! empty( $options ) ) {
×
NEW
11
                        fwrite( STDOUT, $question . ' [' . implode( '/', $options ) . '] ' . \PHP_EOL );
×
12

NEW
13
                        $answer = strtolower( trim( fgets( STDIN ) ) );
×
14

NEW
15
                        if ( ! in_array( $answer, $options, true ) ) {
×
NEW
16
                                WP_CLI::error( 'Invalid answer', false );
×
NEW
17
                                return $this->ask( $question, $options );
×
18
                        }
NEW
19
                        return $answer;
×
20
                }
21

NEW
22
                fwrite( STDOUT, $question . \PHP_EOL );
×
23

NEW
24
                return trim( fgets( STDIN ) );
×
25
        }
26
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc