1
0
mirror of https://github.com/danog/MadelineProto.git synced 2024-12-12 09:59:41 +01:00
MadelineProto/.php-cs-fixer.dist.php

33 lines
994 B
PHP
Raw Normal View History

2019-09-02 17:08:36 +02:00
<?php
2022-12-08 20:16:40 +01:00
$config = new class extends Amp\CodeStyle\Config {
public function getRules(): array
{
return array_merge(parent::getRules(), [
'void_return' => true,
2023-01-26 19:57:50 +01:00
'array_indentation' => true,
'ternary_to_null_coalescing' => true,
'assign_null_coalescing_to_coalesce_equal' => true,
2023-11-11 16:55:29 +01:00
'@PHP82Migration' => true,
'@PHP81Migration' => true,
'@PHP80Migration' => true,
'@PHP80Migration:risky' => true,
'static_lambda' => true,
'strict_param' => true,
2023-10-01 20:05:04 +02:00
"native_function_invocation" => ['include' => ['@compiler_optimized'], 'scope' => 'namespaced'],
2022-12-08 20:16:40 +01:00
]);
}
};
2019-09-02 17:08:36 +02:00
$config->getFinder()
->in(__DIR__ . '/src')
->in(__DIR__ . '/tests')
2019-10-29 22:00:21 +01:00
->in(__DIR__ . '/examples')
2020-09-24 11:45:20 +02:00
->in(__DIR__ . '/tools');
2019-09-02 17:08:36 +02:00
$cacheDir = getenv('TRAVIS') ? getenv('HOME') . '/.php-cs-fixer' : __DIR__;
$config->setCacheFile($cacheDir . '/.php_cs.cache');
return $config;