File: .php-cs-fixer.dist.php

package info (click to toggle)
php-parsedown 2.0.0~beta-1-5
  • links: PTS, VCS
  • area: main
  • in suites: experimental
  • size: 7,036 kB
  • sloc: php: 4,260; xml: 38; makefile: 14
file content (37 lines) | stat: -rw-r--r-- 877 bytes parent folder | download
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
33
34
35
36
37
<?php
use PhpCsFixer\Config;
use PhpCsFixer\Finder;
$finder = Finder::create()
    ->in(__DIR__ . '/src/')
    ->in(__DIR__ . '/tests/')
;
$rules = [
    '@PSR2' => true,
    'array_syntax' => [
        'syntax' => 'short',
    ],
    'braces' => [
        'allow_single_line_closure' => true,
    ],
    'logical_operators' => true,
    'native_constant_invocation' => [
        'fix_built_in' => true,
    ],
    'native_function_invocation' => [
        'include' => ['@all'],
    ],
    'no_unused_imports' => true,
    'ordered_imports' => [
        'sort_algorithm' => 'alpha',
    ],
    'single_blank_line_before_namespace' => true,
    'strict_comparison' => true,
    'strict_param' => true,
    'whitespace_after_comma_in_array' => true,
];
return (new Config)
    ->setRules($rules)
    ->setFinder($finder)
    ->setUsingCache(false)
    ->setRiskyAllowed(true)
;