Skip to content

Commit

Permalink
Update CS fixer config and run it
Browse files Browse the repository at this point in the history
  • Loading branch information
mbabker committed Sep 15, 2023
1 parent 8eced18 commit 8a6caad
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 45 deletions.
6 changes: 3 additions & 3 deletions .php-cs-fixer.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,14 @@
'get_class_to_class_keyword' => false, // Re-enable when dropping PHP 7.4 support
'linebreak_after_opening_tag' => false,
'no_superfluous_phpdoc_tags' => ['remove_inheritdoc' => true],
'nullable_type_declaration_for_default_null_value' => [
'use_nullable_type_declaration' => true,
],
'nullable_type_declaration_for_default_null_value' => ['use_nullable_type_declaration' => true],
'php_unit_test_case_static_method_calls' => ['call_type' => 'self'],
'single_line_empty_body' => true,
])
->setRiskyAllowed(true)
->setFinder(
(new PhpCsFixer\Finder())
->in(__DIR__.'/config')
->in(__DIR__.'/src')
->in(__DIR__.'/tests')
)
Expand Down
14 changes: 6 additions & 8 deletions config/form.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

namespace Symfony\Component\DependencyInjection\Loader\Configurator;

Expand All @@ -7,13 +7,11 @@
return static function (ContainerConfigurator $container): void {
$container->services()
->set('money.form.type.money', MoneyType::class)
->args(
[
service('money.factory.formatter'),
service('money.factory.parser'),
param('babdev_money.default_currency'),
]
)
->args([
service('money.factory.formatter'),
service('money.factory.parser'),
param('babdev_money.default_currency'),
])
->tag('form.type')
;
};
2 changes: 1 addition & 1 deletion config/jms_serializer.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

namespace Symfony\Component\DependencyInjection\Loader\Configurator;

Expand Down
20 changes: 7 additions & 13 deletions config/money.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

namespace Symfony\Component\DependencyInjection\Loader\Configurator;

Expand All @@ -10,21 +10,15 @@
return static function (ContainerConfigurator $container): void {
$container->services()
->set('money.factory.formatter', FormatterFactory::class)
->args(
[
param('kernel.default_locale'),
]
)

->args([
param('kernel.default_locale'),
])
->alias(FormatterFactoryInterface::class, 'money.factory.formatter')

->set('money.factory.parser', ParserFactory::class)
->args(
[
param('kernel.default_locale'),
]
)

->args([
param('kernel.default_locale'),
])
->alias(ParserFactoryInterface::class, 'money.factory.parser')
;
};
2 changes: 1 addition & 1 deletion config/serializer.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

namespace Symfony\Component\DependencyInjection\Loader\Configurator;

Expand Down
12 changes: 5 additions & 7 deletions config/twig.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

namespace Symfony\Component\DependencyInjection\Loader\Configurator;

Expand All @@ -7,12 +7,10 @@
return static function (ContainerConfigurator $container): void {
$container->services()
->set('money.twig_extension', MoneyExtension::class)
->args(
[
service('money.factory.formatter'),
param('babdev_money.default_currency'),
]
)
->args([
service('money.factory.formatter'),
param('babdev_money.default_currency'),
])
->tag('twig.extension')
;
};
16 changes: 7 additions & 9 deletions config/validator.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);

namespace Symfony\Component\DependencyInjection\Loader\Configurator;

Expand All @@ -13,14 +13,12 @@
$container->services()
->set('money.validator.abstract')
->abstract()
->args(
[
service('money.factory.formatter'),
service('money.factory.parser'),
param('babdev_money.default_currency'),
service('property_accessor'),
]
)
->args([
service('money.factory.formatter'),
service('money.factory.parser'),
param('babdev_money.default_currency'),
service('property_accessor'),
])

->set('money.validator.equal_to', MoneyEqualToValidator::class)
->parent('money.validator.abstract')
Expand Down
4 changes: 1 addition & 3 deletions src/Factory/Exception/MissingDependencyException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,4 @@

namespace BabDev\MoneyBundle\Factory\Exception;

final class MissingDependencyException extends \RuntimeException
{
}
final class MissingDependencyException extends \RuntimeException {}

0 comments on commit 8a6caad

Please sign in to comment.