You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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