Skip to content

Commit

Permalink
Fix PHP CS
Browse files Browse the repository at this point in the history
  • Loading branch information
maximehuran committed Jun 18, 2024
1 parent 6224335 commit 5c1a06f
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 30 deletions.
29 changes: 17 additions & 12 deletions .php-cs-fixer.dist.php
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,8 @@
'binary_operator_spaces' => true,
'blank_line_after_opening_tag' => true,
'blank_line_after_namespace' => true,
'blank_lines_before_namespace' => true,
'blank_line_before_statement' => true,
'braces' => [
'allow_single_line_closure' => true,
],
'cast_spaces' => true,
'class_attributes_separation' => true,
'class_definition' => [
Expand All @@ -62,7 +60,7 @@
'combine_consecutive_issets' => true,
'combine_consecutive_unsets' => true,
'comment_to_phpdoc' => true,
'compact_nullable_typehint' => true,
'compact_nullable_type_declaration' => true,
'concat_space' => [
'spacing' => 'one',
],
Expand All @@ -88,8 +86,12 @@
'fully_qualified_strict_types' => true,
'function_declaration' => true,
'function_to_constant' => true,
'function_typehint_space' => true,
'general_phpdoc_tag_rename' => true,
'global_namespace_import' => [
'import_classes' => true,
'import_constants' => false,
'import_functions' => false,
],
'header_comment' => [
'header' => $header,
'location' => 'after_open',
Expand All @@ -110,14 +112,15 @@
'lowercase_static_reference' => true,
'magic_constant_casing' => true,
'method_argument_space' => true,
'modernize_strpos' => false,
'modernize_types_casting' => true,
'multiline_comment_opening_closing' => true,
'multiline_whitespace_before_semicolons' => [
'strategy' => 'new_line_for_chained_calls',
],
'native_constant_invocation' => true,
'native_function_casing' => true,
'new_with_braces' => true,
'new_with_parentheses' => true,
'no_alias_functions' => true,
'no_alternative_syntax' => true,
'no_blank_lines_after_class_opening' => true,
Expand Down Expand Up @@ -156,27 +159,27 @@
'no_short_bool_cast' => true,
'no_spaces_after_function_name' => true,
'no_spaces_around_offset' => true,
'no_spaces_inside_parenthesis' => true,
'spaces_inside_parentheses' => true,
'no_superfluous_elseif' => true,
'no_superfluous_phpdoc_tags' => [
'allow_mixed' => true,
],
'no_unset_cast' => true,
'no_unneeded_control_parentheses' => true,
'no_unneeded_curly_braces' => true,
'no_unneeded_braces' => true,
'no_unneeded_final_method' => true,
'no_unset_on_property' => true,
'no_unused_imports' => true,
'no_useless_else' => true,
'no_useless_return' => true,
'no_trailing_comma_in_list_call' => true,
'no_trailing_comma_in_singleline_array' => true,
'no_trailing_comma_in_singleline' => true,
'no_trailing_whitespace' => true,
'no_trailing_whitespace_in_comment' => true,
'no_whitespace_before_comma_in_array' => true,
'no_whitespace_in_blank_line' => true,
'non_printable_character' => true,
'normalize_index_brace' => true,
'nullable_type_declaration_for_default_null_value' => false,
'object_operator_without_whitespace' => true,
'ordered_imports' => [
'imports_order' => [
Expand Down Expand Up @@ -211,7 +214,9 @@
'phpdoc_order' => true,
'phpdoc_return_self_reference' => true,
'phpdoc_scalar' => true,
'phpdoc_separation' => true,
'phpdoc_separation' => ['groups' => [
['ORM\\*'], ['Assert\\*'],
]],
'phpdoc_single_line_var_spacing' => true,
'phpdoc_tag_type' => true,
'phpdoc_to_comment' => false,
Expand All @@ -231,7 +236,6 @@
'self_accessor' => true,
'short_scalar_cast' => true,
'single_blank_line_at_eof' => true,
'single_blank_line_before_namespace' => true,
'single_class_element_per_statement' => true,
'single_import_per_statement' => true,
'single_line_after_imports' => true,
Expand All @@ -248,6 +252,7 @@
'elements' => ['arrays'],
],
'trim_array_spaces' => true,
'type_declaration_spaces' => true,
'unary_operator_spaces' => true,
'visibility_required' => [
'elements' => [
Expand Down
2 changes: 1 addition & 1 deletion src/DependencyInjection/MonsieurBizSyliusMenuExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,12 @@
namespace MonsieurBiz\SyliusMenuPlugin\DependencyInjection;

use MonsieurBiz\SyliusMenuPlugin\Provider\UrlProviderInterface;
use Sylius\Bundle\CoreBundle\DependencyInjection\PrependDoctrineMigrationsTrait;
use Symfony\Component\Config\FileLocator;
use Symfony\Component\DependencyInjection\ContainerBuilder;
use Symfony\Component\DependencyInjection\Extension\Extension;
use Symfony\Component\DependencyInjection\Extension\PrependExtensionInterface;
use Symfony\Component\DependencyInjection\Loader\YamlFileLoader;
use Sylius\Bundle\CoreBundle\DependencyInjection\PrependDoctrineMigrationsTrait;

final class MonsieurBizSyliusMenuExtension extends Extension implements PrependExtensionInterface
{
Expand Down
1 change: 0 additions & 1 deletion src/Entity/MenuItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
class MenuItem implements MenuItemInterface
{
use TimestampableTrait;

use TranslatableTrait {
__construct as protected initializeTranslationsCollection;
}
Expand Down
15 changes: 0 additions & 15 deletions src/Entity/MenuItemInterface.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,8 @@ public function getMenu(): ?MenuInterface;

public function setMenu(?MenuInterface $menu): void;

/**
* @return MenuItemInterface|null
*/
public function getParent(): ?self;

/**
* @param MenuItemInterface|null $parent
*/
public function setParent(?self $parent): void;

public function getPosition(): ?int;
Expand All @@ -47,19 +41,10 @@ public function getItems(): ?Collection;
*/
public function setItems(?Collection $items): void;

/**
* @param MenuItemInterface $item
*/
public function hasItem(self $item): bool;

/**
* @param MenuItemInterface $item
*/
public function addItem(self $item): void;

/**
* @param MenuItemInterface $item
*/
public function removeItem(self $item): void;

public function isTargetBlank(): bool;
Expand Down
2 changes: 1 addition & 1 deletion src/Fixture/MenuFixture.php
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ public function configureResourceNode(ArrayNodeDefinition $resourceNode): void
->end()
->end()
->end()
;
;
}

public function getName(): string
Expand Down

0 comments on commit 5c1a06f

Please sign in to comment.