forked from PHP-CS-Fixer/PHP-CS-Fixer
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.php-cs-fixer.php-lowest.php
32 lines (26 loc) · 1.04 KB
/
.php-cs-fixer.php-lowest.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php
/*
* This file is part of PHP CS Fixer.
*
* (c) Fabien Potencier <[email protected]>
* Dariusz Rumiński <[email protected]>
*
* This source file is subject to the MIT license that is bundled
* with this source code in the file LICENSE.
*/
if (PHP_VERSION_ID <= 70103 || PHP_VERSION_ID >= 70200) {
fwrite(STDERR, "PHP CS Fixer's config for PHP-LOWEST can be executed only on lowest supported PHP version - 7.1.*.\n");
fwrite(STDERR, "Running it on higher PHP version would falsy expect more changes, eg `mixed` type on PHP 8.\n");
exit(1);
}
$config = require '.php-cs-fixer.dist.php';
$config->getFinder()->notPath([
// @TODO 4.0 change interface to be fully typehinted and remove the exceptions from this list
'src/DocBlock/Annotation.php',
'src/Tokenizer/Tokens.php',
]);
$config->setRules([
'phpdoc_to_param_type' => true, // EXPERIMENTAL rule, helping to ensure usage of 7.0+ typing
'phpdoc_to_return_type' => true, // EXPERIMENTAL rule, helping to ensure usage of 7.0+ typing
]);
return $config;