| Conditions | 4 | 
| Paths | 5 | 
| Total Lines | 22 | 
| Code Lines | 15 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Tests | 0 | 
| CRAP Score | 20 | 
| Changes | 1 | ||
| Bugs | 0 | Features | 0 | 
| 1 | <?php | ||
| 17 | public function handle(API $api, ChannelManager $manager): void | ||
| 18 |     { | ||
| 19 |         try { | ||
| 20 | $installedDrivers = collect($manager->getDrivers())->keys()->toArray(); | ||
| 21 | $availableDrivers = $api->getDrivers(); | ||
| 22 | |||
| 23 | $rows = collect($availableDrivers) | ||
| 24 |                 ->transform(function ($item) use ($installedDrivers) { | ||
| 25 | return [ | ||
| 26 | $item['name'], | ||
| 27 | $item['package'], | ||
| 28 | $item['official'] ? '✅' : '❌', | ||
| 29 | in_array($item['name'], $installedDrivers, true) ? '✅' : '❌', | ||
| 30 | ]; | ||
| 31 | }) | ||
| 32 | ->toArray(); | ||
| 33 | |||
| 34 | $this->table(['Name', 'Package', 'Official', 'Installed'], $rows); | ||
| 35 |         } catch (ClientException $exception) { | ||
| 36 |             $this->error('Connection to FondBot API failed. Please check your internet connection and try again.'); | ||
| 37 | } | ||
| 38 | } | ||
| 39 | } | ||
| 40 |