From d389c7e561e608830911b8a56c45b8e4899f8552 Mon Sep 17 00:00:00 2001 From: Francescu GAROBY Date: Fri, 17 Jun 2022 09:06:53 +0200 Subject: [PATCH] run 'mkdir' only if the directory doesn't exist yet (#481) * run 'mkdir' only if the directory doesn't exist yet * codestyle * Use 'id_dir' instead of 'file_exists' Co-authored-by: Francescu Garoby --- .php-cs-fixer.dist.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.php-cs-fixer.dist.php b/.php-cs-fixer.dist.php index 8481597249..c186f1ca07 100644 --- a/.php-cs-fixer.dist.php +++ b/.php-cs-fixer.dist.php @@ -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)