Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

test-action #1

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/phpcs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "CI"

on:
pull_request:
paths:
- "**.php"
- "phpcs.xml"
- ".github/workflows/phpcs.yml"

jobs:
phpcs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0 # important!

# we may use whatever way to install phpcs, just specify the path on the next step
# however, curl seems to be the fastest
- name: Install PHP_CodeSniffer
run: |
curl -OL https://squizlabs.github.io/PHP_CodeSniffer/phpcs.phar
php phpcs.phar --version

- uses: tinovyatkin/action-php-codesniffer@v1
with:
files: "**.php"
phpcs_path: php phpcs.phar
standard: phpcs.xml
2 changes: 1 addition & 1 deletion includes/legacy/api/v1/class-wc-api-coupons.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
class WC_API_Coupons extends WC_API_Resource {

/** @var string $base the route base */
protected $base = '/coupons';
protected $base = '/coupons';

/**
* Register the routes for this class
Expand Down
2 changes: 1 addition & 1 deletion includes/legacy/api/v2/class-wc-api-coupons.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ class WC_API_Coupons extends WC_API_Resource {
* @param array $routes
* @return array
*/
public function register_routes( $routes ) {
public function register_routes( $routes ) {

# GET/POST /coupons
$routes[ $this->base ] = array(
Expand Down