Skip to content
Snippets Groups Projects
Commit 4caabb58 authored by Demian Katz's avatar Demian Katz
Browse files

Smarter caching of php-cs-fixer results.

parent b34d21cd
No related merge requests found
......@@ -3,8 +3,7 @@
ChangeLog
\#*
.\#*
.php_cs.cache
.php_cs_template.cache
.php_cs_cache
TAGS
*~
/downloads
......@@ -14,4 +13,4 @@ composer.phar
import/solrmarc.log
node_modules
public/swagger-ui
.vagrant
\ No newline at end of file
.vagrant
......@@ -17,6 +17,7 @@ before_script:
cache:
directories:
- downloads
- .php_cs_cache
- $HOME/.composer/cache/files
script:
......
......@@ -65,6 +65,12 @@ $rules = [
'visibility_required' => true,
];
$cacheDir = __DIR__ . '/../.php_cs_cache';
if (!is_dir($cacheDir)) {
mkdir($cacheDir);
}
return PhpCsFixer\Config::create()
->setCacheFile($cacheDir . '/.code.cache')
->setRules($rules)
->setFinder($finder);
......@@ -62,7 +62,12 @@ $rules = [
'visibility_required' => true,
];
$cacheDir = __DIR__ . '/../.php_cs_cache';
if (!is_dir($cacheDir)) {
mkdir($cacheDir);
}
return PhpCsFixer\Config::create()
->setCacheFile(__DIR__ . '/../.php_cs_template.cache')
->setCacheFile($cacheDir . '/.template.cache')
->setRules($rules)
->setFinder($finder);
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment