protected function writeToOutput(InputInterface $input, OutputInterface $output, $classMaps)
{
$map = <<<PHP
<?php
namespace PHPSTORM_META {
/** @noinspection PhpUnusedLocalVariableInspection */
/** @noinspection PhpIllegalArrayKeyTypeInspection */
/** @noinspection PhpLanguageLevelInspection */
\$STATIC_METHOD_TYPES = [
PHP;
$map .= "\n";
foreach ($this->groupFactories as $group => $methods) {
foreach ($methods as $method) {
$map .= " " . $method . "('') => [\n";
foreach ($classMaps[$group] as $classPrefix => $class) {
$map .= " '{$classPrefix}' instanceof \\{$class},\n";
}
$map .= " ], \n";
}
}
$map .= <<<PHP
];
}
PHP;
if ($input->getOption('stdout')) {
$output->writeln($map);
} else {
if (\file_put_contents($this->_magentoRootFolder . '/.phpstorm.meta.php', $map)) {
$output->writeln('<info>File <comment>.phpstorm.meta.php</comment> generated</info>');
}
}
}