Skip to content

Commit

Permalink
Merge pull request #14 from M6Web/feat/php-74
Browse files Browse the repository at this point in the history
feat: add new php 7.4 config and update php cs fixer
  • Loading branch information
valentin-claras committed Dec 12, 2019
2 parents fc6bd97 + d4330a9 commit 6f754a2
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
}
],
"require": {
"friendsofphp/php-cs-fixer": "^2.14"
"friendsofphp/php-cs-fixer": "^2.16.1"
},
"autoload": {
"psr-4": {
Expand Down
36 changes: 36 additions & 0 deletions src/Php74.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php

namespace M6Web\CS\Config;

use PhpCsFixer\Config;

final class Php74 extends Config
{
public function __construct()
{
parent::__construct('M6Web (PHP 7.4)');

$this->setRiskyAllowed(true);
}

public function getRules()
{
$rules = [
'@Symfony' => true,
'array_syntax' => [
'syntax' => 'short',
],
'no_unreachable_default_argument_value' => false,
'braces' => [
'allow_single_line_closure' => true,
],
'heredoc_to_nowdoc' => false,
'phpdoc_summary' => false,
'increment_style' => ['style' => 'post'],
'yoda_style' => false,
'ordered_imports' => ['sort_algorithm' => 'alpha'],
];

return $rules;
}
}

0 comments on commit 6f754a2

Please sign in to comment.