| Conditions | 6 |
| Paths | 10 |
| Total Lines | 29 |
| Code Lines | 16 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 28 | public function handle(): int |
||
| 29 | { |
||
| 30 | if (config('irc_settings.scrape_irc_username') === '') { |
||
| 31 | $this->error('ERROR! You must put a username in config/irc_settings.php'); |
||
| 32 | |||
| 33 | return self::FAILURE; |
||
| 34 | } |
||
| 35 | |||
| 36 | // Use Laravel's built-in quiet mode for silent operation |
||
| 37 | $silent = $this->option('quiet'); |
||
| 38 | $debug = $this->option('debug'); |
||
| 39 | |||
| 40 | if (! $silent) { |
||
| 41 | $this->info('Starting IRC Scraper...'); |
||
| 42 | if ($debug) { |
||
| 43 | $this->warn('Debug mode enabled'); |
||
| 44 | } |
||
| 45 | } |
||
| 46 | |||
| 47 | try { |
||
| 48 | new IRCScraper($silent, $debug); |
||
| 49 | |||
| 50 | return self::SUCCESS; |
||
| 51 | } catch (\Exception $e) { |
||
| 52 | if (! $silent) { |
||
| 53 | $this->error($e->getMessage()); |
||
| 54 | } |
||
| 55 | |||
| 56 | return self::FAILURE; |
||
| 57 | } |
||
| 60 |