Skip to content
This repository was archived by the owner on Mar 1, 2023. It is now read-only.

Commit 7a13ef2

Browse files
committed
Updated README and added CODE_OF_CONDUCT.md
1 parent 6d5e9fc commit 7a13ef2

File tree

2 files changed

+133
-27
lines changed

2 files changed

+133
-27
lines changed

CODE_OF_CONDUCT.md

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
In the interest of fostering an open and welcoming environment, we as
6+
contributors and maintainers pledge to making participation in our project and
7+
our community a harassment-free experience for everyone, regardless of age, body
8+
size, disability, ethnicity, gender identity and expression, level of experience,
9+
nationality, personal appearance, race, religion, or sexual identity and
10+
orientation.
11+
12+
## Our Standards
13+
14+
Examples of behavior that contributes to creating a positive environment
15+
include:
16+
17+
* Using welcoming and inclusive language
18+
* Being respectful of differing viewpoints and experiences
19+
* Gracefully accepting constructive criticism
20+
* Focusing on what is best for the community
21+
* Showing empathy towards other community members
22+
23+
Examples of unacceptable behavior by participants include:
24+
25+
* The use of sexualized language or imagery and unwelcome sexual attention or
26+
advances
27+
* Trolling, insulting/derogatory comments, and personal or political attacks
28+
* Public or private harassment
29+
* Publishing others' private information, such as a physical or electronic
30+
address, without explicit permission
31+
* Other conduct which could reasonably be considered inappropriate in a
32+
professional setting
33+
34+
## Our Responsibilities
35+
36+
Project maintainers are responsible for clarifying the standards of acceptable
37+
behavior and are expected to take appropriate and fair corrective action in
38+
response to any instances of unacceptable behavior.
39+
40+
Project maintainers have the right and responsibility to remove, edit, or
41+
reject comments, commits, code, wiki edits, issues, and other contributions
42+
that are not aligned to this Code of Conduct, or to ban temporarily or
43+
permanently any contributor for other behaviors that they deem inappropriate,
44+
threatening, offensive, or harmful.
45+
46+
## Scope
47+
48+
This Code of Conduct applies both within project spaces and in public spaces
49+
when an individual is representing the project or its community. Examples of
50+
representing a project or community include using an official project e-mail
51+
address, posting via an official social media account, or acting as an appointed
52+
representative at an online or offline event. Representation of a project may be
53+
further defined and clarified by project maintainers.
54+
55+
## Enforcement
56+
57+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
58+
reported by contacting the project team at [[email protected]](mailto:[email protected]). All
59+
complaints will be reviewed and investigated and will result in a response that
60+
is deemed necessary and appropriate to the circumstances. The project team is
61+
obligated to maintain confidentiality with regard to the reporter of an incident.
62+
Further details of specific enforcement policies may be posted separately.
63+
64+
Project maintainers who do not follow or enforce the Code of Conduct in good
65+
faith may face temporary or permanent repercussions as determined by other
66+
members of the project's leadership.
67+
68+
## Attribution
69+
70+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71+
available at [http://contributor-covenant.org/version/1/4][version]
72+
73+
[homepage]: http://contributor-covenant.org
74+
[version]: http://contributor-covenant.org/version/1/4/

README.md

Lines changed: 59 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,25 @@
1-
# php-cs-fixer-config
2-
3-
[![Author](http://img.shields.io/badge/[email protected]?style=flat-square)](https://twitter.com/anolilab)
4-
[![Total Downloads](https://img.shields.io/packagist/dt/narrowspark/php-cs-fixer-config.svg?style=flat-square)](https://packagist.org/packages/narrowspark/php-cs-fixer-config)
5-
[![Software License](https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square)](LICENSE)
6-
7-
## Master
8-
9-
[![Build Status](https://img.shields.io/travis/narrowspark/php-cs-fixer-config/master.svg?style=flat-square)](https://travis-ci.org/narrowspark/php-cs-fixer-config)
10-
[![Coverage Status](https://img.shields.io/scrutinizer/coverage/g/narrowspark/php-cs-fixer-config.svg?style=flat-square)](https://scrutinizer-ci.com/g/narrowspark/php-cs-fixer-config/code-structure)
11-
[![Quality Score](https://img.shields.io/scrutinizer/g/narrowspark/php-cs-fixer-config.svg?style=flat-square)](https://scrutinizer-ci.com/g/narrowspark/php-cs-fixer-config)
12-
1+
<h1 align="center">Narrowspark php-cs-fixer Config</h1>
2+
<p align="center">
3+
<a href="https://github.com/narrowspark/php-cs-fixer-config/releases"><img src="https://img.shields.io/packagist/v/narrowspark/php-cs-fixer-config.svg?style=flat-square"></a>
4+
<a href="https://php.net/"><img src="https://img.shields.io/badge/php-%5E7.1.0-8892BF.svg?style=flat-square"></a>
5+
<a href="https://codecov.io/gh/narrowspark/php-cs-fixer-config"><img src="https://img.shields.io/codecov/c/github/narrowspark/php-cs-fixer-config/master.svg?style=flat-square"></a>
6+
<a href="https://gitter.im/narrowspark/framework"><img src="https://img.shields.io/gitter/room/nwjs/nw.js.svg?style=flat-square"></a>
7+
<a href="http://opensource.org/licenses/MIT"><img src="https://img.shields.io/badge/license-MIT-brightgreen.svg?style=flat-square"></a>
8+
</p>
139
This repository provides a configuration for [`friendsofphp/php-cs-fixer`](http://github.com/FriendsOfPHP/PHP-CS-Fixer), which
1410
we use to verify and enforce a single coding standard for PHP code within Narrowspark.
1511

16-
## Install
12+
Installation
13+
-------------
1714

1815
Via Composer
1916

2017
``` bash
2118
$ composer require narrowspark/php-cs-fixer-config
2219
```
2320

24-
## Usage
21+
Usage
22+
-------------
2523

2624
Create a configuration file '.php_cs' in the root of your project:
2725

@@ -35,7 +33,6 @@ $config->getFinder()
3533
->in(__DIR__)
3634
->exclude('build')
3735
->exclude('vendor')
38-
->exclude('tests')
3936
->name('*.php')
4037
->ignoreDotFiles(true)
4138
->ignoreVCS(true);
@@ -48,33 +45,61 @@ return $config;
4845

4946
```
5047

51-
### Git
48+
:bulb: Optionally, you can specify a header comment to use, which will automatically enable the `header_comment` fixer:
49+
50+
```php
51+
$header = <<<EOF
52+
Copyright (c) 2016 Narrowspark
53+
54+
For the full copyright and license information, please view
55+
the LICENSE file that was distributed with this source code.
56+
EOF;
57+
58+
$config = new Narrowspark\CS\Config\Config($header);
59+
```
5260

61+
Git
62+
-------------
5363
Add `.php_cs.cache` (this is the cache file created by `php-cs-fixer`) to `.gitignore`:
5464

5565
```
5666
vendor/
5767
.php_cs.cache
5868
```
5969

60-
### Travis
61-
70+
Travis
71+
-------------
6272
Update your `.travis.yml` to cache the `php_cs.cache` file:
6373

6474
```yml
6575
cache:
6676
directories:
67-
- $HOME/.composer/cache
77+
- $HOME/.php-cs-fixer
6878
```
6979

7080
Then run `php-cs-fixer` in the `script` section:
7181

7282
```yml
7383
script:
74-
- vendor/bin/php-cs-fixer fix --config=.php_cs --verbose --diff --dry-run
84+
- ./vendor/bin/php-cs-fixer fix --config=.php_cs --verbose --diff --dry-run
85+
```
86+
If you only want to run `php-cs-fixer` on one PHP version, update your build matrix and use a condition:
87+
88+
```yml
89+
matrix:
90+
include:
91+
- php: 7.1
92+
env: WITH_CS=true
93+
- php: 7.2
94+
env: WITH_COVERAGE=true
95+
96+
script:
97+
- if [[ "$WITH_CS" == "true" ]]; then ./vendor/bin/php-cs-fixer fix --config=.php_cs --verbose --diff --dry-run; fi
7598
```
7699

77-
### StyleCi
100+
#StyleCi
101+
-------------
102+
78103
If you using [StyleCi](https://styleci.io) just copy [.styleci.yml](.styleci.yml) to you repository and enable styleci. Or copy this setting to [StyleCi](https://styleci.io)
79104

80105
~~~yml
@@ -128,21 +153,28 @@ finder:
128153

129154
~~~
130155

131-
## Testing
156+
Testing
157+
-------------
132158

133159
``` bash
134160
$ vendor/bin/phpunit
135161
```
136162

137-
## Contributing
163+
Contributing
164+
------------
165+
166+
If you would like to help take a look at the [list of issues](http://github.com/narrowspark/testing-helper/issues) and check our [Contributing](CONTRIBUTING.md) guild.
138167

139-
Please see [CONTRIBUTING](CONTRIBUTING.md) for details.
168+
> **Note:** Please note that this project is released with a Contributor Code of Conduct. By participating in this project you agree to abide by its terms.
140169

141-
## Credits
170+
Credits
171+
-------------
142172

173+
- [Daniel Bannert](https://github.com/prisis)
143174
- [refinery29](https://github.com/refinery29/php-cs-fixer-config)
144175
- [All Contributors](../../contributors)
145176

146-
## License
177+
License
178+
-------------
147179

148-
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.
180+
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

0 commit comments

Comments
 (0)