File tree Expand file tree Collapse file tree 3 files changed +44
-3
lines changed Expand file tree Collapse file tree 3 files changed +44
-3
lines changed Original file line number Diff line number Diff line change
1
+ name : PHP_CodeSniffer
2
+ on : push
3
+ jobs :
4
+ phpcs :
5
+ runs-on : ubuntu-latest
6
+ steps :
7
+ - name : Checkout
8
+ uses : actions/checkout@v2
9
+ - name : Setup PHP
10
+ uses : shivammathur/setup-php@v2
11
+ with :
12
+ php-version : ' 7.4'
13
+ coverage : none
14
+ tools : composer, cs2pr
15
+ - name : Get Composer cache directory
16
+ id : composer-cache
17
+ run : echo "::set-output name=dir::$(composer config cache-files-dir)"
18
+ - name : Setup cache
19
+ uses : pat-s/always-upload-cache@v1.1.4
20
+ with :
21
+ path : ${{ steps.composer-cache.outputs.dir }}
22
+ # Use the hash of composer.json as the key for your cache if you do not commit composer.lock.
23
+ key : ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
24
+ # key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
25
+ restore-keys : ${{ runner.os }}-composer-
26
+ - name : Install dependencies
27
+ run : composer install --prefer-dist --no-progress
28
+ - name : Detect coding standard violations
29
+ run : ./vendor/bin/phpcs -n -q
Original file line number Diff line number Diff line change 3
3
"description" : " NodeInfo and NodeInfo2 for WordPress!" ,
4
4
"require" : {
5
5
"php" : " >=5.6.0" ,
6
- "composer/installers" : " ~1 .0"
6
+ "composer/installers" : " ^1.0 || ^2 .0"
7
7
},
8
8
"type" : " wordpress-plugin" ,
9
9
"license" : " MIT" ,
17
17
"installer-name" : " nodeinfo"
18
18
},
19
19
"require-dev" : {
20
- "phpunit/phpunit" : " 5.5.*"
20
+ "phpunit/phpunit" : " ^5.7.21 || ^6.5 || ^7.5 || ^8" ,
21
+ "phpcompatibility/php-compatibility" : " *" ,
22
+ "phpcompatibility/phpcompatibility-wp" : " *" ,
23
+ "squizlabs/php_codesniffer" : " 3.*" ,
24
+ "wp-coding-standards/wpcs" : " *" ,
25
+ "yoast/phpunit-polyfills" : " ^1.0" ,
26
+ "dealerdirect/phpcodesniffer-composer-installer" : " ^0.7.1"
27
+ },
28
+ "config" : {
29
+ "allow-plugins" : true
30
+ },
31
+ "allow-plugins" : {
32
+ "composer/installers" : true
21
33
},
22
34
"scripts" : {
23
35
"test" : [
Original file line number Diff line number Diff line change @@ -98,7 +98,7 @@ public function generate_metadata() {
98
98
$ metadata ['generator ' ] = array (
99
99
'name ' => 'NodeInfo WordPress-Plugin ' ,
100
100
'version ' => nodeinfo_version (),
101
- 'repository ' => 'https://github.com/pfefferle/wordpress-nodeinfo/ '
101
+ 'repository ' => 'https://github.com/pfefferle/wordpress-nodeinfo/ ' ,
102
102
);
103
103
104
104
$ this ->metadata = apply_filters ( 'nodeinfo_data_metadata ' , $ metadata , $ this ->version );
You can’t perform that action at this time.
0 commit comments