| Conditions | 5 |
| Paths | 7 |
| Total Lines | 30 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 1 | Features | 0 |
| 1 | <?php |
||
| 32 | public function handle() |
||
| 33 | { |
||
| 34 | $limit = $this->argument('limit'); |
||
| 35 | |||
| 36 | // Validate the limit argument |
||
| 37 | if ($limit !== 'full' && ! is_numeric($limit)) { |
||
| 38 | $this->error('Limit must be "full" or a numeric value.'); |
||
| 39 | |||
| 40 | return 1; |
||
| 41 | } |
||
| 42 | |||
| 43 | // Build the arguments array for NameFixer |
||
| 44 | $argv = [ |
||
| 45 | 'match_prefiles.php', |
||
| 46 | $limit, |
||
| 47 | ]; |
||
| 48 | |||
| 49 | if ($this->option('show')) { |
||
| 50 | $argv[] = 'show'; |
||
| 51 | } |
||
| 52 | |||
| 53 | try { |
||
| 54 | $nameFixer = new NameFixer; |
||
| 55 | $nameFixer->getPreFileNames($argv); |
||
| 56 | |||
| 57 | return 0; |
||
| 58 | } catch (Exception $e) { |
||
| 59 | $this->error($e->getMessage()); |
||
| 60 | |||
| 61 | return 1; |
||
| 62 | } |
||
| 65 |