if ($this->parserFactory->hasKindsSupport()) {
$msg = 'One of PhpParser\\ParserFactory constants: '
- . implode(', ', ParserFactory::getPossibleKinds())
+ . \implode(', ', ParserFactory::getPossibleKinds())
. " (default is based on current interpreter's version).";
$defaultKind = $this->parserFactory->getDefaultKind();
protected function execute(InputInterface $input, OutputInterface $output)
{
$code = $input->getArgument('code');
- if (strpos('<?', $code) === false) {
+ if (\strpos('<?', $code) === false) {
$code = '<?php ' . $code;
}
try {
return $parser->parse($code);
} catch (\PhpParser\Error $e) {
- if (strpos($e->getMessage(), 'unexpected EOF') === false) {
+ if (\strpos($e->getMessage(), 'unexpected EOF') === false) {
throw $e;
}
*/
private function getParser($kind = null)
{
- if (!array_key_exists($kind, $this->parsers)) {
+ if (!\array_key_exists($kind, $this->parsers)) {
$this->parsers[$kind] = $this->parserFactory->createParser($kind);
}