Skip to content

Commit e46cd1a

Browse files
committed
chore: add readme
1 parent c9e7372 commit e46cd1a

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# PHP Codemap
2+
3+
PHP Codemap is a Composer package that generates a textual codemap of your PHP code. It scans your PHP files and produces a map that lists classes, methods, and public properties.
4+
5+
## Features
6+
7+
- **Recursive Scanning:** Scan directories or individual PHP files.
8+
- **AST Parsing:** Utilizes [nikic/php-parser](https://github.com/nikic/PHP-Parser) to parse PHP code.
9+
- **Codemap Generation:** Outputs a detailed codemap including classes, methods, and public properties.
10+
- **Easy to Use:** Command-line tool that writes the codemap to `codemap.txt` by default.
11+
12+
## Installation
13+
14+
You can install the package via Composer:
15+
16+
```bash
17+
composer require kauffinger/php-codemap
18+
```
19+
20+
## Usage
21+
22+
Run the codemap generator using the command-line:
23+
24+
```bash
25+
./vendor/bin/codemap [path/to/scan]
26+
```
27+
28+
- **Default Behavior:** If no path is provided, it defaults to scanning the `src` directory.
29+
- **Output:** The codemap is generated in a file named `codemap.txt` in the project root.
30+
31+
## Running Tests
32+
33+
This package uses [Pest PHP](https://pestphp.com/) for testing. To run the tests, execute:
34+
35+
```bash
36+
composer test
37+
```
38+
39+
## Code Quality Tools
40+
41+
- **Laravel Pint:** For code formatting.
42+
- **PHPStan:** For static analysis.
43+
- **Rector:** For automated refactoring.
44+
45+
## License
46+
47+
This project is licensed under the MIT License. See [LICENSE.md](LICENSE.md) for details.
48+
49+
## Contributing
50+
51+
Contributions are welcome! Please open an issue or submit a pull request with your improvements.

0 commit comments

Comments
 (0)