thrownewUsageException("phan --init refuses to run: The Phan config already exists at '$config_path'(Can pass --init-overwrite to force Phan to overwrite that file)",EXIT_FAILURE,UsageException::PRINT_INIT_ONLY);
}
}
if(isset($opts['init-no-composer'])){
$composer_settings=[];
$vendor_path=null;
}else{
$composer_json_path="$cwd/composer.json";
if(!\file_exists($composer_json_path)){
thrownewUsageException("phan --init assumes that there will be a composer.json file (at '$composer_json_path')\n(Can pass --init-no-composer if this is not a composer project)",EXIT_FAILURE,UsageException::PRINT_INIT_ONLY);
thrownewUsageException("phan --init assumes that 'composer.phar install' was run already (expected to find '$vendor_path')",EXIT_FAILURE,UsageException::PRINT_INIT_ONLY);
* This configuration file was automatically generated by 'phan --init --init-level=$init_level'
*
* TODOs (added by 'phan --init'):
*
* - Go through this file and verify that there are no missing/unnecessary files/directories.
* (E.g. this only includes direct composer dependencies - You may have to manually add indirect composer dependencies to 'directory_list')
* - Look at 'plugins' and add or remove plugins if appropriate (see https://github.com/phan/phan/tree/v5/.phan/plugins#plugins)
* - Add global suppressions for pre-existing issues to suppress_issue_types (https://github.com/phan/phan/wiki/Tutorial-for-Analyzing-a-Large-Sloppy-Code-Base)
* - Consider setting up a baseline if there are a large number of pre-existing issues (see `phan --extended-help`)
*
* This configuration will be read and overlaid on top of the
* default configuration. Command line arguments will be applied
* after this file is read.
*
* @see https://github.com/phan/phan/wiki/Phan-Config-Settings for all configurable options
thrownewUsageException("phan --init-analyze-dir was given a missing/invalid relative directory '$extra_dir'",EXIT_FAILURE,UsageException::PRINT_INIT_ONLY);
thrownewUsageException("phan --init-analyze-file was given a missing/invalid relative file '$extra_file'",EXIT_FAILURE,UsageException::PRINT_INIT_ONLY);
thrownewUsageException('phan --init expects composer.json to contain "autoload" psr-4 directories (and could not determine any directories or files to analyze)',EXIT_FAILURE,UsageException::PRINT_INIT_ONLY);