@@ -84,12 +84,16 @@ schema once. Assuming that your database is named `phplist_test`, the user is
8484named ` phplist ` , and the password is ` batterystaple ` , the command looks like
8585this:
8686
87- mysql -u phplist_test --password=batterystaple phplist_test < vendor/phplist/phplist4-core/Database/Schema.sql
87+ ``` bash
88+ mysql -u phplist_test --password=batterystaple phplist_test < vendor/phplist/phplist4-core/Database/Schema.sql
89+ ```
8890
8991When running the integration tests, you will need to specify the database name
9092and access credentials on the command line (in the same line):
9193
92- PHPLIST_DATABASE_NAME=phplist_test PHPLIST_DATABASE_USER=phplist PHPLIST_DATABASE_PASSWORD=batterystaple vendor/bin/phpunit -c Configuration/PHPUnit/phpunit.xml Tests/Integration/
94+ ``` bash
95+ PHPLIST_DATABASE_NAME=phplist_test PHPLIST_DATABASE_USER=phplist PHPLIST_DATABASE_PASSWORD=batterystaple vendor/bin/phpunit -c Configuration/PHPUnit/phpunit.xml Tests/Integration/
96+ ```
9397
9498
9599## Coding Style
@@ -103,18 +107,27 @@ We will only merge pull requests that follow the project's coding style.
103107
104108Please check your code with the provided PHP_CodeSniffer standard:
105109
106- vendor/bin/phpcs --standard=vendor/phplist/phplist4-core/Configuration/PhpCodeSniffer/ Classes/ Tests/
110+ ``` bash
111+ vendor/bin/phpcs --standard=vendor/phplist/phplist4-core/Configuration/PhpCodeSniffer/ Classes/ Tests/
112+ ```
107113
108114Please also check the code structure using PHPMD:
109115
110- vendor/bin/phpmd Classes/ text vendor/phplist/phplist4-core/Configuration/PHPMD/rules.xml
116+ ``` bash
117+ vendor/bin/phpmd Classes/ text vendor/phplist/phplist4-core/Configuration/PHPMD/rules.xml
118+ ```
111119
112120And also please run the static code analysis:
113121
114- vendor/bin/phpstan analyse -l 5 Classes/ Tests/
122+ ``` bash
123+ vendor/bin/phpstan analyse -l 5 Classes/ Tests/
124+ ```
115125
116126You can also run all code style checks using one long line from a bash shell:
117- find Classes/ Tests/ -name '* .php' -print0 | xargs -0 -n 1 -P 4 php -l && vendor/bin/phpstan analyse -l 5 Classes/ Tests/ && vendor/bin/phpmd Classes/ text vendor/phplist/phplist4-core/Configuration/PHPMD/rules.xml && vendor/bin/phpcs --standard=vendor/phplist/phplist4-core/Configuration/PhpCodeSniffer/ Classes/ Tests/
127+
128+ ``` bash
129+ find Classes/ Tests/ -name ' *.php' -print0 | xargs -0 -n 1 -P 4 php -l && vendor/bin/phpstan analyse -l 5 Classes/ Tests/ && vendor/bin/phpmd Classes/ text vendor/phplist/phplist4-core/Configuration/PHPMD/rules.xml && vendor/bin/phpcs --standard=vendor/phplist/phplist4-core/Configuration/PhpCodeSniffer/ Classes/ Tests/
130+ ```
118131
119132This will execute all tests except for the unit tests and the integration
120133tests.
0 commit comments