Skip to content

Commit

Permalink
run 'mkdir' only if the directory doesn't exist yet (#481)
Browse files Browse the repository at this point in the history
* run 'mkdir' only if the directory doesn't exist yet

* codestyle

* Use 'id_dir' instead of 'file_exists'

Co-authored-by: Francescu Garoby <[email protected]>
  • Loading branch information
fgaroby and Francescu Garoby authored Jun 17, 2022
1 parent 109d5bf commit d389c7e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,10 @@

$config = new PhpCsFixer\Config('faker');

mkdir('.build/php-cs-fixer', 0755, true);
if (!is_dir('.build/php-cs-fixer')) {
mkdir('.build/php-cs-fixer', 0755, true);
}

return $config
->setCacheFile('.build/php-cs-fixer/cache')
->setFinder($finder)
Expand Down

0 comments on commit d389c7e

Please sign in to comment.