Skip to content

Commit

Permalink
bot: sync with template [skip ci]
Browse files Browse the repository at this point in the history
  • Loading branch information
kbond committed Dec 15, 2022
1 parent 3fe911f commit 2da826b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 46 deletions.
55 changes: 10 additions & 45 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
@@ -1,49 +1,14 @@
<?php

$finder = PhpCsFixer\Finder::create()
->in([__DIR__.'/src', __DIR__.'/tests'])
->notName('*.tpl.php')
;
$file = __DIR__.'/.php-cs-fixer.temp.php';

$config = new PhpCsFixer\Config();
\file_put_contents(
$file,
\file_get_contents('https://raw.githubusercontent.com/zenstruck/.github/main/.php-cs-fixer.dist.php')
);

return $config
->setRules([
'@Symfony' => true,
'@Symfony:risky' => true,
'@DoctrineAnnotation' => true,
'@PHP71Migration' => true,
'@PHP71Migration:risky' => true,
'@PHPUnit75Migration:risky' => true,
'multiline_whitespace_before_semicolons' => ['strategy' => 'new_line_for_chained_calls'],
'multiline_comment_opening_closing' => true,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => [
'imports_order' => ['const', 'class', 'function'],
],
'ordered_class_elements' => true,
'native_function_invocation' => ['include' => ['@internal']],
'explicit_indirect_variable' => true,
'explicit_string_variable' => true,
'escape_implicit_backslashes' => true,
'mb_str_functions' => true,
'logical_operators' => true,
'php_unit_method_casing' => ['case' => 'snake_case'],
'php_unit_test_annotation' => ['style' => 'annotation'],
'no_unreachable_default_argument_value' => true,
'declare_strict_types' => false,
'void_return' => false,
'single_trait_insert_per_statement' => false,
'simple_to_complex_string_variable' => true,
'no_superfluous_phpdoc_tags' => [
'allow_mixed' => true,
'allow_unused_params' => true,
'remove_inheritdoc' => true,
],
'phpdoc_to_comment' => false,
'function_declaration' => ['closure_function_spacing' => 'none', 'closure_fn_spacing' => 'none'],
'nullable_type_declaration_for_default_null_value' => true,
])
->setRiskyAllowed(true)
->setFinder($finder)
;
try {
return require $file;
} finally {
\unlink($file);
}
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 Kevin Bond
Copyright (c) 2022 Kevin Bond

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down

0 comments on commit 2da826b

Please sign in to comment.