private function createProcessForSource($source)
{
if (null === $this->temporaryFile) {
$this->temporaryFile = tempnam('.', 'cs_fixer_tmp_');
$this->fileRemoval->observe($this->temporaryFile);
}
if (false === @file_put_contents($this->temporaryFile, $source)) {
throw new IOException(sprintf('Failed to write file "%s".', $this->temporaryFile), 0, null, $this->temporaryFile);
}
return $this->createProcessForFile($this->temporaryFile);
}