Skip to content

Commit

Permalink
Merge pull request #14 from humanmade/fix-phpcs-errors
Browse files Browse the repository at this point in the history
Fix PHPCS errors and introduce "lint" Composer script.
  • Loading branch information
kadamwhite authored Aug 29, 2019
2 parents 4f961f5 + 1570eef commit 5306062
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 11 deletions.
10 changes: 10 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,16 @@ function enqueue_block_editor_assets() {
}
```

## Local Development

Before submitting a pull request, ensure that your PHP code passes our [coding standards](https://github.com/humanmade/coding-standards) by running [PHPCS](https://pear.php.net/package/PHP_CodeSniffer):

```sh
composer run-script lint
```

If the above command does not work, ensure you have [Composer](https://getcomposer.org/) installed on your machine & run `composer install` from the project root.

## License

This plugin is free software. You can redistribute it and/or modify it under the terms of the [GNU General Public License](LICENSE) as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
1 change: 1 addition & 0 deletions asset-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
* License URI: https//github.com/humanmade/asset-loader/tree/master/LICENSE
*/

// phpcs:disable HM.Files.NamespaceDirectoryName
namespace Asset_Loader;

/**
Expand Down
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,8 @@
"license": "GPL-2.0-or-later",
"require-dev": {
"humanmade/coding-standards": "^0.6.0"
},
"scripts": {
"lint": "phpcs --standard=vendor/humanmade/coding-standards ."
}
}
20 changes: 10 additions & 10 deletions composer.lock

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

2 changes: 1 addition & 1 deletion inc/manifest/namespace.php
Original file line number Diff line number Diff line change
Expand Up @@ -155,4 +155,4 @@ function add_onerror_to_scripts( string $tag, string $handle, string $src ) : st
'<script onerror="maybeSSLError && maybeSSLError( this );"',
$tag
);
}
}

0 comments on commit 5306062

Please sign in to comment.