Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added php cs fixer config, updated composer.json
- Loading branch information
Showing
9 changed files
with
135 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
<?php | ||
|
||
$date = date('Y'); | ||
|
||
$header = <<<EOF | ||
Copyright (c) $date Heimrich & Hannot GmbH | ||
@license LGPL-3.0-or-later | ||
EOF; | ||
|
||
$finder = PhpCsFixer\Finder::create() | ||
->exclude('Resources') | ||
->exclude('Fixtures') | ||
->in([__DIR__.'/src', __DIR__.'/tests']) | ||
->exclude('vendor') | ||
->exclude('docs') | ||
->in([__DIR__]) | ||
; | ||
|
||
return PhpCsFixer\Config::create() | ||
->setRules([ | ||
'@Symfony' => true, | ||
'@Symfony:risky' => true, | ||
'psr0' => false, | ||
'strict_comparison' => false, | ||
'strict_param' => false, | ||
'array_syntax' => ['syntax' => 'short'], | ||
'heredoc_to_nowdoc' => true, | ||
'header_comment' => ['header' => $header], | ||
'ordered_imports' => true, | ||
'ordered_class_elements' => true, | ||
'php_unit_strict' => true, | ||
'phpdoc_order' => true, | ||
'no_useless_return' => true, | ||
'no_useless_else' => true, | ||
'no_unreachable_default_argument_value' => true, | ||
'combine_consecutive_unsets' => true, | ||
'general_phpdoc_annotation_remove' => [ | ||
'expectedException', | ||
'expectedExceptionMessage', | ||
], | ||
]) | ||
->setFinder($finder) | ||
->setRiskyAllowed(true) | ||
->setUsingCache(false) | ||
; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,31 @@ | ||
<?php | ||
/** | ||
* Contao Open Source CMS | ||
* | ||
|
||
/* | ||
* Copyright (c) 2018 Heimrich & Hannot GmbH | ||
* | ||
* @author Thomas Körner <t.koerner@heimrich-hannot.de> | ||
* @license http://www.gnu.org/licences/lgpl-3.0.html LGPL | ||
* @license LGPL-3.0-or-later | ||
*/ | ||
|
||
|
||
namespace HeimrichHannot\ContaoInserttagCollectionBundle\DependencyInjection; | ||
|
||
|
||
use Symfony\Component\Config\FileLocator; | ||
use Symfony\Component\DependencyInjection\ContainerBuilder; | ||
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader; | ||
use Symfony\Component\HttpKernel\DependencyInjection\Extension; | ||
|
||
class InserttagCollectionExtension extends Extension | ||
{ | ||
|
||
/** | ||
* Loads a specific configuration. | ||
* | ||
* @param array $configs | ||
* @param array $configs | ||
* @param ContainerBuilder $container | ||
* | ||
* @throws \Exception | ||
*/ | ||
public function load(array $configs, ContainerBuilder $container) | ||
{ | ||
$loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config')); | ||
$loader->load('services.yml'); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.