Skip to content

Commit c90356b

Browse files
committed
Added .php-censor.yml config.
1 parent 2fef6be commit c90356b

File tree

3 files changed

+72
-1
lines changed

3 files changed

+72
-1
lines changed

.php-censor.yml

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
build_settings:
2+
ignore:
3+
- vendor
4+
- tests
5+
6+
setup:
7+
composer:
8+
action: install
9+
10+
test:
11+
php_mess_detector:
12+
allow_failures: true
13+
14+
php_code_sniffer:
15+
standard: PSR2
16+
encoding: UTF-8
17+
allow_failures: true
18+
19+
php_cpd:
20+
allow_failures: true
21+
22+
php_loc:
23+
allow_failures: true
24+
25+
php_parallel_lint:
26+
allow_failures: true
27+
28+
php_docblock_checker:
29+
allow_failures: true
30+
31+
security_checker:
32+
binary_type: symfony
33+
allow_failures: false
34+
35+
complete:
36+
email:
37+
default_mailto_address: [email protected]

.php_cs.dist

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
<?php
2+
3+
$finder = PhpCsFixer\Finder::create()
4+
->exclude('vendor')
5+
->in('./')
6+
;
7+
8+
return PhpCsFixer\Config::create()
9+
->setRules([
10+
'@PSR2' => true,
11+
'@PSR1' => true,
12+
'array_syntax' => ['syntax' => 'short'],
13+
'native_function_invocation' => true,
14+
'no_unused_imports' => true,
15+
'no_useless_else' => true,
16+
'no_useless_return' => true,
17+
'no_whitespace_before_comma_in_array' => true,
18+
'no_whitespace_in_blank_line' => true,
19+
'normalize_index_brace' => true,
20+
'ordered_imports' => ['imports_order' => ['class', 'const', 'function']],
21+
'trailing_comma_in_multiline_array' => true,
22+
'trim_array_spaces' => true,
23+
'elseif' => true,
24+
'psr4' => true,
25+
'short_scalar_cast' => true,
26+
'single_blank_line_before_namespace' => true,
27+
'cast_spaces' => ['space' => 'none'],
28+
'modernize_types_casting' => true,
29+
'declare_strict_types' => true,
30+
'phpdoc_scalar' => true,
31+
'phpdoc_separation' => true,
32+
])
33+
->setRiskyAllowed(true)
34+
->setFinder($finder)
35+
;

README.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ box.phar compile
1717
```
1818

1919
## Usage
20-
**CMD**:<br>
2120

2221
```bash
2322
vendor/bin/phpdoc-checker {params}

0 commit comments

Comments
 (0)