@@ -84,12 +84,16 @@ schema once. Assuming that your database is named `phplist_test`, the user is
84
84
named ` phplist ` , and the password is ` batterystaple ` , the command looks like
85
85
this:
86
86
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
+ ```
88
90
89
91
When running the integration tests, you will need to specify the database name
90
92
and access credentials on the command line (in the same line):
91
93
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
+ ```
93
97
94
98
95
99
## Coding Style
@@ -103,18 +107,27 @@ We will only merge pull requests that follow the project's coding style.
103
107
104
108
Please check your code with the provided PHP_CodeSniffer standard:
105
109
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
+ ```
107
113
108
114
Please also check the code structure using PHPMD:
109
115
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
+ ```
111
119
112
120
And also please run the static code analysis:
113
121
114
- vendor/bin/phpstan analyse -l 5 Classes/ Tests/
122
+ ``` bash
123
+ vendor/bin/phpstan analyse -l 5 Classes/ Tests/
124
+ ```
115
125
116
126
You 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
+ ```
118
131
119
132
This will execute all tests except for the unit tests and the integration
120
133
tests.
0 commit comments