Skip to content

Commit e7b68e7

Browse files
authored
Merge pull request #6 from madewithlove/readme
Update README
2 parents 40fc63f + 4f2d9f9 commit e7b68e7

File tree

1 file changed

+38
-9
lines changed

1 file changed

+38
-9
lines changed

README.md

Lines changed: 38 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,44 @@
1-
# Madewithlove PHP-CS-Fixer configuration
1+
<h1 align="center">
2+
<br>
3+
<img src="https://static.madewithlove.com/logo/red/full.png" alt="madewithlove" width="400">
4+
<br><br>
5+
madewithlove PHP-CS-Fixer configuration
6+
<br>
7+
</h1>
28

3-
The default [PHP-CS-Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) configuration for Madewithlove projects.
9+
<h4 align="center">
10+
11+
The default [PHP-CS-Fixer](https://github.com/FriendsOfPHP/PHP-CS-Fixer) configuration for madewithlove projects.
12+
13+
</h4>
14+
15+
<div align="center">
16+
17+
![ci](https://github.com/madewithlove/php-cs-fixer-config/actions/workflows/ci.yml/badge.svg)
18+
[![pull requests](https://img.shields.io/github/issues-pr/madewithlove/php-cs-fixer-config)](https://github.com/madewithlove/php-cs-fixer-config/pulls)
19+
[![contributors](https://img.shields.io/github/contributors/madewithlove/php-cs-fixer-config)](https://github.com/madewithlove/php-cs-fixer-config/graphs/contributors)
20+
21+
</div>
22+
23+
<div align="center">
24+
<sub>Built with :heart:︎ and :coffee: by heroes at <a href="https://madewithlove.com">madewithlove</a>.</sub>
25+
</div>
426

527
## Installation
628

729
```bash
8-
$ composer require madewithlove/php-cs-fixer-config
30+
$ composer require madewithlove/php-cs-fixer-config --dev
931
```
1032

1133
## Usage
1234

1335
### Basic usage
1436

15-
**.php-cs-fixer.php**
37+
**`.php-cs-fixer.php`**
1638

1739
```php
1840
<?php
41+
1942
require 'vendor/autoload.php';
2043

2144
return Madewithlove\PhpCsFixer\Config::fromFolders(['src']);
@@ -25,6 +48,7 @@ To exclude a subfolder:
2548

2649
```php
2750
<?php
51+
2852
require 'vendor/autoload.php';
2953

3054
return Madewithlove\PhpCsFixer\Config::fromFolders(['src'], null, ['ignoreThisDir']);
@@ -33,10 +57,11 @@ This will skip `src/ignoreThisDir` or `src/foo/bar/ignoreThisDir`. (_The folder
3357

3458
You can also override rules per-project without overriding the core rules like this:
3559

36-
**.php-cs-fixer.php**
60+
**`.php-cs-fixer.php`**
3761

3862
```php
3963
<?php
64+
4065
require 'vendor/autoload.php';
4166

4267
return Madewithlove\PhpCsFixer\Config::fromFolders(['src'])->mergeRules([
@@ -48,21 +73,23 @@ return Madewithlove\PhpCsFixer\Config::fromFolders(['src'])->mergeRules([
4873

4974
You can also preconfigure the configuration for a Laravel project by calling a special factory method:
5075

51-
**.php-cs-fixer.php**
76+
**`.php-cs-fixer.php`**
5277

5378
```php
5479
<?php
80+
5581
require 'vendor/autoload.php';
5682

5783
return Madewithlove\PhpCsFixer\Config::forLaravel();
5884
```
5985

6086
If need be, you can also append folders to fix in addition to Laravel's:
6187

62-
**.php-cs-fixer.php**
88+
**`.php-cs-fixer.php`**
6389

6490
```php
6591
<?php
92+
6693
require 'vendor/autoload.php';
6794

6895
return Madewithlove\PhpCsFixer\Config::forLaravel(['some_other_folder']);
@@ -74,14 +101,16 @@ By default, the configuration will check the version of PHP you run the tool wit
74101

75102
You can override the _target_ PHP version by passing it either as constructor argument, or as second argument to `fromFolders`:
76103

77-
**.php-cs-fixer.php**
104+
**`.php-cs-fixer.php`**
78105

79106
```php
80107
<?php
108+
81109
require 'vendor/autoload.php';
82110

83111
return Madewithlove\PhpCsFixer\Config::fromFolders(['src'], '7.4');
84112

85-
// Or
113+
// or
114+
86115
return Madewithlove\PhpCsFixer\Config::forLaravel([], '7.4');
87116
```

0 commit comments

Comments
 (0)