@@ -18,16 +18,16 @@ More specifically this includes:
1818
1919## Usage
2020
21- Note: This container does nothing when invoking it without a command, such as:
22- 23- Windows users: The use of "$PWD" for present working directory will not work as expected, instead use the full path.
24- Such as "//c/Users/adamculp/project".
21+ Note: This image does nothing when invoking it without a followup command, such as:
2522
2623```
2724$ cd </path/to/desired/directory>
2825$ docker run -it --rm -v "$PWD":/app -w /app adamculp/php-code-quality:latest <desired-command-with-arguments>
2926```
3027
28+ Windows users: The use of "$PWD" for present working directory will not work as expected, instead use the full path.
29+ Such as "//c/Users/adamculp/project".
30+ 3131In the example above, Docker runs an interactive terminal to be removed when all is completed, and mounts
3232the current host directory ($PWD) inside the container, sets this as the current working directory, and then
3333loads the image adamculp/php-code-quality. Following this the user can add any commands to be executed inside
@@ -51,11 +51,19 @@ Available commands provided by the adamculp/php-code-quality image:
5151* vendor/bin/phpstan + args (more robust commands via config file)
5252* sh (or any other command) + args
5353
54- ### Some possible example commands:
54+ ### Some example commands:
5555
5656NOTE: If using the commands below "as-is", please create a 'php_code_quality' folder within the project first.
5757This will be used, by the commands, to contain the results of the various tools. Modify as desired.
5858
59+ IMPORTANT: If you run into memory issues, where the output states the process ran out of memory, you can alter the amount
60+ of memory the PHP process uses for a given command by adding the -d flag to the PHP command. Note that the following example
61+ is for extreme cases since the image already sets the memory limit to 512M.
62+ 63+ ```
64+ php -d memory_limit=1G
65+ ```
66+ 5967#### PHP Lines of Code (PHPLoc)
6068
6169See https://github.com/sebastianbergmann/phploc for more usage details of this tool.
0 commit comments