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

codeigniter4 / shield / 6206553643

16 Sep 2023 09:25AM UTC coverage: 92.76% (+0.2%) from 92.601%
6206553643

Pull #833

github

web-flow
Merge 56b2eb00d into df8c1d408
Pull Request #833: feat: spark shield:user command

298 of 315 new or added lines in 5 files covered. (94.6%)

2383 of 2569 relevant lines covered (92.76%)

49.39 hits per line

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

0.0
/src/Commands/Utils/InputOutput.php
1
<?php
2

3
declare(strict_types=1);
4

5
namespace CodeIgniter\Shield\Commands\Utils;
6

7
use CodeIgniter\CLI\CLI;
8

9
class InputOutput
10
{
11
    /**
12
     * Asks the user for input.
13
     *
14
     * @param string       $field      Output "field" question
15
     * @param array|string $options    String to a default value, array to a list of options (the first option will be the default value)
16
     * @param array|string $validation Validation rules
17
     *
18
     * @return string The user input
19
     */
20
    public function prompt(string $field, $options = null, $validation = null): string
21
    {
NEW
22
        return CLI::prompt($field, $options, $validation);
×
23
    }
24

25
    /**
26
     * Outputs a string to the cli on its own line.
27
     */
28
    public function write(
29
        string $text = '',
30
        ?string $foreground = null,
31
        ?string $background = null
32
    ): void {
NEW
33
        CLI::write($text, $foreground, $background);
×
34
    }
35
}
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