.php_cs.tests.php 489 B

12345678910111213141516171819202122
  1. <?php
  2. require __DIR__ . '/vendor/autoload.php';
  3. $finder = PhpCsFixer\Finder::create()
  4. ->in(__DIR__ . '/tests')
  5. ->exclude('__snapshots__');
  6. $config = require __DIR__ . '/.php_cs.common.php';
  7. // Additional rules for tests
  8. $config = array_merge(
  9. $config,
  10. [
  11. 'declare_strict_types' => true,
  12. ]
  13. );
  14. return PhpCsFixer\Config::create()
  15. ->setFinder($finder)
  16. ->setRules($config)
  17. ->setRiskyAllowed(true)
  18. ->setCacheFile(__DIR__ . '/.php_cs.tests.cache');