Skip to content

Commit

Permalink
Fix code style issues, fix grumphp TypeError
Browse files Browse the repository at this point in the history
  • Loading branch information
mougrim committed Feb 5, 2022
1 parent 2ef0806 commit 1a6d2bd
Show file tree
Hide file tree
Showing 18 changed files with 6,602 additions and 119 deletions.
7 changes: 4 additions & 3 deletions .php_cs → .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@
use PhpCsFixer\Finder;
use PhpCsFixer\Fixer\Import\OrderedImportsFixer;

return Config::create()
return (new Config())
->setRiskyAllowed(true)
->setRules([
'@Symfony' => true,
'array_syntax' => ['syntax' => 'short'],
'ordered_imports' => [
'importsOrder' => [
'imports_order' => [
OrderedImportsFixer::IMPORT_TYPE_CLASS,
OrderedImportsFixer::IMPORT_TYPE_CONST,
OrderedImportsFixer::IMPORT_TYPE_FUNCTION,
Expand All @@ -22,7 +22,7 @@
'dir_constant' => true,
'ereg_to_preg' => true,
'modernize_types_casting' => true,
'no_multiline_whitespace_before_semicolons' => true,
'multiline_whitespace_before_semicolons' => false,
'no_php4_constructor' => true,
'no_useless_else' => true,
'no_useless_return' => true,
Expand All @@ -34,6 +34,7 @@
'yoda_style' => false,
'increment_style' => false,
'phpdoc_no_empty_return' => false,
'single_line_throw' => false,
])
->setFinder(
Finder::create()
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ There are next changes:
- PHPUnit version upgraded to 9
- Add run unit tests Github action
- Remove travis
- Fix code style issues
- Fix by workaround grumphp issue with TypeError, see [phpro/grumphp#957](https://github.com/phpro/grumphp/issues/957)

### [v0.4.1]

Expand Down
5 changes: 4 additions & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,15 @@
},
"require-dev": {
"ext-dom": "*",
"roave/security-advisories": "dev-master",
"roave/security-advisories": "dev-latest",
"phpro/grumphp": "^1.5",
"friendsofphp/php-cs-fixer": "^2.12.1",
"phpunit/phpunit": "^9.0",
"amphp/log": "^1.0.0"
},
"conflict": {
"amphp/parallel-functions": "=1.1.0"
},
"license": "MIT",
"authors": [
{
Expand Down
Loading

0 comments on commit 1a6d2bd

Please sign in to comment.