I'm looking for a way to store formatted code as a string in a variable within PHP scripts, not from a console program. Is it possible with this library? Something like,
$phpcbf = new \PHP_CodeSniffer\Fixer();
$phpcbf->setConfig($config);
$fixedCode = $phpcbf->getFormatted($codeToFix);
Hello,
I'm looking for a way to store formatted code as a string in a variable within PHP scripts, not from a console program. Is it possible with this library? Something like,