Skip to content

Commit 962eb6c

Browse files
Improve Code style (#11)
* Fix code style issues, add phpcs.xml * Add parameter types in documentation, remove unnecessary commas in JS * Add .travis.yml * Add nonce check for form * Update CHANGELOG, set license to GPLv3 only
1 parent 638a36c commit 962eb6c

11 files changed

+1306
-611
lines changed

.gitignore

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1 @@
1-
*.mo
2-
*.po
3-
*.pot
1+
/vendor/

.travis.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
language: php
2+
3+
php:
4+
- '5.6'
5+
- '7.0'
6+
- '7.1'
7+
- '7.2'
8+
- nightly
9+
10+
matrix:
11+
allow_failures:
12+
- php: nightly
13+
14+
before_script:
15+
- composer install
16+
17+
script:
18+
- composer build
19+
20+
notifications:
21+
email: false

CHANGELOG.md

Lines changed: 22 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,40 @@
11
# Posts and Users Stats - Changelog
2+
All notable changes to this WordPress plugin will be documented in this file.
23

3-
## Version 1.x
4+
The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/)
5+
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
46

5-
### Version 1.0
7+
## Unreleased
8+
9+
### Changed
10+
* Code compliant to WordPress Coding Standards, ensured via Travis build
11+
12+
13+
## Version 1.0
14+
15+
## Added
616
* comments per date
717
* comments per author
818
* comments per status
919
* consistent formatting of the source code
1020

1121

12-
## Version 0.x
22+
## Version 0.3
1323

14-
### Version 0.3
24+
### Changed
1525
* improved styles and readme.txt documentation
1626

17-
### Version 0.2
27+
28+
## Version 0.2
29+
30+
### Added
1831
* CSV export for all table data (client-side via JavaScript)
1932
* posts per publication date: selection of one post type possible
2033

21-
### Version 0.1
34+
35+
## Version 0.1
36+
37+
### Added
2238
* posts per publication date
2339
* posts per taxonomies, i. e. per category, per tag and per custom taxonomy
2440
* posts per author and post type

composer.json

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
{
2+
"name": "patrickrobrecht/posts-and-users-stats",
3+
"description": "A WordPress plugin for statistics on posts, comments and users",
4+
"license": "GPL-3.0-only",
5+
"type": "wordpress-plugin",
6+
"authors": [
7+
{
8+
"name": "Patrick Robrecht",
9+
"homepage": "https://patrick-robrecht.de/",
10+
"role": "Developer"
11+
}
12+
],
13+
"support": {
14+
"issues": "https://github.com/patrickrobrecht/posts-and-users-stats/issues",
15+
"source": "https://github.com/patrickrobrecht/posts-and-users-stats"
16+
},
17+
"require": {
18+
"php": "^5.6|^7"
19+
},
20+
"require-dev": {
21+
"dealerdirect/phpcodesniffer-composer-installer": "^0.4",
22+
"matthiasmullie/minify": "^1.3",
23+
"slowprog/composer-copy-file": "^0.2",
24+
"squizlabs/php_codesniffer": "^3.1",
25+
"wimg/php-compatibility": "^8.0",
26+
"wp-coding-standards/wpcs": "^0.14"
27+
},
28+
"scripts": {
29+
"post-install-cmd": [
30+
"@build"
31+
],
32+
"post-update-cmd": [
33+
"@build"
34+
],
35+
"build": [
36+
"@cs"
37+
],
38+
"cs": [
39+
"phpcs --standard=phpcs.xml -s"
40+
],
41+
"csfix": [
42+
"phpcbf --standard=phpcs.xml"
43+
]
44+
}
45+
}

0 commit comments

Comments
 (0)