11<?php
22
3+ /**
4+ * This file is part of CodeIgniter 4 framework.
5+ *
6+ * (c) CodeIgniter Foundation <[email protected] > 7+ *
8+ * For the full copyright and license information, please view
9+ * the LICENSE file that was distributed with this source code.
10+ */
11+
312namespace CodeIgniter \Commands \Worker ;
413
514use CodeIgniter \CLI \BaseCommand ;
@@ -15,9 +24,8 @@ class WorkerUninstall extends BaseCommand
1524 protected $ group = 'Worker Mode ' ;
1625 protected $ name = 'worker:uninstall ' ;
1726 protected $ description = 'Remove FrankenPHP worker mode configuration files ' ;
18-
19- protected $ usage = 'worker:uninstall [options] ' ;
20- protected $ options = [
27+ protected $ usage = 'worker:uninstall [options] ' ;
28+ protected $ options = [
2129 '--force ' => 'Skip confirmation prompt ' ,
2230 ];
2331
@@ -40,6 +48,7 @@ public function run(array $params)
4048
4149 // Find existing files
4250 $ existing = [];
51+
4352 foreach ($ this ->files as $ file ) {
4453 $ path = ROOTPATH . $ file ;
4554 if (is_file ($ path )) {
@@ -57,6 +66,7 @@ public function run(array $params)
5766
5867 // Show files that will be removed
5968 CLI ::write ('The following files will be removed: ' , 'yellow ' );
69+
6070 foreach ($ existing as $ file ) {
6171 CLI ::write (' - ' . $ file , 'white ' );
6272 }
@@ -83,6 +93,7 @@ public function run(array $params)
8393
8494 if (! @unlink ($ path )) {
8595 CLI ::error ('Failed to remove file: ' . clean_path ($ path ), 'light_gray ' , 'red ' );
96+
8697 continue ;
8798 }
8899
0 commit comments