| Conditions | 2 |
| Paths | 2 |
| Total Lines | 21 |
| Code Lines | 13 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 1 |
| 1 | <?php |
||
| 32 | protected function execute(InputInterface $input, OutputInterface $output) |
||
| 33 | { |
||
| 34 | $api = $this->get('api'); |
||
| 35 | /* @var ProjectEntryPoint $projectApi */ |
||
| 36 | $projectApi = $api->getEntryPoint('project'); |
||
| 37 | /* @var TranslationEntryPoint $translationApi */ |
||
| 38 | $translationApi = $api->getEntryPoint('translation'); |
||
| 39 | |||
| 40 | $projectSlug = $this->get('project_handler')->getProjectSlug(); |
||
| 41 | $project = $projectApi->get($projectSlug); |
||
| 42 | |||
| 43 | $identifier = $input->getArgument('identifier'); |
||
| 44 | |||
| 45 | $translation = $translationApi->findOneByIdentifier($project, $identifier); |
||
|
|
|||
| 46 | if (!$translation) { |
||
| 47 | $output->writeln(sprintf('<error>Translation "%s" does not exist</error>', $identifier)); |
||
| 48 | } else { |
||
| 49 | $output->writeln(sprintf('<info>Removing</info> translation <comment>"%s"</comment>', $identifier)); |
||
| 50 | $translationApi->delete($translation); |
||
| 51 | } |
||
| 52 | } |
||
| 53 | } |
||
| 54 |
This check looks for calls to methods that do not seem to exist on a given type. It looks for the method on the type itself as well as in inherited classes or implemented interfaces.
This is most likely a typographical error or the method has been renamed.