| Conditions | 2 |
| Paths | 2 |
| Total Lines | 13 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Tests | 0 |
| CRAP Score | 6 |
| Changes | 0 | ||
| 1 | <?php |
||
| 38 | protected function execute(InputInterface $input, OutputInterface $output) |
||
| 39 | { |
||
| 40 | $packageRepository = $this->getContainer()->get('packy.repository.package'); |
||
| 41 | $packageManagers = $this->getContainer()->get('packy.package_managers'); |
||
| 42 | $packages = $packageRepository->findAll(); |
||
| 43 | |||
| 44 | foreach ($packages as $package) { |
||
| 45 | $packageManager = $packageManagers->get($package->getManager()); |
||
| 46 | $package = $packageManager->analyzePackage($package); |
||
| 47 | $packageRepository->update($package); |
||
| 48 | $output->writeln('<info>Package ' . $package->getName() . ' updated!</info>'); |
||
| 49 | } |
||
| 50 | } |
||
| 51 | } |
||
| 52 |