Skip to content

Commit d6bdd4e

Browse files
committed
Complete changes
1 parent 01398c4 commit d6bdd4e

File tree

7 files changed

+16
-6
lines changed

7 files changed

+16
-6
lines changed

.gitignore

32 Bytes
Binary file not shown.
File renamed without changes.

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ All notable changes to `binary-cats/laravel-php-styles` will be documented in th
44

55
Updates should follow the [Keep a CHANGELOG](http://keepachangelog.com/) principles.
66

7+
## 2.0.0 - 2021-05-08
8+
9+
- Updated PHP CS Fixer to ^3.0
10+
- Removed arbitrary styling rule
11+
712
## 1.0.0 - 2021-04-30
813

914
Initial release

composer.json

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,7 @@
1919
"style"
2020
],
2121
"require": {
22-
"adamwojs/php-cs-fixer-phpdoc-force-fqcn":"^1.0",
23-
"friendsofphp/php-cs-fixer": "^2.0",
22+
"friendsofphp/php-cs-fixer": "^3.0",
2423
"illuminate/support":"^8.0|^9.0"
2524
},
2625
"autoload": {

src/PhpStylesServiceProvider.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function boot()
1515
{
1616
if ($this->app->runningInConsole()) {
1717
$this->publishes([
18-
__DIR__.'/../stubs/php_cs.stub' => base_path('.php_cs.dist'),
18+
__DIR__ . '/../stubs/php-cs-fixer.stub' => base_path('.php-cs-fixer.dist.php'),
1919
]);
2020
}
2121
}

src/helpers.php

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,11 @@
1414
*/
1515
function styles(Finder $finder, array $rules = [], array $fixers = []): Config
1616
{
17-
$rules = array_merge(require __DIR__.'/rules.php', $rules);
17+
$rules = array_merge(require __DIR__ . '/rules.php', $rules);
1818

19-
return Config::create()
19+
$config = new Config();
20+
21+
return $config
2022
->registerCustomFixers($fixers)
2123
->setFinder($finder)
2224
->setRiskyAllowed(true)

stubs/php_cs.stub renamed to stubs/php-cs-fixer.stub

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
<?php
22

33
$finder = PhpCsFixer\Finder::create()->in([
4-
__DIR__.'/src',
4+
__DIR__.'/app',
5+
__DIR__.'/config',
6+
__DIR__.'/database',
7+
__DIR__.'/routes',
8+
__DIR__.'/tests',
59
]);
610

711
return BinaryCats\PhpStyles\styles($finder, [

0 commit comments

Comments
 (0)