This tool provides an interactive and user-friendly way to convert PHP variable names from camelCase to snake_case, ensuring consistency across your codebase and adherence to PSR coding standards.
- Accurate Parsing: Reliably identifies camelCase variable names, even in complex code structures.
- User-Friendly Output: Offers a color-coded, easy-to-read CLI output, enhancing user experience.
- Code Consistency: Promotes a standardized codebase by ensuring adherence to PSR coding standards.
To install the CamelCase to SnakeCase Conversion Tool, follow these steps:
- Clone the repository
git clone https://github.com/yourusername/camel-to-snake.git
- Navigate to the project directory
cd camel-to-snake
- Install the required dependencies:
npm install
This tool is written in TypeScript. To compile the TypeScript files to JavaScript, run:
tsc
- Ensure you have compiled the TypeScript files to JavaScript.
- Run the tool using the following command:
node convert.js /path/to/your/php/file.php
Replace /path/to/your/php/file.php with the path to the PHP file you want to convert. 3. Follow the interactive prompts to review and apply the suggested variable name changes.