public function fix(\SplFileInfo $file, $content)
{
$tokens = Tokens::fromCode($content);
if ($this->isFormType($tokens)) {
foreach ($this->types as $type) {
if (null === $this->matchTypeName($tokens, $type)) {
continue;
}
if (PHP_VERSION_ID < 50500) {
$this->fixTypeNamesLegacy($tokens, $type);
} else {
$this->addTypeUse($tokens, $type);
$this->fixTypeNames($tokens, $type);
}
}
}
return $tokens->generateCode();
}