/** * Physical path of user's captcha config file. * * @param string $path * * @throws FileNotFoundException when user's captcha config file path is incorrect */ private function normalizePath($path) { // physical path of the Symfony's config directory $pathInConfigDir = Path::getConfigDirPath() . '/' . $path; if (!is_file($pathInConfigDir)) { throw new FileNotFoundException(sprintf('File "app/config/%s" could not be found.', $path), 0, null, $path); } return $pathInConfigDir; }