Skip to content

Commit

Permalink
Merge pull request #10 from jeroenvandergulik/boyscout/fix-deprecatio…
Browse files Browse the repository at this point in the history
…n-errors

Remove deprecation errors
  • Loading branch information
dmvdbrugge authored Aug 3, 2021
2 parents 8e618ec + 9223aeb commit da145ec
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
3 changes: 1 addition & 2 deletions .php_cs.dist → .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,13 @@
use PhpCsFixer\Finder;

$finder = Finder::create()
->name('.php_cs.dist') // Fix this file as well
->in(__DIR__);

$overrides = [
'declare_strict_types' => true,
];

return Config::create()
return (new Config())
->setFinder($finder)
->setRiskyAllowed(true)
->setRules(Rules::getForPhp71($overrides));
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ $config->setRules(Rules::getForPhp73());

### New to PHP-CS-Fixer

Place a file named `.php_cs.dist` that has following content in your project's root directory.
Place a file named `.php-cs-fixer.dist.php` that has the following content in your project's root directory.

```php
<?php
Expand All @@ -34,10 +34,9 @@ use PhpCsFixer\Config;
use PhpCsFixer\Finder;

$finder = Finder::create()
->name('.php_cs.dist') // Fix this file as well
->in(__DIR__);

return Config::create()
return (new Config())
->setFinder($finder)
->setRiskyAllowed(true)
// use specific rules for your php version e.g.: getForPhp71, getForPhp72, getForPhp73
Expand Down
3 changes: 0 additions & 3 deletions src/PhpCsFixer/Rules.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,6 @@ private static function getBaseRules(): array
'increment_style' => [
'style' => 'post',
],
'is_null' => [
'use_yoda_style' => false,
],
'list_syntax' => [
'syntax' => 'short',
],
Expand Down

0 comments on commit da145ec

Please sign in to comment.