Skip to content

Commit

Permalink
🎨 PER-CS coding standards, switch from PHPCS to Pint (#749)
Browse files Browse the repository at this point in the history
  • Loading branch information
retlehs authored Dec 14, 2024
1 parent 04957c6 commit c92549f
Show file tree
Hide file tree
Showing 11 changed files with 91 additions and 113 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,5 +33,5 @@ jobs:
- name: Install Composer dependencies
run: composer install --no-progress --prefer-dist --optimize-autoloader

- name: Run tests
run: composer test
- name: Run Pint
run: composer lint
9 changes: 4 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
"wpackagist-theme/twentytwentyfive": "^1.0"
},
"require-dev": {
"squizlabs/php_codesniffer": "^3.7.1",
"roave/security-advisories": "dev-latest"
"roave/security-advisories": "dev-latest",
"laravel/pint": "^1.18"
},
"config": {
"optimize-autoloader": true,
Expand All @@ -65,8 +65,7 @@
"wordpress-install-dir": "web/wp"
},
"scripts": {
"test": [
"phpcs"
]
"lint": "pint --test",
"lint:fix": "pint"
}
}
150 changes: 68 additions & 82 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions config/application.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Your base production configuration goes in this file. Environment-specific
* overrides go in their respective config/environments/{{WP_ENV}}.php file.
Expand All @@ -9,6 +10,7 @@
*/

use Roots\WPConfig\Config;

use function Env\env;

// USE_ENV_ARRAY + CONVERT_* + STRIP_QUOTES
Expand Down
2 changes: 2 additions & 0 deletions config/environments/development.php
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
<?php

/**
* Configuration overrides for WP_ENV === 'development'
*/

use Roots\WPConfig\Config;

use function Env\env;

Config::define('SAVEQUERIES', true);
Expand Down
1 change: 1 addition & 0 deletions config/environments/staging.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Configuration overrides for WP_ENV === 'staging'
*/
Expand Down
24 changes: 0 additions & 24 deletions phpcs.xml

This file was deleted.

9 changes: 9 additions & 0 deletions pint.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{
"preset": "per",
"exclude": [
"web/wp",
"web/app/mu-plugins/bedrock-disallow-indexing",
"web/app/plugins",
"web/app/themes/twentytwentyfive"
]
}
1 change: 1 addition & 0 deletions web/app/mu-plugins/bedrock-autoloader.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Plugin Name: Bedrock Autoloader
* Plugin URI: https://github.com/roots/bedrock-autoloader
Expand Down
1 change: 1 addition & 0 deletions web/index.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* WordPress View Bootstrapper
*/
Expand Down
1 change: 1 addition & 0 deletions web/wp-config.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<?php

/**
* Do not edit this file. Edit the config files found in the config/ dir instead.
* This file is required in the root directory so WordPress can find it.
Expand Down

0 comments on commit c92549f

Please sign in to comment.