| Conditions | 3 |
| Paths | 3 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 34 | protected function execute(InputInterface $input, OutputInterface $output): int |
||
| 35 | { |
||
| 36 | $paths = $this->getPaths($input); |
||
| 37 | |||
| 38 | foreach ($paths as $path) { |
||
| 39 | $repository = $this->plugin->getRepository(); |
||
| 40 | $linkedPackage = $repository->findByPath($path->getNormalizedPath()); |
||
| 41 | |||
| 42 | if ($linkedPackage === null) { |
||
| 43 | continue; |
||
| 44 | } |
||
| 45 | |||
| 46 | $this->plugin->getLinkManager()->unlinkPackage($linkedPackage); |
||
| 47 | $this->plugin->getRepository()->remove($linkedPackage); |
||
| 48 | $this->plugin->getRepository()->persist(); |
||
| 49 | } |
||
| 50 | |||
| 51 | return 0; |
||
| 52 | } |
||
| 54 |