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

codeigniter4 / settings / 17488284278

05 Sep 2025 08:41AM UTC coverage: 85.088% (-0.4%) from 85.526%
17488284278

push

github

web-flow
update workflow for PHPUnit (#151)

194 of 228 relevant lines covered (85.09%)

18.6 hits per line

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

0.0
/src/Commands/ClearSettings.php
1
<?php
2

3
namespace CodeIgniter\Settings\Commands;
4

5
use CodeIgniter\CLI\BaseCommand;
6
use CodeIgniter\CLI\CLI;
7

8
class ClearSettings extends BaseCommand
9
{
10
    protected $group       = 'Housekeeping';
11
    protected $name        = 'settings:clear';
12
    protected $description = 'Clears all settings from the database.';
13

14
    public function run(array $params)
15
    {
16
        if (CLI::prompt('This will delete all settings from the database. Are you sure you want to continue?', ['y', 'n'], 'required') !== 'y') {
×
17
            return;
×
18
        }
19

20
        service('settings')->flush();
×
21

22
        CLI::write('Settings cleared from the database.', 'green');
×
23
    }
24
}
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

© 2025 Coveralls, Inc