diff --git a/.github/workflows/codestyles.yml b/.github/workflows/codestyles.yml
new file mode 100644
index 0000000000..c4b8f48919
--- /dev/null
+++ b/.github/workflows/codestyles.yml
@@ -0,0 +1,48 @@
+name: Coding standard refactor
+
+on:
+ schedule:
+ - cron: "0 2 * * MON" # Run at 2am every Monday
+ workflow_dispatch: ~
+
+jobs:
+ coding-standard:
+ runs-on: ubuntu-latest
+ name: "Coding standard refactor"
+
+ timeout-minutes: 5
+
+ strategy:
+ fail-fast: false
+ matrix:
+ branch: [ "master" ]
+
+ steps:
+ - uses: actions/checkout@v3
+ with:
+ ref: ${{ matrix.branch }}
+
+ - name: Setup PHP
+ uses: shivammathur/setup-php@v2
+ with:
+ php-version: 8.0 # the lowest PHP version working with ECS
+
+ - name: Install PHP dependencies
+ run: composer update --no-interaction --no-scripts
+
+ - name: Run ECS
+ run: vendor/bin/ecs check --fix src
+
+ - name: Create Pull Request
+ uses: peter-evans/create-pull-request@v4
+ with:
+ commit-message: '[CS] Refactor'
+ author: CoreShop
+ title: '[CS] Refactor'
+ body: |
+ This PR has been generated automatically to fix code-styles
+ labels: |
+ Enhancement
+ branch: coding-standard/refactor-${{ matrix.branch }}
+ delete-branch: true
+ base: ${{ matrix.branch }}
\ No newline at end of file
diff --git a/composer.json b/composer.json
index 95d115d682..5221ba5848 100644
--- a/composer.json
+++ b/composer.json
@@ -107,22 +107,22 @@
},
"require-dev": {
"behat/behat": "^3.8",
- "friends-of-behat/symfony-extension": "^2.1",
+ "behat/mink": "^1.8",
+ "dbrekelmans/bdi": "^0.3.0",
+ "friends-of-behat/mink-debug-extension": "^2.0",
+ "friends-of-behat/mink-extension": "^2.4",
"friends-of-behat/page-object-extension": "^0.3.2",
+ "friends-of-behat/symfony-extension": "^2.1",
+ "lakion/mink-debug-extension": "^2.0",
"phpstan/phpstan": "^1.5.4",
"phpstan/phpstan-doctrine": "^1.3.2",
"phpstan/phpstan-symfony": "^1.1.8",
"phpstan/phpstan-webmozart-assert": "^1.1.2",
- "behat/mink": "^1.8",
- "friends-of-behat/mink-extension": "^2.4",
- "lakion/mink-debug-extension": "^2.0",
- "friends-of-behat/mink-debug-extension": "^2.0",
"phpunit/phpunit": "^9.5",
"robertfausk/behat-panther-extension": "^1.0",
"symfony/panther": "^1.0",
- "dbrekelmans/bdi": "^0.3.0",
- "vimeo/psalm": "^4.10",
- "symplify/easy-coding-standard": "^9.4"
+ "symplify/easy-coding-standard": "^11.1",
+ "vimeo/psalm": "^4.10"
},
"conflict": {
},
diff --git a/ecs.php b/ecs.php
index 7ad8357464..925f229946 100644
--- a/ecs.php
+++ b/ecs.php
@@ -39,6 +39,7 @@
use PhpCsFixer\Fixer\Comment\NoEmptyCommentFixer;
use PhpCsFixer\Fixer\Comment\NoTrailingWhitespaceInCommentFixer;
use PhpCsFixer\Fixer\Comment\SingleLineCommentStyleFixer;
+use PhpCsFixer\Fixer\Comment\HeaderCommentFixer;
use PhpCsFixer\Fixer\ConstantNotation\NativeConstantInvocationFixer;
use PhpCsFixer\Fixer\ControlStructure\ElseifFixer;
use PhpCsFixer\Fixer\ControlStructure\IncludeFixer;
@@ -78,6 +79,7 @@
use PhpCsFixer\Fixer\Operator\IncrementStyleFixer;
use PhpCsFixer\Fixer\Operator\NewWithBracesFixer;
use PhpCsFixer\Fixer\Operator\ObjectOperatorWithoutWhitespaceFixer;
+use PhpCsFixer\Fixer\Operator\OperatorLinebreakFixer;
use PhpCsFixer\Fixer\Operator\StandardizeNotEqualsFixer;
use PhpCsFixer\Fixer\Operator\TernaryOperatorSpacesFixer;
use PhpCsFixer\Fixer\Operator\TernaryToNullCoalescingFixer;
@@ -107,6 +109,7 @@
use PhpCsFixer\Fixer\PhpTag\NoClosingTagFixer;
use PhpCsFixer\Fixer\PhpUnit\PhpUnitDedicateAssertFixer;
use PhpCsFixer\Fixer\PhpUnit\PhpUnitFqcnAnnotationFixer;
+use PhpCsFixer\Fixer\Semicolon\MultilineWhitespaceBeforeSemicolonsFixer;
use PhpCsFixer\Fixer\Semicolon\NoEmptyStatementFixer;
use PhpCsFixer\Fixer\Semicolon\NoSinglelineWhitespaceBeforeSemicolonsFixer;
use PhpCsFixer\Fixer\Semicolon\SpaceAfterSemicolonFixer;
@@ -121,259 +124,148 @@
use PhpCsFixer\Fixer\Whitespace\NoTrailingWhitespaceFixer;
use PhpCsFixer\Fixer\Whitespace\NoWhitespaceInBlankLineFixer;
use PhpCsFixer\Fixer\Whitespace\SingleBlankLineAtEofFixer;
-use Symfony\Component\DependencyInjection\Loader\Configurator\ContainerConfigurator;
-
-return static function (ContainerConfigurator $containerConfigurator): void {
- $services = $containerConfigurator->services();
-
- $services->set(EregToPregFixer::class);
-
- $services->set(NoAliasFunctionsFixer::class);
-
- $services->set(PowToExponentiationFixer::class);
-
- $services->set(NoMixedEchoPrintFixer::class)
- ->call('configure', [['use' => 'echo']]);
-
- $services->set(ArraySyntaxFixer::class)
- ->call('configure', [['syntax' => 'short']]);
-
- $services->set(NoMultilineWhitespaceAroundDoubleArrowFixer::class);
-
- $services->set(NormalizeIndexBraceFixer::class);
-
- $services->set(NoTrailingCommaInSinglelineArrayFixer::class);
-
- $services->set(NoWhitespaceBeforeCommaInArrayFixer::class);
-
- $services->set(TrailingCommaInMultilineFixer::class)
- ->call('configure', [['elements' => ['arrays']]]);
-
- $services->set(TrimArraySpacesFixer::class);
-
- $services->set(WhitespaceAfterCommaInArrayFixer::class);
-
- $services->set(BracesFixer::class)
- ->call('configure', [['allow_single_line_closure' => true]]);
-
- $services->set(EncodingFixer::class);
-
- $services->set(NonPrintableCharacterFixer::class);
-
- $services->set(ConstantCaseFixer::class)
- ->call('configure', [['case' => 'lower']]);
-
- $services->set(LowercaseKeywordsFixer::class);
-
- $services->set(LowercaseStaticReferenceFixer::class);
-
- $services->set(MagicConstantCasingFixer::class);
-
- $services->set(NativeFunctionCasingFixer::class);
-
- $services->set(CastSpacesFixer::class)
- ->call('configure', [['space' => 'none']]);
-
- $services->set(LowercaseCastFixer::class);
-
- $services->set(ModernizeTypesCastingFixer::class);
-
- $services->set(NoShortBoolCastFixer::class);
-
- $services->set(ShortScalarCastFixer::class);
-
- $services->set(ClassAttributesSeparationFixer::class);
-
- $services->set(ClassDefinitionFixer::class)
- ->call('configure', [['single_item_single_line' => true, 'multi_line_extends_each_single_line' => true]]);
-
- $services->set(NoBlankLinesAfterClassOpeningFixer::class);
-
- $services->set(NoNullPropertyInitializationFixer::class);
-
- $services->set(NoPhp4ConstructorFixer::class);
-
- $services->set(NoUnneededFinalMethodFixer::class);
-
- $services->set(ProtectedToPrivateFixer::class);
-
- $services->set(SelfAccessorFixer::class);
-
- $services->set(SingleClassElementPerStatementFixer::class);
-
- $services->set(VisibilityRequiredFixer::class)
- ->call('configure', [['elements' => ['const', 'property', 'method']]]);
-
- $services->set(NoEmptyCommentFixer::class);
-
- $services->set(NoTrailingWhitespaceInCommentFixer::class);
-
- $services->set(SingleLineCommentStyleFixer::class)
- ->call('configure', [['comment_types' => ['hash']]]);
-
- $services->set(ElseifFixer::class);
-
- $services->set(IncludeFixer::class);
-
- $services->set(NoBreakCommentFixer::class);
-
- $services->set(NoSuperfluousElseifFixer::class);
-
- $services->set(NoTrailingCommaInListCallFixer::class);
-
- $services->set(NoUnneededControlParenthesesFixer::class);
-
- $services->set(NoUnneededCurlyBracesFixer::class);
-
- $services->set(NoUselessElseFixer::class);
-
- $services->set(SwitchCaseSemicolonToColonFixer::class);
-
- $services->set(SwitchCaseSpaceFixer::class);
-
- $services->set(NativeConstantInvocationFixer::class);
-
- $services->set(FunctionDeclarationFixer::class);
-
- $services->set(FunctionTypehintSpaceFixer::class);
-
- $services->set(MethodArgumentSpaceFixer::class);
-
- $services->set(NoSpacesAfterFunctionNameFixer::class);
-
- $services->set(ReturnTypeDeclarationFixer::class);
-
- $services->set(NoLeadingImportSlashFixer::class);
-
- $services->set(NoUnusedImportsFixer::class);
-
- $services->set(OrderedImportsFixer::class);
-
- $services->set(SingleImportPerStatementFixer::class);
-
- $services->set(SingleLineAfterImportsFixer::class);
-
- $services->set(CombineConsecutiveIssetsFixer::class);
-
- $services->set(CombineConsecutiveUnsetsFixer::class);
-
- $services->set(DeclareEqualNormalizeFixer::class);
-
- $services->set(DirConstantFixer::class);
-
- $services->set(FunctionToConstantFixer::class);
-
- $services->set(IsNullFixer::class);
-
- $services->set(ErrorSuppressionFixer::class);
-
- $services->set(ListSyntaxFixer::class)
- ->call('configure', [['syntax' => 'short']]);
-
- $services->set(BlankLineAfterNamespaceFixer::class);
-
- $services->set(NoLeadingNamespaceWhitespaceFixer::class);
-
- $services->set(SingleBlankLineBeforeNamespaceFixer::class);
-
- $services->set(NoHomoglyphNamesFixer::class);
-
- $services->set(BinaryOperatorSpacesFixer::class);
-
- $services->set(ConcatSpaceFixer::class)
- ->call('configure', [['spacing' => 'one']]);
-
- $services->set(NewWithBracesFixer::class);
-
- $services->set(ObjectOperatorWithoutWhitespaceFixer::class);
-
- $services->set(IncrementStyleFixer::class)
- ->call('configure', [['style' => 'pre']]);
-
- $services->set(StandardizeNotEqualsFixer::class);
-
- $services->set(TernaryOperatorSpacesFixer::class);
-
- $services->set(TernaryToNullCoalescingFixer::class);
-
- $services->set(UnaryOperatorSpacesFixer::class);
-
- $services->set(NoBlankLinesAfterPhpdocFixer::class);
-
- $services->set(NoEmptyPhpdocFixer::class);
-
- $services->set(NoSuperfluousPhpdocTagsFixer::class)
- ->call('configure', [['allow_mixed' => true]]);
-
- $services->set(PhpdocIndentFixer::class);
-
- $services->set(GeneralPhpdocTagRenameFixer::class);
- $services->set(PhpdocInlineTagNormalizerFixer::class);
- $services->set(PhpdocTagTypeFixer::class);
-
- $services->set(PhpdocNoAccessFixer::class);
-
- $services->set(PhpdocNoAliasTagFixer::class);
-
- $services->set(PhpdocNoEmptyReturnFixer::class);
-
- $services->set(PhpdocNoPackageFixer::class);
-
- $services->set(PhpdocNoUselessInheritdocFixer::class);
-
- $services->set(PhpdocReturnSelfReferenceFixer::class);
-
- $services->set(PhpdocScalarFixer::class);
-
- $services->set(PhpdocSeparationFixer::class);
-
- $services->set(PhpdocSingleLineVarSpacingFixer::class);
-
- $services->set(PhpdocTrimFixer::class);
-
- $services->set(PhpdocTypesFixer::class);
-
- $services->set(PhpdocTypesOrderFixer::class)
- ->call('configure', [['null_adjustment' => 'always_last', 'sort_algorithm' => 'none']]);
-
- $services->set(PhpdocVarWithoutNameFixer::class);
-
- $services->set(BlankLineAfterOpeningTagFixer::class);
-
- $services->set(FullOpeningTagFixer::class);
-
- $services->set(NoClosingTagFixer::class);
-
- $services->set(PhpUnitDedicateAssertFixer::class);
-
- $services->set(PhpUnitFqcnAnnotationFixer::class);
-
- $services->set(NoEmptyStatementFixer::class);
-
- $services->set(NoSinglelineWhitespaceBeforeSemicolonsFixer::class);
-
- $services->set(SpaceAfterSemicolonFixer::class);
-
- $services->set(DeclareStrictTypesFixer::class);
-
- $services->set(SingleQuoteFixer::class);
-
- $services->set(BlankLineBeforeStatementFixer::class);
-
- $services->set(IndentationTypeFixer::class);
-
- $services->set(LineEndingFixer::class);
-
- $services->set(NoExtraBlankLinesFixer::class)
- ->call('configure', [['tokens' => ['break', 'case', 'continue', 'curly_brace_block', 'default', 'extra', 'parenthesis_brace_block', 'return', 'square_brace_block', 'switch', 'throw', 'use']]]);
-
- $services->set(NoSpacesAroundOffsetFixer::class);
-
- $services->set(NoSpacesInsideParenthesisFixer::class);
-
- $services->set(NoTrailingWhitespaceFixer::class);
-
- $services->set(NoWhitespaceInBlankLineFixer::class);
-
- $services->set(SingleBlankLineAtEofFixer::class);
+use Symplify\EasyCodingStandard\Config\ECSConfig;
+
+return static function (ECSConfig $ecsConfig): void {
+ $ecsConfig->rules([
+ BinaryOperatorSpacesFixer::class,
+ BlankLineAfterNamespaceFixer::class,
+ BlankLineAfterOpeningTagFixer::class,
+ BlankLineBeforeStatementFixer::class,
+ CastSpacesFixer::class,
+ ClassAttributesSeparationFixer::class,
+ CombineConsecutiveIssetsFixer::class,
+ CombineConsecutiveUnsetsFixer::class,
+ DeclareEqualNormalizeFixer::class,
+ DeclareStrictTypesFixer::class,
+ DirConstantFixer::class,
+ ElseifFixer::class,
+ EncodingFixer::class,
+ EregToPregFixer::class,
+ ErrorSuppressionFixer::class,
+ FullOpeningTagFixer::class,
+ FunctionDeclarationFixer::class,
+ FunctionToConstantFixer::class,
+ FunctionTypehintSpaceFixer::class,
+ GeneralPhpdocTagRenameFixer::class,
+ IncludeFixer::class,
+ IndentationTypeFixer::class,
+ IsNullFixer::class,
+ LineEndingFixer::class,
+ LowercaseCastFixer::class,
+ LowercaseKeywordsFixer::class,
+ LowercaseStaticReferenceFixer::class,
+ MagicConstantCasingFixer::class,
+ MethodArgumentSpaceFixer::class,
+ ModernizeTypesCastingFixer::class,
+ NativeConstantInvocationFixer::class,
+ NativeFunctionCasingFixer::class,
+ NewWithBracesFixer::class,
+ NoAliasFunctionsFixer::class,
+ NoBlankLinesAfterClassOpeningFixer::class,
+ NoBlankLinesAfterPhpdocFixer::class,
+ NoBreakCommentFixer::class,
+ NoClosingTagFixer::class,
+ NoEmptyCommentFixer::class,
+ NoEmptyPhpdocFixer::class,
+ NoEmptyStatementFixer::class,
+ NoHomoglyphNamesFixer::class,
+ NoLeadingImportSlashFixer::class,
+ NoLeadingNamespaceWhitespaceFixer::class,
+ NoMultilineWhitespaceAroundDoubleArrowFixer::class,
+ NonPrintableCharacterFixer::class,
+ NoNullPropertyInitializationFixer::class,
+ NoPhp4ConstructorFixer::class,
+ NormalizeIndexBraceFixer::class,
+ NoShortBoolCastFixer::class,
+ NoSinglelineWhitespaceBeforeSemicolonsFixer::class,
+ NoSpacesAfterFunctionNameFixer::class,
+ NoSpacesAroundOffsetFixer::class,
+ NoSpacesInsideParenthesisFixer::class,
+ NoSuperfluousElseifFixer::class,
+ NoTrailingCommaInListCallFixer::class,
+ NoTrailingCommaInSinglelineArrayFixer::class,
+ NoTrailingWhitespaceFixer::class,
+ NoTrailingWhitespaceInCommentFixer::class,
+ NoUnneededControlParenthesesFixer::class,
+ NoUnneededCurlyBracesFixer::class,
+ NoUnneededFinalMethodFixer::class,
+ NoUnusedImportsFixer::class,
+ NoUselessElseFixer::class,
+ NoWhitespaceBeforeCommaInArrayFixer::class,
+ NoWhitespaceInBlankLineFixer::class,
+ ObjectOperatorWithoutWhitespaceFixer::class,
+ OrderedImportsFixer::class,
+ PhpdocIndentFixer::class,
+ PhpdocInlineTagNormalizerFixer::class,
+ PhpdocNoAccessFixer::class,
+ PhpdocNoAliasTagFixer::class,
+ PhpdocNoEmptyReturnFixer::class,
+ PhpdocNoPackageFixer::class,
+ PhpdocNoUselessInheritdocFixer::class,
+ PhpdocReturnSelfReferenceFixer::class,
+ PhpdocScalarFixer::class,
+ PhpdocSeparationFixer::class,
+ PhpdocSingleLineVarSpacingFixer::class,
+ PhpdocTagTypeFixer::class,
+ PhpdocTrimFixer::class,
+ PhpdocTypesFixer::class,
+ PhpdocVarWithoutNameFixer::class,
+ PhpUnitDedicateAssertFixer::class,
+ PhpUnitFqcnAnnotationFixer::class,
+ PowToExponentiationFixer::class,
+ ProtectedToPrivateFixer::class,
+ ReturnTypeDeclarationFixer::class,
+ SelfAccessorFixer::class,
+ ShortScalarCastFixer::class,
+ SingleBlankLineAtEofFixer::class,
+ SingleBlankLineBeforeNamespaceFixer::class,
+ SingleClassElementPerStatementFixer::class,
+ SingleImportPerStatementFixer::class,
+ SingleLineAfterImportsFixer::class,
+ SingleQuoteFixer::class,
+ SpaceAfterSemicolonFixer::class,
+ StandardizeNotEqualsFixer::class,
+ SwitchCaseSemicolonToColonFixer::class,
+ SwitchCaseSpaceFixer::class,
+ TernaryOperatorSpacesFixer::class,
+ TernaryToNullCoalescingFixer::class,
+ TrimArraySpacesFixer::class,
+ UnaryOperatorSpacesFixer::class,
+ WhitespaceAfterCommaInArrayFixer::class,
+ \Symplify\CodingStandard\Fixer\Spacing\StandaloneLineConstructorParamFixer::class
+ ]);
+
+ $ecsConfig->ruleWithConfiguration(ArraySyntaxFixer::class, ['syntax' => 'short']);
+ $ecsConfig->ruleWithConfiguration(BracesFixer::class, ['allow_single_line_closure' => true]);
+ $ecsConfig->ruleWithConfiguration(ClassDefinitionFixer::class, ['single_item_single_line' => true, 'multi_line_extends_each_single_line' => true]);
+ $ecsConfig->ruleWithConfiguration(ConcatSpaceFixer::class, ['spacing' => 'one']);
+ $ecsConfig->ruleWithConfiguration(ConstantCaseFixer::class, ['case' => 'lower']);
+ $ecsConfig->ruleWithConfiguration(IncrementStyleFixer::class, ['style' => 'pre']);
+ $ecsConfig->ruleWithConfiguration(ListSyntaxFixer::class, ['syntax' => 'short']);
+ $ecsConfig->ruleWithConfiguration(MultilineWhitespaceBeforeSemicolonsFixer::class, ['strategy' => 'new_line_for_chained_calls']);
+ $ecsConfig->ruleWithConfiguration(NoExtraBlankLinesFixer::class, ['tokens' => ['break', 'case', 'continue', 'curly_brace_block', 'default', 'extra', 'parenthesis_brace_block', 'return', 'square_brace_block', 'switch', 'throw', 'use']]);
+ $ecsConfig->ruleWithConfiguration(NoMixedEchoPrintFixer::class, ['use' => 'echo']);
+ $ecsConfig->ruleWithConfiguration(NoSuperfluousPhpdocTagsFixer::class, ['allow_mixed' => true]);
+ $ecsConfig->ruleWithConfiguration(OperatorLinebreakFixer::class, ['only_booleans' => true, 'position' => 'end']);
+ $ecsConfig->ruleWithConfiguration(PhpdocTypesOrderFixer::class, ['null_adjustment' => 'always_last', 'sort_algorithm' => 'none']);
+ $ecsConfig->ruleWithConfiguration(SingleLineCommentStyleFixer::class, ['comment_types' => ['hash']]);
+ $ecsConfig->ruleWithConfiguration(TrailingCommaInMultilineFixer::class, ['elements' => ['arrays', 'arguments', 'parameters']]);
+ $ecsConfig->ruleWithConfiguration(VisibilityRequiredFixer::class, ['elements' => ['const', 'property', 'method']]);
+
+ $header = <<ruleWithConfiguration(HeaderCommentFixer::class, ['header' => $header]);
};
diff --git a/src/AppKernel.php b/src/AppKernel.php
index 5cdb73a596..7553c68fd8 100644
--- a/src/AppKernel.php
+++ b/src/AppKernel.php
@@ -1,15 +1,19 @@
kernel,
- $this->kernel->getContainer()->get(CommandDirectoryChecker::class)
+ $this->kernel->getContainer()->get(CommandDirectoryChecker::class),
);
$this->application = new Application($this->kernel);
@@ -63,7 +67,7 @@ public function iRunCoreShopInstallSampleDataCommand(): void
{
$installCommand = new InstallDemoCommand(
$this->kernel,
- $this->kernel->getContainer()->get(CommandDirectoryChecker::class)
+ $this->kernel->getContainer()->get(CommandDirectoryChecker::class),
);
$this->application = new Application($this->kernel);
diff --git a/src/CoreShop/Behat/Context/Domain/CartContext.php b/src/CoreShop/Behat/Context/Domain/CartContext.php
index cf167005a1..5eddb8d09e 100644
--- a/src/CoreShop/Behat/Context/Domain/CartContext.php
+++ b/src/CoreShop/Behat/Context/Domain/CartContext.php
@@ -1,17 +1,21 @@
cartContext->getCart()->getItems())
- )
+ count($this->cartContext->getCart()->getItems()),
+ ),
);
}
@@ -57,8 +61,8 @@ public function thereShouldBeTwoProductsInTheCart(): void
2,
sprintf(
'There should be only two products in the cart, but found %d',
- count($this->cartContext->getCart()->getItems())
- )
+ count($this->cartContext->getCart()->getItems()),
+ ),
);
}
@@ -82,8 +86,8 @@ public function theProductShouldNotBeInMyCart(ProductInterface $product): void
$foundItem,
sprintf(
'Product %s found in cart',
- $product->getName()
- )
+ $product->getName(),
+ ),
);
}
@@ -113,8 +117,8 @@ public function theProductShouldBeInMyCart(ProductInterface $product): void
$cartItem,
sprintf(
'Product %s not found in cart',
- $product->getName()
- )
+ $product->getName(),
+ ),
);
}
@@ -144,8 +148,8 @@ public function theProductShouldBeInMyCartAsGift(ProductInterface $product): voi
$cartItem ? $cartItem->getIsGiftItem() : false,
sprintf(
'Product %s is not in the Cart or is not a gift',
- $product->getName()
- )
+ $product->getName(),
+ ),
);
}
@@ -160,8 +164,8 @@ public function cartTotalShouldBeIncludingTax($total): void
sprintf(
'Cart total is expected to be %s, but it is %s',
$total,
- $this->cartContext->getCart()->getTotal(true)
- )
+ $this->cartContext->getCart()->getTotal(true),
+ ),
);
}
@@ -176,8 +180,8 @@ public function cartTotalShouldBeExcludingTax($total): void
sprintf(
'Cart total is expected to be %s, but it is %s',
$total,
- $this->cartContext->getCart()->getTotal(false)
- )
+ $this->cartContext->getCart()->getTotal(false),
+ ),
);
}
@@ -192,8 +196,8 @@ public function cartSubtotalShouldBeIncludingTax($total): void
sprintf(
'Cart subtotal is expected to be %s, but it is %s',
$total,
- $this->cartContext->getCart()->getSubtotal(true)
- )
+ $this->cartContext->getCart()->getSubtotal(true),
+ ),
);
}
@@ -208,8 +212,8 @@ public function cartSubtotalShouldBeExcludingTax($total): void
sprintf(
'Cart subtotal is expected to be %s, but it is %s',
$total,
- $this->cartContext->getCart()->getSubtotal(false)
- )
+ $this->cartContext->getCart()->getSubtotal(false),
+ ),
);
}
@@ -224,8 +228,8 @@ public function cartTotalTaxShouldBe($totalTax): void
sprintf(
'Cart total is expected to be %s, but it is %s',
$totalTax,
- $this->cartContext->getCart()->getTotalTax()
- )
+ $this->cartContext->getCart()->getTotalTax(),
+ ),
);
}
@@ -257,8 +261,8 @@ public function cartItemTaxesShouldBe($totalTax): void
sprintf(
'Cart item taxes is expected to be %s, but it is %s',
$totalTax,
- $itemTaxesTotal
- )
+ $itemTaxesTotal,
+ ),
);
}
@@ -280,8 +284,8 @@ public function cartShouldWeigh($kg): void
sprintf(
'Cart is expected to weigh %skg, but it weighs %skg',
$kg,
- $cart->getWeight()
- )
+ $cart->getWeight(),
+ ),
);
}
@@ -300,8 +304,8 @@ public function cartShippingCostShouldBeExcludingTax($shipping): void
sprintf(
'Cart shipping is expected to be %s, but it is %s',
$shipping,
- $cart->getShipping(false)
- )
+ $cart->getShipping(false),
+ ),
);
}
@@ -320,8 +324,8 @@ public function cartShippingCostShouldBeIncludingTax($shipping): void
sprintf(
'Cart shipping is expected to be %s, but it is %s',
$shipping,
- $cart->getShipping(true)
- )
+ $cart->getShipping(true),
+ ),
);
}
@@ -337,8 +341,8 @@ public function cartShippingTaxRateShouldBe(OrderInterface $cart, $shippingTaxRa
sprintf(
'Cart shipping is expected to be %s, but it is %s',
$shippingTaxRate,
- $cart->getShippingTaxRate()
- )
+ $cart->getShippingTaxRate(),
+ ),
);
}
@@ -357,8 +361,8 @@ public function cartShouldUseCarrier(CarrierInterface $carrier): void
sprintf(
'Cart is expected to use carrier %s, but found %s',
$carrier->getTitle('en'),
- $cart->getCarrier()->getTitle('en')
- )
+ $cart->getCarrier()->getTitle('en'),
+ ),
);
}
@@ -373,7 +377,7 @@ public function cartShouldNotHaveACarrier(): void
Assert::null(
$cart->getCarrier(),
- 'Cart is expected to not have a carrier but found one'
+ 'Cart is expected to not have a carrier but found one',
);
}
@@ -388,8 +392,8 @@ public function cartDiscountShouldBeIncludingTax($total): void
sprintf(
'Cart discount is expected to be %s, but it is %s',
$total,
- $this->cartContext->getCart()->getDiscount(true)
- )
+ $this->cartContext->getCart()->getDiscount(true),
+ ),
);
}
@@ -404,8 +408,8 @@ public function cartDiscountShouldBeExcludingTax($total): void
sprintf(
'Cart discount is expected to be %s, but it is %s',
$total,
- $this->cartContext->getCart()->getDiscount(false)
- )
+ $this->cartContext->getCart()->getDiscount(false),
+ ),
);
}
@@ -419,8 +423,8 @@ public function thereShouldBeNoProductInMyCart(OrderInterface $cart): void
0,
sprintf(
'There should be no product in the cart, but found %d',
- count($cart->getItems())
- )
+ count($cart->getItems()),
+ ),
);
}
@@ -432,7 +436,7 @@ public function theFirstItemInMyCartShouldHaveUnit(OrderInterface $cart, Product
Assert::minCount(
$cart->getItems(),
1,
- 'Expected to be at least 1 item in the cart, but found none'
+ 'Expected to be at least 1 item in the cart, but found none',
);
/**
@@ -442,7 +446,7 @@ public function theFirstItemInMyCartShouldHaveUnit(OrderInterface $cart, Product
Assert::notNull(
$item->getUnitDefinition(),
- 'Expected first cart item to have a unit-definition, but it did not'
+ 'Expected first cart item to have a unit-definition, but it did not',
);
Assert::eq(
@@ -451,8 +455,8 @@ public function theFirstItemInMyCartShouldHaveUnit(OrderInterface $cart, Product
sprintf(
'Expected cart item to have unit %s, but found %s',
$item->getUnitDefinition()->getUnitName(),
- $unit->getName()
- )
+ $unit->getName(),
+ ),
);
}
@@ -464,7 +468,7 @@ public function theSecondItemInMyCartShouldHaveUnit(OrderInterface $cart, Produc
Assert::minCount(
$cart->getItems(),
2,
- sprintf('Expected to be at least 2 items in the cart, but found %s', count($cart->getItems()))
+ sprintf('Expected to be at least 2 items in the cart, but found %s', count($cart->getItems())),
);
/**
@@ -474,7 +478,7 @@ public function theSecondItemInMyCartShouldHaveUnit(OrderInterface $cart, Produc
Assert::notNull(
$item->getUnitDefinition(),
- 'Expected first cart item to have a unit-definition, but it did not'
+ 'Expected first cart item to have a unit-definition, but it did not',
);
Assert::eq(
@@ -483,8 +487,8 @@ public function theSecondItemInMyCartShouldHaveUnit(OrderInterface $cart, Produc
sprintf(
'Expected cart item to have unit %s, but found %s',
$item->getUnitDefinition()->getUnitName(),
- $unit->getName()
- )
+ $unit->getName(),
+ ),
);
}
@@ -498,7 +502,7 @@ public function thereShouldBeCartFormViolation(FormInterface $addToCartForm, $me
foreach ($addToCartForm->getErrors(true, true) as $error) {
Assert::eq(
$error->getMessage(),
- $message
+ $message,
);
}
}
@@ -518,7 +522,7 @@ public function theCartItemWithProductShouldHaveADiscountPriceWithTax(ProductInt
Assert::eq(
$cartItem->getItemDiscountPrice(true),
- $price
+ $price,
);
}
@@ -537,7 +541,7 @@ public function theCartItemWithProductShouldHaveADiscountPriceWithoutTax(Product
Assert::eq(
$cartItem->getItemDiscountPrice(false),
- $price
+ $price,
);
}
@@ -556,7 +560,7 @@ public function theCartItemWithProductShouldHaveADiscountWithTax(ProductInterfac
Assert::eq(
$cartItem->getItemDiscount(true),
- $price
+ $price,
);
}
@@ -575,7 +579,7 @@ public function theCartItemWithProductShouldHaveADiscountWithoutTax(ProductInter
Assert::eq(
$cartItem->getItemDiscount(false),
- $price
+ $price,
);
}
@@ -594,7 +598,7 @@ public function theCartItemWithProductShouldHaveATotalWithTax(ProductInterface $
Assert::eq(
$cartItem->getTotal(true),
- $price
+ $price,
);
}
@@ -613,7 +617,7 @@ public function theCartItemWithProductShouldHaveATotalWithoutTax(ProductInterfac
Assert::eq(
$cartItem->getTotal(false),
- $price
+ $price,
);
}
@@ -632,7 +636,7 @@ public function theCartItemWithProductShouldHaveARetailWithTax(ProductInterface
Assert::eq(
$cartItem->getItemRetailPrice(true),
- $price
+ $price,
);
}
@@ -651,7 +655,7 @@ public function theCartItemWithProductShouldHaveARetalWithoutTax(ProductInterfac
Assert::eq(
$cartItem->getItemRetailPrice(false),
- $price
+ $price,
);
}
@@ -670,7 +674,7 @@ public function theCartItemWithProductShouldHaveAConvertedDiscountPriceWithTax(P
Assert::eq(
$cartItem->getConvertedItemDiscountPrice(true),
- $price
+ $price,
);
}
@@ -689,7 +693,7 @@ public function theCartItemWithProductShouldHaveAConvertedDiscountPriceWithoutTa
Assert::eq(
$cartItem->getConvertedItemDiscountPrice(false),
- $price
+ $price,
);
}
@@ -708,7 +712,7 @@ public function theCartItemWithProductShouldHaveAConvertedDiscountWithTax(Produc
Assert::eq(
$cartItem->getConvertedItemDiscount(true),
- $price
+ $price,
);
}
@@ -727,7 +731,7 @@ public function theCartItemWithProductShouldHaveAConvertedDiscountWithoutTax(Pro
Assert::eq(
$cartItem->getConvertedItemDiscount(false),
- $price
+ $price,
);
}
@@ -746,7 +750,7 @@ public function theCartItemWithProductShouldHaveConvertedATotalWithTax(ProductIn
Assert::eq(
$cartItem->getConvertedTotal(true),
- $price
+ $price,
);
}
@@ -765,7 +769,7 @@ public function theCartItemWithProductShouldHaveAConvertedTotalWithoutTax(Produc
Assert::eq(
$cartItem->getConvertedTotal(false),
- $price
+ $price,
);
}
@@ -784,7 +788,7 @@ public function theCartItemWithProductShouldHaveAConvertedRetailWithTax(ProductI
Assert::eq(
$cartItem->getConvertedItemRetailPrice(true),
- $price
+ $price,
);
}
@@ -803,7 +807,7 @@ public function theCartItemWithProductShouldHaveAConvertedRetalWithoutTax(Produc
Assert::eq(
$cartItem->getConvertedItemRetailPrice(false),
- $price
+ $price,
);
}
@@ -822,8 +826,8 @@ public function cartConvertedShippingCostShouldBeExcludingTax($shipping): void
sprintf(
'Cart shipping is expected to be %s, but it is %s',
$shipping,
- $cart->getConvertedShipping(false)
- )
+ $cart->getConvertedShipping(false),
+ ),
);
}
@@ -842,8 +846,8 @@ public function cartConvertedShippingCostShouldBeIncludingTax($shipping): void
sprintf(
'Cart shipping is expected to be %s, but it is %s',
$shipping,
- $cart->getConvertedShipping(true)
- )
+ $cart->getConvertedShipping(true),
+ ),
);
}
diff --git a/src/CoreShop/Behat/Context/Domain/CartPriceRuleContext.php b/src/CoreShop/Behat/Context/Domain/CartPriceRuleContext.php
index c4a06ff7df..6c109bf2a0 100644
--- a/src/CoreShop/Behat/Context/Domain/CartPriceRuleContext.php
+++ b/src/CoreShop/Behat/Context/Domain/CartPriceRuleContext.php
@@ -1,17 +1,21 @@
getParent()->getId(),
$parent->getId(),
- sprintf('%d should have the same id as the assumed parent %d', $child->getParent()->getId(), $parent->getId())
+ sprintf('%d should have the same id as the assumed parent %d', $child->getParent()->getId(), $parent->getId()),
);
}
diff --git a/src/CoreShop/Behat/Context/Domain/CountryContext.php b/src/CoreShop/Behat/Context/Domain/CountryContext.php
index 02fe953050..6fc0e58cb9 100644
--- a/src/CoreShop/Behat/Context/Domain/CountryContext.php
+++ b/src/CoreShop/Behat/Context/Domain/CountryContext.php
@@ -1,17 +1,21 @@
getName(),
$currency->getIsoCode(),
- $country->getCurrency()->getIsoCode()
- )
+ $country->getCurrency()->getIsoCode(),
+ ),
);
}
@@ -77,8 +85,8 @@ public function iShouldBeInCountry(CountryInterface $country): void
$country->getName(),
$country->getId(),
$actualCountry->getName(),
- $actualCountry->getId()
- )
+ $actualCountry->getId(),
+ ),
);
}
@@ -95,8 +103,8 @@ public function theAddressShouldFormatTo(AddressInterface $address, $formattedAd
sprintf(
'expected the address to be formatted like "%s" but got "%s" instead.',
$formattedAddress,
- $actualFormattedAddress
- )
+ $actualFormattedAddress,
+ ),
);
}
@@ -114,7 +122,7 @@ public function whenIcheckTheGeoLiteResolver($ipAddress, $countryIso): void
[],
[
'REMOTE_ADDR' => $ipAddress,
- ]
+ ],
);
$country = $this->geoLiteResolver->findCountry($request);
diff --git a/src/CoreShop/Behat/Context/Domain/CurrencyContext.php b/src/CoreShop/Behat/Context/Domain/CurrencyContext.php
index 48fbf2b02b..2e82bb95a8 100644
--- a/src/CoreShop/Behat/Context/Domain/CurrencyContext.php
+++ b/src/CoreShop/Behat/Context/Domain/CurrencyContext.php
@@ -1,17 +1,21 @@
getIsoCode(),
- $this->currencyContext->getCurrency()->getIsoCode()
- )
+ $this->currencyContext->getCurrency()->getIsoCode(),
+ ),
);
}
@@ -53,12 +60,12 @@ public function theStoreShouldHaveXCurrencies(StoreInterface $store, $countOfCur
Assert::same(
count($validCurrencies),
- (int)$countOfCurrencies,
+ (int) $countOfCurrencies,
sprintf(
'Found "%s" valid currencies instead of of "%s"',
count($validCurrencies),
- (int)$countOfCurrencies
- )
+ (int) $countOfCurrencies,
+ ),
);
}
@@ -67,7 +74,7 @@ public function theStoreShouldHaveXCurrencies(StoreInterface $store, $countOfCur
*/
public function currencyShouldBeFormatted($amount, CurrencyInterface $currency, $locale, $shouldBeFormat): void
{
- $format = $this->moneyFormatter->format((int)$amount, $currency->getIsoCode(), $locale);
+ $format = $this->moneyFormatter->format((int) $amount, $currency->getIsoCode(), $locale);
Assert::eq(
$format,
@@ -75,8 +82,8 @@ public function currencyShouldBeFormatted($amount, CurrencyInterface $currency,
sprintf(
'Given format "%s" is different from actual format "%s"',
$shouldBeFormat,
- $format
- )
+ $format,
+ ),
);
}
}
diff --git a/src/CoreShop/Behat/Context/Domain/CustomerContext.php b/src/CoreShop/Behat/Context/Domain/CustomerContext.php
index f890ff9031..527d169561 100644
--- a/src/CoreShop/Behat/Context/Domain/CustomerContext.php
+++ b/src/CoreShop/Behat/Context/Domain/CustomerContext.php
@@ -1,17 +1,21 @@
getEmail(),
- $this->customerContext->getCustomer()->getEmail()
- )
+ $this->customerContext->getCustomer()->getEmail(),
+ ),
);
}
diff --git a/src/CoreShop/Behat/Context/Domain/CustomerGroupContext.php b/src/CoreShop/Behat/Context/Domain/CustomerGroupContext.php
index ab38e89467..159ebfb6ab 100644
--- a/src/CoreShop/Behat/Context/Domain/CustomerGroupContext.php
+++ b/src/CoreShop/Behat/Context/Domain/CustomerGroupContext.php
@@ -1,17 +1,21 @@
currencyConverter->convert((int)$fromPrice, $fromCurrency->getIsoCode(), $toCurrency->getIsoCode()),
- (int)$toPrice,
+ $this->currencyConverter->convert((int) $fromPrice, $fromCurrency->getIsoCode(), $toCurrency->getIsoCode()),
+ (int) $toPrice,
sprintf(
'Given exchanged value (%s %s) is different from actual value (%s %s)',
$fromPrice,
$fromCurrency->getIsoCode(),
$toPrice,
- $toCurrency->getIsoCode()
- )
+ $toCurrency->getIsoCode(),
+ ),
);
}
}
diff --git a/src/CoreShop/Behat/Context/Domain/FilterContext.php b/src/CoreShop/Behat/Context/Domain/FilterContext.php
index 369db14a18..2542f92725 100644
--- a/src/CoreShop/Behat/Context/Domain/FilterContext.php
+++ b/src/CoreShop/Behat/Context/Domain/FilterContext.php
@@ -1,17 +1,21 @@
getConditions()),
$count,
- sprintf('%d Filters have been found with name "%s".', count($filter->getConditions()), $filter->getName())
+ sprintf('%d Filters have been found with name "%s".', count($filter->getConditions()), $filter->getName()),
);
}
@@ -69,7 +76,7 @@ public function theFilterShouldHaveFollowingValuesForSelect(
FilterInterface $filter,
$conditionType,
$field,
- TableNode $values
+ TableNode $values,
): void {
$conditions = $this->prepareFilter($filter);
$shouldHaveConditions = [];
@@ -82,7 +89,7 @@ public function theFilterShouldHaveFollowingValuesForSelect(
$filter->getConditions()->toArray(),
static function (FilterConditionInterface $condition) use ($field) {
return $condition->getConfiguration()['field'] === $field;
- }
+ },
);
$field = reset($filtered);
@@ -96,7 +103,7 @@ static function (FilterConditionInterface $condition) use ($field) {
function ($value) {
return $value['value'];
},
- $conditions[$field->getId()]['values']
+ $conditions[$field->getId()]['values'],
);
$diff = array_diff($shouldHaveConditions, $values);
@@ -113,7 +120,7 @@ public function theFilterShouldHaveXValuesWithCountXForTypeAndField(
$countOfValues,
$countPerValue,
$conditionType,
- $field
+ $field,
): void {
$conditions = $this->prepareFilter($filter);
@@ -121,7 +128,7 @@ public function theFilterShouldHaveXValuesWithCountXForTypeAndField(
$filter->getConditions()->toArray(),
static function (FilterConditionInterface $condition) use ($field) {
return $condition->getConfiguration()['field'] === $field;
- }
+ },
);
$field = reset($filtered);
@@ -135,7 +142,7 @@ static function (FilterConditionInterface $condition) use ($field) {
function ($value) {
return $value['count'];
},
- $conditions[$field->getId()]['values']
+ $conditions[$field->getId()]['values'],
);
Assert::eq($values[0], $countPerValue);
diff --git a/src/CoreShop/Behat/Context/Domain/IndexConditionContext.php b/src/CoreShop/Behat/Context/Domain/IndexConditionContext.php
index 900f85e1c0..ca3f5bb4bf 100644
--- a/src/CoreShop/Behat/Context/Domain/IndexConditionContext.php
+++ b/src/CoreShop/Behat/Context/Domain/IndexConditionContext.php
@@ -1,17 +1,21 @@
getId()));
Assert::same(
- (int)$productEntry['o_id'],
+ (int) $productEntry['o_id'],
$object->getId(),
sprintf(
'Expected to find id %s in index but found %s instead',
- (int)$productEntry['o_id'],
- $object->getId()
- )
+ (int) $productEntry['o_id'],
+ $object->getId(),
+ ),
);
}
@@ -200,8 +206,7 @@ private function indexEntryShouldHaveValue(IndexInterface $index, IndexableInter
$column,
$value,
get_debug_type($value),
-
- )
+ ),
);
}
diff --git a/src/CoreShop/Behat/Context/Domain/LinkGeneratorContext.php b/src/CoreShop/Behat/Context/Domain/LinkGeneratorContext.php
index 33ceb4c09f..6ea69caeeb 100644
--- a/src/CoreShop/Behat/Context/Domain/LinkGeneratorContext.php
+++ b/src/CoreShop/Behat/Context/Domain/LinkGeneratorContext.php
@@ -1,17 +1,21 @@
notificationRuleListener->hasBeenFired($type),
sprintf(
'Expected that the notification rule for type "%s" has been fired.',
- $type
- )
+ $type,
+ ),
);
}
}
diff --git a/src/CoreShop/Behat/Context/Domain/OrderContext.php b/src/CoreShop/Behat/Context/Domain/OrderContext.php
index 1d223444c0..f906e0d941 100644
--- a/src/CoreShop/Behat/Context/Domain/OrderContext.php
+++ b/src/CoreShop/Behat/Context/Domain/OrderContext.php
@@ -1,17 +1,21 @@
getItems())
- )
+ count($order->getItems()),
+ ),
);
}
@@ -55,8 +59,8 @@ public function orderTotalShouldBeIncludingTax(OrderInterface $order, $total): v
sprintf(
'Order total is expected to be %s, but it is %s',
$total,
- $order->getTotal(true)
- )
+ $order->getTotal(true),
+ ),
);
}
@@ -71,8 +75,8 @@ public function orderTotalShouldBeExcludingTax(OrderInterface $order, $total): v
sprintf(
'Order total is expected to be %s, but it is %s',
$total,
- $order->getTotal(false)
- )
+ $order->getTotal(false),
+ ),
);
}
@@ -87,8 +91,8 @@ public function orderSubtotalShouldBeIncludingTax(OrderInterface $order, $total)
sprintf(
'Order subtotal is expected to be %s, but it is %s',
$total,
- $order->getSubtotal(true)
- )
+ $order->getSubtotal(true),
+ ),
);
}
@@ -103,8 +107,8 @@ public function orderSubtotalShouldBeExcludingTax(OrderInterface $order, $total)
sprintf(
'Order subtotal is expected to be %s, but it is %s',
$total,
- $order->getSubtotal(false)
- )
+ $order->getSubtotal(false),
+ ),
);
}
@@ -119,8 +123,8 @@ public function orderShouldWeigh(OrderInterface $order, $kg): void
sprintf(
'Order is expected to weigh %skg, but it weighs %skg',
$kg,
- $order->getWeight()
- )
+ $order->getWeight(),
+ ),
);
}
@@ -135,8 +139,8 @@ public function orderShippingShouldBeIncludingTax(OrderInterface $order, $shippi
sprintf(
'Order shipping is expected to be %s, but it is %s',
$shipping,
- $order->getShipping(true)
- )
+ $order->getShipping(true),
+ ),
);
}
@@ -151,8 +155,8 @@ public function orderShippingShouldBeExcludingTax(OrderInterface $order, $shippi
sprintf(
'Order shipping is expected to be %s, but it is %s',
$shipping,
- $order->getShipping(false)
- )
+ $order->getShipping(false),
+ ),
);
}
@@ -167,8 +171,8 @@ public function orderShippingTaxShouldBe(OrderInterface $order, $shippingTaxRate
sprintf(
'Order shipping tax rate is expected to be %s, but it is %s',
$shippingTaxRate,
- $order->getShippingTaxRate()
- )
+ $order->getShippingTaxRate(),
+ ),
);
}
@@ -183,8 +187,8 @@ public function orderStateShouldBeState(OrderInterface $order, $state): void
sprintf(
'Expected order state to be "%s", but order is in state "%s"',
$state,
- $order->getOrderState()
- )
+ $order->getOrderState(),
+ ),
);
}
@@ -199,8 +203,8 @@ public function orderPaymentStateShouldBeState(OrderInterface $order, $state): v
sprintf(
'Expected payment state to be "%s", but order is in state "%s"',
$state,
- $order->getPaymentState()
- )
+ $order->getPaymentState(),
+ ),
);
}
@@ -215,8 +219,8 @@ public function orderShippingStateShouldBeState(OrderInterface $order, $state):
sprintf(
'Expected shipping state to be "%s", but order is in state "%s"',
$state,
- $order->getShippingState()
- )
+ $order->getShippingState(),
+ ),
);
}
@@ -231,8 +235,8 @@ public function orderInvoiceStateShouldBeState(OrderInterface $order, $state): v
sprintf(
'Expected invoice state to be "%s", but order is in state "%s"',
$state,
- $order->getInvoiceState()
- )
+ $order->getInvoiceState(),
+ ),
);
}
diff --git a/src/CoreShop/Behat/Context/Domain/PimcoreClassContext.php b/src/CoreShop/Behat/Context/Domain/PimcoreClassContext.php
index 8c7d65dea3..89dcb00e35 100644
--- a/src/CoreShop/Behat/Context/Domain/PimcoreClassContext.php
+++ b/src/CoreShop/Behat/Context/Domain/PimcoreClassContext.php
@@ -1,17 +1,21 @@
getName(),
- $defaultUnitDefinition->getUnitName()
- )
+ $defaultUnitDefinition->getUnitName(),
+ ),
);
}
@@ -168,7 +175,7 @@ public function theProductsShouldHaveAnAdditionalUnitWithConversionRate(ProductI
$found = false;
foreach ($additionalUnitDefinitions as $unitDefinition) {
- if ($unitDefinition->getUnit() === $unit && (float)$conversionRate === $unitDefinition->getConversionRate()) {
+ if ($unitDefinition->getUnit() === $unit && (float) $conversionRate === $unitDefinition->getConversionRate()) {
$found = true;
}
}
@@ -178,8 +185,8 @@ public function theProductsShouldHaveAnAdditionalUnitWithConversionRate(ProductI
sprintf(
'Expected the product to have an additional unit %s with conversion-rate %s',
$unit->getName(),
- $conversionRate
- )
+ $conversionRate,
+ ),
);
}
diff --git a/src/CoreShop/Behat/Context/Domain/ProductPriceRuleContext.php b/src/CoreShop/Behat/Context/Domain/ProductPriceRuleContext.php
index e647eb61fd..b7d11a1be0 100644
--- a/src/CoreShop/Behat/Context/Domain/ProductPriceRuleContext.php
+++ b/src/CoreShop/Behat/Context/Domain/ProductPriceRuleContext.php
@@ -1,17 +1,21 @@
getTitle('en'))
+ sprintf('Asserted that the Carrier %s is valid for my cart, but it is not', $carrier->getTitle('en')),
);
}
}
diff --git a/src/CoreShop/Behat/Context/Domain/StoreContext.php b/src/CoreShop/Behat/Context/Domain/StoreContext.php
index 7e27af06c6..7c17b9a594 100644
--- a/src/CoreShop/Behat/Context/Domain/StoreContext.php
+++ b/src/CoreShop/Behat/Context/Domain/StoreContext.php
@@ -1,17 +1,21 @@
getRate(),
$rate,
- sprintf('given rate "%d" is different from tax-rates rate "%s".', $rate, $taxrate->getRate())
+ sprintf('given rate "%d" is different from tax-rates rate "%s".', $rate, $taxrate->getRate()),
);
}
}
diff --git a/src/CoreShop/Behat/Context/Domain/TaxRuleGroupContext.php b/src/CoreShop/Behat/Context/Domain/TaxRuleGroupContext.php
index dbd7fb1b8b..d152ef6ed6 100644
--- a/src/CoreShop/Behat/Context/Domain/TaxRuleGroupContext.php
+++ b/src/CoreShop/Behat/Context/Domain/TaxRuleGroupContext.php
@@ -1,17 +1,21 @@
getTaxRules()), $countOfRules)
+ sprintf('Found %d rules instead of expected %d', count($group->getTaxRules()), $countOfRules),
);
}
@@ -74,7 +83,7 @@ public function taxRuleShouldTaxThePrice(TaxRuleGroupInterface $taxRuleGroup, $t
Assert::eq(
$taxAmount,
$tax,
- sprintf('The tax %s is different to given tax of %s', $taxAmount, $tax)
+ sprintf('The tax %s is different to given tax of %s', $taxAmount, $tax),
);
}
diff --git a/src/CoreShop/Behat/Context/Domain/ThemeContext.php b/src/CoreShop/Behat/Context/Domain/ThemeContext.php
index bc099e6810..ec68b82b17 100644
--- a/src/CoreShop/Behat/Context/Domain/ThemeContext.php
+++ b/src/CoreShop/Behat/Context/Domain/ThemeContext.php
@@ -1,17 +1,21 @@
trackProductImpression($this->trackingExtractor->updateMetadata($product));
- $result = str_replace('##id##', (string)$product->getId(), $code->getRaw());
+ $result = str_replace('##id##', (string) $product->getId(), $code->getRaw());
Assert::eq(preg_replace("/\r|\n/", '', $this->getRenderedPartForTracker($tracker)), preg_replace("/\r|\n/", '', $result));
}
@@ -79,7 +83,7 @@ public function trackProductView(ProductInterface $product, $tracker, PyStringNo
$tracker->trackProduct($this->trackingExtractor->updateMetadata($product));
- $result = str_replace('##id##', (string)$product->getId(), $code->getRaw());
+ $result = str_replace('##id##', (string) $product->getId(), $code->getRaw());
Assert::eq($this->getRenderedPartForTracker($tracker), $result);
}
@@ -93,10 +97,10 @@ public function trackCartAdd(OrderInterface $cart, ProductInterface $product, $t
$tracker->trackCartAdd($this->trackingExtractor->updateMetadata($cart), $this->trackingExtractor->updateMetadata($product), 1);
- $result = str_replace('##id##', (string)$product->getId(), $code->getRaw());
+ $result = str_replace('##id##', (string) $product->getId(), $code->getRaw());
if (count($cart->getItems()) > 0) {
- $result = str_replace('##item_id##', (string)$cart->getItems()[0]->getId(), $result);
+ $result = str_replace('##item_id##', (string) $cart->getItems()[0]->getId(), $result);
}
Assert::eq($this->getRenderedPartForTracker($tracker), $result);
@@ -111,7 +115,7 @@ public function trackCartRemove(OrderInterface $cart, ProductInterface $product,
$tracker->trackCartRemove($this->trackingExtractor->updateMetadata($cart), $this->trackingExtractor->updateMetadata($product), 1);
- $result = str_replace('##id##', (string)$product->getId(), $code->getRaw());
+ $result = str_replace('##id##', (string) $product->getId(), $code->getRaw());
Assert::eq($this->getRenderedPartForTracker($tracker), $result);
}
@@ -125,8 +129,8 @@ public function trackCheckoutStep(OrderInterface $cart, $tracker, PyStringNode $
$tracker->trackCheckoutStep($this->trackingExtractor->updateMetadata($cart));
- $result = str_replace('##id##', (string)$cart->getId(), $code->getRaw());
- $result = str_replace('##item_id##', (string)$cart->getItems()[0]->getId(), $result);
+ $result = str_replace('##id##', (string) $cart->getId(), $code->getRaw());
+ $result = str_replace('##item_id##', (string) $cart->getItems()[0]->getId(), $result);
Assert::eq($this->getRenderedPartForTracker($tracker), $result);
}
@@ -140,8 +144,8 @@ public function trackCheckoutComplete(OrderInterface $order, $tracker, PyStringN
$tracker->trackCheckoutComplete($this->trackingExtractor->updateMetadata($order));
- $result = str_replace('##id##', (string)$order->getId(), $code->getRaw());
- $result = str_replace('##item_id##', (string)$order->getItems()[0]->getId(), $result);
+ $result = str_replace('##id##', (string) $order->getId(), $code->getRaw());
+ $result = str_replace('##item_id##', (string) $order->getItems()[0]->getId(), $result);
Assert::eq($this->getRenderedPartForTracker($tracker), $code);
}
@@ -178,12 +182,12 @@ private function getRenderedPartForTracker(TrackerInterface $tracker): string
if ($tracker instanceof UniversalEcommerce) {
$code = implode(
\PHP_EOL,
- $blocks[CodeCollector::CONFIG_KEY_GLOBAL][Tracker::BLOCK_AFTER_TRACK]['append']
+ $blocks[CodeCollector::CONFIG_KEY_GLOBAL][Tracker::BLOCK_AFTER_TRACK]['append'],
);
} else {
$code = implode(
\PHP_EOL,
- $blocks[CodeCollector::CONFIG_KEY_GLOBAL][Tracker::BLOCK_BEFORE_TRACK]['append']
+ $blocks[CodeCollector::CONFIG_KEY_GLOBAL][Tracker::BLOCK_BEFORE_TRACK]['append'],
);
}
diff --git a/src/CoreShop/Behat/Context/Domain/VariantContext.php b/src/CoreShop/Behat/Context/Domain/VariantContext.php
index 338b069987..4b293f92df 100644
--- a/src/CoreShop/Behat/Context/Domain/VariantContext.php
+++ b/src/CoreShop/Behat/Context/Domain/VariantContext.php
@@ -1,26 +1,28 @@
getChildren([AbstractObject::OBJECT_TYPE_OBJECT])),
- $attributeGroup->getRealFullPath()
- )
+ $attributeGroup->getRealFullPath(),
+ ),
);
}
@@ -53,5 +55,4 @@ public function theProductShouldHaveVariants(ProductInterface $product, int $cou
{
Assert::eq(count($product->getChildren([AbstractObject::OBJECT_TYPE_VARIANT], true)), $count);
}
-
}
diff --git a/src/CoreShop/Behat/Context/Hook/CoreShopSetupContext.php b/src/CoreShop/Behat/Context/Hook/CoreShopSetupContext.php
index 350af854ea..eda9c81116 100644
--- a/src/CoreShop/Behat/Context/Hook/CoreShopSetupContext.php
+++ b/src/CoreShop/Behat/Context/Hook/CoreShopSetupContext.php
@@ -1,17 +1,21 @@
setPassword('behat-admin')
->setAdmin(true)
->setCloseWarning(false)
- ->save();
+ ->save()
+ ;
$this->securityService->logIn($user);
diff --git a/src/CoreShop/Behat/Context/Setup/CartContext.php b/src/CoreShop/Behat/Context/Setup/CartContext.php
index 34031f1c6b..bdec13a1f7 100644
--- a/src/CoreShop/Behat/Context/Setup/CartContext.php
+++ b/src/CoreShop/Behat/Context/Setup/CartContext.php
@@ -1,17 +1,21 @@
assertActionForm(DiscountPercentConfigurationType::class, 'discountPercent');
$this->addAction($rule, $this->createActionWithForm('discountPercent', [
- 'percent' => (int)$discount,
+ 'percent' => (int) $discount,
]));
}
@@ -394,7 +396,7 @@ public function theCartPriceRuleHasADiscountAmountAction(CartPriceRuleInterface
$this->assertActionForm(DiscountAmountConfigurationType::class, 'discountAmount');
$this->addAction($rule, $this->createActionWithForm('discountAmount', [
- 'amount' => (int)$amount,
+ 'amount' => (int) $amount,
'currency' => $currency->getId(),
'applyOn' => $appliedOn,
]));
@@ -433,7 +435,7 @@ public function theCartPriceRuleHasASurchargePercentAction(CartPriceRuleInterfac
$this->assertActionForm(SurchargePercentConfigurationType::class, 'surchargePercent');
$this->addAction($rule, $this->createActionWithForm('surchargePercent', [
- 'percent' => (int)$surcharge,
+ 'percent' => (int) $surcharge,
]));
}
@@ -446,7 +448,7 @@ public function theCartPriceRuleHasASurchargeAmountAction(CartPriceRuleInterface
$this->assertActionForm(SurchargeAmountConfigurationType::class, 'surchargeAmount');
$this->addAction($rule, $this->createActionWithForm('surchargeAmount', [
- 'amount' => (int)$amount,
+ 'amount' => (int) $amount,
'currency' => $currency->getId(),
]));
}
@@ -557,7 +559,7 @@ public function theCartItemActionHasADiscountPercentAction(ActionInterface $acti
$this->assertActionForm(DiscountPercentConfigurationType::class, 'discountPercent');
$this->actionAddAction($action, $this->createActionWithForm('discountPercent', [
- 'percent' => (int)$discount,
+ 'percent' => (int) $discount,
]));
}
@@ -570,7 +572,7 @@ public function theCartItemActionHasADiscountAmountAction(ActionInterface $actio
$this->assertActionForm(DiscountAmountConfigurationType::class, 'discountAmount');
$this->actionAddAction($action, $this->createActionWithForm('discountAmount', [
- 'amount' => (int)$amount,
+ 'amount' => (int) $amount,
'currency' => $currency->getId(),
'applyOn' => $appliedOn,
]));
@@ -594,7 +596,6 @@ private function actionAddCondition(ActionInterface $action, ConditionInterface
return $condition;
}
-
private function actionAddAction(ActionInterface $action, ActionInterface $newAction): ActionInterface
{
$config = $action->getConfiguration();
diff --git a/src/CoreShop/Behat/Context/Setup/CartPriceRuleVoucherCodeContext.php b/src/CoreShop/Behat/Context/Setup/CartPriceRuleVoucherCodeContext.php
index 727630e9c9..67ebfea840 100644
--- a/src/CoreShop/Behat/Context/Setup/CartPriceRuleVoucherCodeContext.php
+++ b/src/CoreShop/Behat/Context/Setup/CartPriceRuleVoucherCodeContext.php
@@ -1,17 +1,21 @@
kernelRootDirectory),
'-d',
sprintf('%s/var/config/', $this->kernelRootDirectory),
- ]
+ ],
);
$process->run();
}
diff --git a/src/CoreShop/Behat/Context/Setup/CurrencyContext.php b/src/CoreShop/Behat/Context/Setup/CurrencyContext.php
index 1dce50d621..ec431bc0d9 100644
--- a/src/CoreShop/Behat/Context/Setup/CurrencyContext.php
+++ b/src/CoreShop/Behat/Context/Setup/CurrencyContext.php
@@ -1,17 +1,21 @@
logDirectory, date('YmdHis'), $type);
+ $path = sprintf('%s/behat-%s.%s', $this->logDirectory, date('YmdHis'), $type);
if (file_put_contents($path, $content) === false) {
throw new \RuntimeException(sprintf('Failed while trying to write log in "%s".', $path));
}
}
+
private function getStatusCode(Session $session): ?int
{
try {
diff --git a/src/CoreShop/Behat/Context/Setup/ManufacturerContext.php b/src/CoreShop/Behat/Context/Setup/ManufacturerContext.php
index 0fa7c87524..251d632aa6 100644
--- a/src/CoreShop/Behat/Context/Setup/ManufacturerContext.php
+++ b/src/CoreShop/Behat/Context/Setup/ManufacturerContext.php
@@ -1,17 +1,21 @@
setName($name);
$classDefinition->setLayoutDefinitions(
- json_decode('')
+ json_decode(''),
);
$classDefinition->save();
@@ -814,7 +820,7 @@ private function setObjectValuesFromTable(Concrete $object, TableNode $table): v
private function addFieldDefinitionToDefinition(
ClassDefinition|Objectbrick\Definition|Fieldcollection\Definition $definition,
- string $fieldDefinition
+ string $fieldDefinition,
): void {
$definitionUpdater = $this->getUpdater($definition);
$definitionUpdater->insertField(json_decode(stripslashes($fieldDefinition), true, 512, \JSON_THROW_ON_ERROR));
diff --git a/src/CoreShop/Behat/Context/Setup/ProductContext.php b/src/CoreShop/Behat/Context/Setup/ProductContext.php
index 6a7c322325..120b60fbae 100644
--- a/src/CoreShop/Behat/Context/Setup/ProductContext.php
+++ b/src/CoreShop/Behat/Context/Setup/ProductContext.php
@@ -1,17 +1,21 @@
createVariant($product, $productName, $price, $store);
@@ -136,7 +147,7 @@ public function theProductHasAVariantPricedAt(
*/
public function theProductHasAVariant(
ProductInterface $product,
- string $productName
+ string $productName,
): void {
$variant = $this->createSimpleVariant($product, $productName);
@@ -152,8 +163,7 @@ public function theProductHasVaraintsForAllValuesOfAttributeGroup(
ProductInterface $product,
AttributeGroupInterface $group1,
AttributeGroupInterface $group2,
- ): void
- {
+ ): void {
$product->setAllowedAttributeGroups([$group1, $group2]);
$product->save();
@@ -171,18 +181,18 @@ public function theProductHasVaraintsForAllValuesOfAttributeGroup(
'%s %s %s',
$product->getName(),
$attribute1->getName(),
- $attribute2->getName()
- )
+ $attribute2->getName(),
+ ),
);
$variant->setKey(File::getValidFilename(sprintf(
'%s %s %s',
$product->getName(),
$attribute1->getName(),
- $attribute2->getName()
+ $attribute2->getName(),
)));
$variant->setAttributes([
$attribute1,
- $attribute2
+ $attribute2,
]);
$variant->setPublished(true);
$this->saveProduct($variant);
@@ -198,8 +208,7 @@ public function theProductHasVaraintsForAllValuesOf3AttributeGroups(
AttributeGroupInterface $group1,
AttributeGroupInterface $group2,
AttributeGroupInterface $group3,
- ): void
- {
+ ): void {
$product->setAllowedAttributeGroups([$group1, $group2, $group3]);
$product->save();
@@ -223,7 +232,7 @@ public function theProductHasVaraintsForAllValuesOf3AttributeGroups(
$attribute1->getName(),
$attribute2->getName(),
$attribute3->getName(),
- )
+ ),
);
$variant->setAttributes([
$attribute1,
@@ -512,7 +521,7 @@ public function theProductHasAnAdditionalUnit(
ProductUnitInterface $unit,
$conversionRate,
int $price = null,
- int $precison = 0
+ int $precison = 0,
): void {
$definitions = $this->getOrCreateUnitDefinitions($product->getUnitDefinitions());
@@ -521,7 +530,7 @@ public function theProductHasAnAdditionalUnit(
*/
$defaultUnitDefinition = $this->productUnitDefinition->createNew();
$defaultUnitDefinition->setUnit($unit);
- $defaultUnitDefinition->setConversionRate((float)$conversionRate);
+ $defaultUnitDefinition->setConversionRate((float) $conversionRate);
$defaultUnitDefinition->setPrecision($precison);
$definitions->addAdditionalUnitDefinition($defaultUnitDefinition);
@@ -557,7 +566,7 @@ public function iCopyTheProduct(ProductInterface $product): void
{
$objectService = new Service();
$newObject = $objectService->copyAsChild($product->getParent(), $product);
-
+
$newObject->setKey($product->getKey() . '-copy');
$newObject->save();
@@ -628,7 +637,7 @@ private function createProduct(string $productName, int $price = 100, StoreInter
private function createSimpleVariant(
ProductInterface $product,
- string $productName
+ string $productName,
): ProductInterface {
$variant = $this->createSimpleProduct($productName);
$variant->setParent($product);
@@ -644,7 +653,7 @@ private function createVariant(
ProductInterface $product,
string $productName,
int $price = 100,
- StoreInterface $store = null
+ StoreInterface $store = null,
): ProductInterface {
$variant = $this->createSimpleVariant($product, $productName);
diff --git a/src/CoreShop/Behat/Context/Setup/ProductPriceRuleContext.php b/src/CoreShop/Behat/Context/Setup/ProductPriceRuleContext.php
index ccecd59f75..deead75b88 100644
--- a/src/CoreShop/Behat/Context/Setup/ProductPriceRuleContext.php
+++ b/src/CoreShop/Behat/Context/Setup/ProductPriceRuleContext.php
@@ -1,17 +1,21 @@
assertConditionForm(CountriesConfigurationType::class, 'countries');
@@ -157,7 +166,7 @@ public function theProductPriceRuleHasACountriesCondition(
*/
public function theProductPriceRuleHasACustomerCondition(
ProductPriceRuleInterface $rule,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$this->assertConditionForm(CustomersConfigurationType::class, 'customers');
@@ -191,7 +200,7 @@ public function theProductPriceRuleHasATimeSpanCondition(ProductPriceRuleInterfa
*/
public function theProductPriceRuleHasACustomerGroupCondition(
ProductPriceRuleInterface $rule,
- CustomerGroupInterface $group
+ CustomerGroupInterface $group,
): void {
$this->assertConditionForm(CustomerGroupsConfigurationType::class, 'customerGroups');
@@ -238,7 +247,7 @@ public function theProductPriceRuleHasAZoneCondition(ProductPriceRuleInterface $
*/
public function theProductPriceRuleHasACurrencyCondition(
ProductPriceRuleInterface $rule,
- CurrencyInterface $currency
+ CurrencyInterface $currency,
): void {
$this->assertConditionForm(CurrenciesConfigurationType::class, 'currencies');
@@ -255,7 +264,7 @@ public function theProductPriceRuleHasACurrencyCondition(
*/
public function theProductPriceRuleHasACategoriesCondition(
ProductPriceRuleInterface $rule,
- CategoryInterface $category
+ CategoryInterface $category,
): void {
$this->assertConditionForm(CategoriesConfigurationType::class, 'categories');
@@ -270,7 +279,7 @@ public function theProductPriceRuleHasACategoriesCondition(
*/
public function theProductPriceRuleHasACategoriesConditionAndItIsRecursive(
ProductPriceRuleInterface $rule,
- CategoryInterface $category
+ CategoryInterface $category,
): void {
$this->assertConditionForm(CategoriesConfigurationType::class, 'categories');
@@ -288,7 +297,7 @@ public function theProductPriceRuleHasACategoriesConditionAndItIsRecursive(
public function theProductPriceRuleHasAProductCondition(
ProductPriceRuleInterface $rule,
ProductInterface $product,
- ProductInterface $product2 = null
+ ProductInterface $product2 = null,
): void {
$this->assertConditionForm(ProductsConfigurationType::class, 'products');
@@ -314,7 +323,7 @@ public function theProductPriceRuleHasAProductCondition(
public function theProductPriceRuleHasAProductConditionWhichIncludesVariants(
ProductPriceRuleInterface $rule,
ProductInterface $product,
- ProductInterface $product2 = null
+ ProductInterface $product2 = null,
): void {
$this->assertConditionForm(ProductsConfigurationType::class, 'products');
@@ -341,7 +350,7 @@ public function theProductPriceRuleHasADiscountPercentAction(ProductPriceRuleInt
$this->assertActionForm(DiscountPercentConfigurationType::class, 'discountPercent');
$this->addAction($rule, $this->createActionWithForm('discountPercent', [
- 'percent' => (int)$discount,
+ 'percent' => (int) $discount,
]));
}
@@ -352,12 +361,12 @@ public function theProductPriceRuleHasADiscountPercentAction(ProductPriceRuleInt
public function theProductPriceRuleHasADiscountAmountAction(
ProductPriceRuleInterface $rule,
$amount,
- CurrencyInterface $currency
+ CurrencyInterface $currency,
): void {
$this->assertActionForm(DiscountAmountConfigurationType::class, 'discountAmount');
$this->addAction($rule, $this->createActionWithForm('discountAmount', [
- 'amount' => (int)$amount,
+ 'amount' => (int) $amount,
'currency' => $currency->getId(),
]));
}
@@ -369,12 +378,12 @@ public function theProductPriceRuleHasADiscountAmountAction(
public function theProductPriceRuleHasADiscountPrice(
ProductPriceRuleInterface $rule,
$price,
- CurrencyInterface $currency
+ CurrencyInterface $currency,
): void {
$this->assertActionForm(PriceConfigurationType::class, 'discountPrice');
$this->addAction($rule, $this->createActionWithForm('discountPrice', [
- 'price' => (int)$price,
+ 'price' => (int) $price,
'currency' => $currency->getId(),
]));
}
@@ -388,7 +397,7 @@ public function theProductPriceRuleHasAPrice(ProductPriceRuleInterface $rule, $p
$this->assertActionForm(PriceConfigurationType::class, 'price');
$this->addAction($rule, $this->createActionWithForm('price', [
- 'price' => (int)$price,
+ 'price' => (int) $price,
'currency' => $currency->getId(),
]));
}
@@ -400,7 +409,7 @@ public function theProductPriceRuleHasAPrice(ProductPriceRuleInterface $rule, $p
public function theProductPriceRuleHasAQuantityCondition(
ProductPriceRuleInterface $rule,
int $min,
- int $max
+ int $max,
): void {
$this->assertConditionForm(QuantityConfigurationType::class, 'quantity');
diff --git a/src/CoreShop/Behat/Context/Setup/ProductQuantityPriceRuleContext.php b/src/CoreShop/Behat/Context/Setup/ProductQuantityPriceRuleContext.php
index 3de50cc241..1e2593f91c 100644
--- a/src/CoreShop/Behat/Context/Setup/ProductQuantityPriceRuleContext.php
+++ b/src/CoreShop/Behat/Context/Setup/ProductQuantityPriceRuleContext.php
@@ -1,17 +1,21 @@
getUnitDefinitionFromProduct($rule->getProduct(), $unit);
@@ -244,7 +255,7 @@ public function theProductQuantityPriceRuleHasRangePercentageIncreaseForUnit(
ProductQuantityPriceRuleInterface $rule,
int $from,
$percentage,
- ProductUnitInterface $unit
+ ProductUnitInterface $unit,
): void {
$unitDefinition = $this->getUnitDefinitionFromProduct($rule->getProduct(), $unit);
@@ -269,7 +280,7 @@ public function theProductQuantityPriceRuleHasRangeAmountDecreaseForUnit(
int $from,
$amount,
CurrencyInterface $currency,
- ProductUnitInterface $unit
+ ProductUnitInterface $unit,
): void {
$unitDefinition = $this->getUnitDefinitionFromProduct($rule->getProduct(), $unit);
@@ -295,7 +306,7 @@ public function theProductQuantityPriceRuleHasRangeAmountIncreaseForUnit(
int $from,
$amount,
CurrencyInterface $currency,
- ProductUnitInterface $unit
+ ProductUnitInterface $unit,
): void {
$unitDefinition = $this->getUnitDefinitionFromProduct($rule->getProduct(), $unit);
@@ -321,7 +332,7 @@ public function theProductQuantityPriceRuleHasRangeFixedForUnit(
int $from,
$amount,
CurrencyInterface $currency,
- ProductUnitInterface $unit
+ ProductUnitInterface $unit,
): void {
$unitDefinition = $this->getUnitDefinitionFromProduct($rule->getProduct(), $unit);
@@ -367,7 +378,7 @@ public function theQuantityPriceRangeIsValidForUnit(QuantityRangeInterface $rang
*/
public function theProductQuantityPriceRuleHasACountriesCondition(
ProductQuantityPriceRuleInterface $rule,
- CountryInterface $country
+ CountryInterface $country,
): void {
$this->assertConditionForm(CountriesConfigurationType::class, 'countries');
@@ -384,7 +395,7 @@ public function theProductQuantityPriceRuleHasACountriesCondition(
*/
public function theProductQuantityPriceRuleHasACustomerCondition(
ProductQuantityPriceRuleInterface $rule,
- CustomerInterface $customer
+ CustomerInterface $customer,
): void {
$this->assertConditionForm(CustomersConfigurationType::class, 'customers');
@@ -402,7 +413,7 @@ public function theProductQuantityPriceRuleHasACustomerCondition(
public function theProductQuantityPriceRuleHasATimeSpanCondition(
ProductQuantityPriceRuleInterface $rule,
$from,
- $to
+ $to,
): void {
$this->assertConditionForm(TimespanConfigurationType::class, 'timespan');
@@ -421,7 +432,7 @@ public function theProductQuantityPriceRuleHasATimeSpanCondition(
*/
public function theProductQuantityPriceRuleHasACustomerGroupCondition(
ProductQuantityPriceRuleInterface $rule,
- CustomerGroupInterface $group
+ CustomerGroupInterface $group,
): void {
$this->assertConditionForm(CustomerGroupsConfigurationType::class, 'customerGroups');
@@ -438,7 +449,7 @@ public function theProductQuantityPriceRuleHasACustomerGroupCondition(
*/
public function theProductQuantityPriceRuleHasAStoreCondition(
ProductQuantityPriceRuleInterface $rule,
- StoreInterface $store
+ StoreInterface $store,
): void {
$this->assertConditionForm(StoresConfigurationType::class, 'stores');
@@ -455,7 +466,7 @@ public function theProductQuantityPriceRuleHasAStoreCondition(
*/
public function theProductQuantityPriceRuleHasAZoneCondition(
ProductQuantityPriceRuleInterface $rule,
- ZoneInterface $zone
+ ZoneInterface $zone,
): void {
$this->assertConditionForm(ZonesConfigurationType::class, 'zones');
@@ -472,7 +483,7 @@ public function theProductQuantityPriceRuleHasAZoneCondition(
*/
public function theProductsQuantityPriceRuleHasACurrencyCondition(
ProductQuantityPriceRuleInterface $rule,
- CurrencyInterface $currency
+ CurrencyInterface $currency,
): void {
$this->assertConditionForm(CurrenciesConfigurationType::class, 'currencies');
@@ -491,7 +502,7 @@ public function theProductQuantityPriceRuleHasANestedConditionWithStores(
ProductQuantityPriceRuleInterface $rule,
$operator,
StoreInterface $store1,
- StoreInterface $store2
+ StoreInterface $store2,
): void {
$this->assertConditionForm(ProductSpecificPriceNestedConfigurationType::class, 'nested');
@@ -526,7 +537,7 @@ public function theProductQuantityPriceRuleHasANestedConditionWithStoreAndCountr
ProductQuantityPriceRuleInterface $rule,
$operator,
StoreInterface $store,
- CountryInterface $country
+ CountryInterface $country,
): void {
$this->assertConditionForm(ProductSpecificPriceNestedConfigurationType::class, 'nested');
@@ -569,7 +580,7 @@ private function getUnitDefinitionFromProduct(int $productId, ProductUnitInterfa
'Unit %s in product %s (%s) not found',
$unit->getName(),
$product->getName(),
- $product->getId()
+ $product->getId(),
));
}
diff --git a/src/CoreShop/Behat/Context/Setup/ProductSpecificPriceRuleContext.php b/src/CoreShop/Behat/Context/Setup/ProductSpecificPriceRuleContext.php
index 4d2613fdb1..492b20f699 100644
--- a/src/CoreShop/Behat/Context/Setup/ProductSpecificPriceRuleContext.php
+++ b/src/CoreShop/Behat/Context/Setup/ProductSpecificPriceRuleContext.php
@@ -1,17 +1,21 @@
assertActionForm(DiscountPercentConfigurationType::class, 'discountPercent');
$this->addAction($rule, $this->createActionWithForm('discountPercent', [
- 'percent' => (int)$discount,
+ 'percent' => (int) $discount,
]));
}
@@ -226,7 +235,7 @@ public function theProductSpecificPriceRuleHasADiscountAmountAction(ProductSpeci
$this->assertActionForm(DiscountAmountConfigurationType::class, 'discountAmount');
$this->addAction($rule, $this->createActionWithForm('discountAmount', [
- 'amount' => (int)$amount,
+ 'amount' => (int) $amount,
'currency' => $currency->getId(),
]));
}
@@ -240,7 +249,7 @@ public function theProductSpecificPriceRuleHasADiscountPriceAction(ProductSpecif
$this->assertActionForm(PriceConfigurationType::class, 'discountPrice');
$this->addAction($rule, $this->createActionWithForm('discountPrice', [
- 'price' => (int)$price,
+ 'price' => (int) $price,
'currency' => $currency->getId(),
]));
}
@@ -254,7 +263,7 @@ public function theProductSpecificPriceRuleHasAPriceAction(ProductSpecificPriceR
$this->assertActionForm(PriceConfigurationType::class, 'price');
$this->addAction($rule, $this->createActionWithForm('price', [
- 'price' => (int)$price,
+ 'price' => (int) $price,
'currency' => $currency->getId(),
]));
}
diff --git a/src/CoreShop/Behat/Context/Setup/ProductUnitContext.php b/src/CoreShop/Behat/Context/Setup/ProductUnitContext.php
index ef98381f3a..002c93eb8d 100644
--- a/src/CoreShop/Behat/Context/Setup/ProductUnitContext.php
+++ b/src/CoreShop/Behat/Context/Setup/ProductUnitContext.php
@@ -1,17 +1,21 @@
sharedStorage->set(
'data_object_recycle_' . $concrete->getId(),
- $item->getId()
+ $item->getId(),
);
}
diff --git a/src/CoreShop/Behat/Context/Setup/ShippingContext.php b/src/CoreShop/Behat/Context/Setup/ShippingContext.php
index d19593a8c1..10ee3da3f1 100644
--- a/src/CoreShop/Behat/Context/Setup/ShippingContext.php
+++ b/src/CoreShop/Behat/Context/Setup/ShippingContext.php
@@ -1,17 +1,21 @@
assertActionForm(PriceActionConfigurationType::class, 'price');
$this->addAction($rule, $this->createActionWithForm('price', [
- 'price' => (int)$price,
+ 'price' => (int) $price,
'currency' => $currency->getId(),
]));
}
@@ -490,7 +501,7 @@ public function theShippingRuleHasAAdditionalAmountAction(ShippingRuleInterface
$this->assertActionForm(AdditionAmountActionConfigurationType::class, 'additionAmount');
$this->addAction($rule, $this->createActionWithForm('additionAmount', [
- 'amount' => (int)$amount,
+ 'amount' => (int) $amount,
'currency' => $currency->getId(),
]));
}
@@ -504,7 +515,7 @@ public function theShippingRuleHasAAdditionalPercentAction(ShippingRuleInterface
$this->assertActionForm(AdditionPercentActionConfigurationType::class, 'additionPercent');
$this->addAction($rule, $this->createActionWithForm('additionPercent', [
- 'percent' => (int)$amount,
+ 'percent' => (int) $amount,
]));
}
@@ -517,7 +528,7 @@ public function theShippingRuleHasADiscountAmountAction(ShippingRuleInterface $r
$this->assertActionForm(DiscountAmountActionConfigurationType::class, 'discountAmount');
$this->addAction($rule, $this->createActionWithForm('discountAmount', [
- 'amount' => (int)$amount,
+ 'amount' => (int) $amount,
'currency' => $currency->getId(),
]));
}
@@ -531,7 +542,7 @@ public function theShippingRuleHasADiscountPercentAction(ShippingRuleInterface $
$this->assertActionForm(DiscountPercentActionConfigurationType::class, 'discountPercent');
$this->addAction($rule, $this->createActionWithForm('discountPercent', [
- 'percent' => (int)$amount,
+ 'percent' => (int) $amount,
]));
}
diff --git a/src/CoreShop/Behat/Context/Setup/StoreContext.php b/src/CoreShop/Behat/Context/Setup/StoreContext.php
index 48e1ed669e..cf780f6747 100644
--- a/src/CoreShop/Behat/Context/Setup/StoreContext.php
+++ b/src/CoreShop/Behat/Context/Setup/StoreContext.php
@@ -1,17 +1,21 @@
getAllowedAttributeGroups() ?? [];
@@ -126,7 +129,7 @@ public function theProductIsAllowedAttributeGroup(
*/
public function theVariantUsesAttributeColor(
ProductVariantAwareInterface $product,
- AttributeColorInterface $attributeColor
+ AttributeColorInterface $attributeColor,
): void {
$attributes = $product->getAttributes() ?? [];
@@ -142,7 +145,7 @@ public function theVariantUsesAttributeColor(
*/
public function theVariantUsesAttributeValue(
ProductVariantAwareInterface $product,
- AttributeValueInterface $attributeValue
+ AttributeValueInterface $attributeValue,
): void {
$attributes = $product->getAttributes() ?? [];
@@ -152,7 +155,6 @@ public function theVariantUsesAttributeValue(
$product->save();
}
-
/**
* @Given /^the (variant "[^"]+") uses (attribute color "[^"]+") and (attribute value "[^"]+")$/
* @Given /^the (variant) uses (attribute color "[^"]+") and (attribute value "[^"]+")$/
@@ -180,9 +182,9 @@ private function hex2rgba(string $color): RgbaColor
// Check if color has 6 or 3 characters and get values
if (strlen($color) === 6) {
- $hex = array($color[0].$color[1], $color[2].$color[3], $color[4].$color[5]);
+ $hex = [$color[0] . $color[1], $color[2] . $color[3], $color[4] . $color[5]];
} elseif (strlen($color) === 3) {
- $hex = array($color[0].$color[0], $color[1].$color[1], $color[2].$color[2]);
+ $hex = [$color[0] . $color[0], $color[1] . $color[1], $color[2] . $color[2]];
} else {
return new RgbaColor(0, 0, 0, 0);
}
diff --git a/src/CoreShop/Behat/Context/Setup/VersionContext.php b/src/CoreShop/Behat/Context/Setup/VersionContext.php
index 2242fcf5dc..42404eae0d 100644
--- a/src/CoreShop/Behat/Context/Setup/VersionContext.php
+++ b/src/CoreShop/Behat/Context/Setup/VersionContext.php
@@ -1,17 +1,21 @@
getObjects()),
1,
- sprintf('%d categories has been found with name "%s".', count($list->getObjects()), $categoryName)
+ sprintf('%d categories has been found with name "%s".', count($list->getObjects()), $categoryName),
);
$objects = $list->getObjects();
diff --git a/src/CoreShop/Behat/Context/Transform/CountryContext.php b/src/CoreShop/Behat/Context/Transform/CountryContext.php
index 8128a3182c..322fcbadc0 100644
--- a/src/CoreShop/Behat/Context/Transform/CountryContext.php
+++ b/src/CoreShop/Behat/Context/Transform/CountryContext.php
@@ -1,17 +1,21 @@
getObjects()),
1,
- sprintf('%d products has been found with name "%s".', count($list->getObjects()), $productName)
+ sprintf('%d products has been found with name "%s".', count($list->getObjects()), $productName),
);
$objects = $list->getObjects();
@@ -73,7 +79,7 @@ public function getProductByKey($productName)
Assert::eq(
count($list->getObjects()),
1,
- sprintf('%d products has been found with key "%s".', count($list->getObjects()), $productName)
+ sprintf('%d products has been found with key "%s".', count($list->getObjects()), $productName),
);
$objects = $list->getObjects();
diff --git a/src/CoreShop/Behat/Context/Transform/ProductPriceRuleContext.php b/src/CoreShop/Behat/Context/Transform/ProductPriceRuleContext.php
index 444d6ed667..5d2c08a141 100644
--- a/src/CoreShop/Behat/Context/Transform/ProductPriceRuleContext.php
+++ b/src/CoreShop/Behat/Context/Transform/ProductPriceRuleContext.php
@@ -1,17 +1,21 @@
getStatusCode(),
- $requests[$index]->getUri()
- )
+ $requests[$index]->getUri(),
+ ),
);
}
@@ -93,8 +100,8 @@ public function iOpenCartSummaryPage(PaymentInterface $payment): void
4,
sprintf(
'Expected to have 4 state changes, but got %s instead. Maybe concurrent state changes?',
- count($checkStates)
- )
+ count($checkStates),
+ ),
);
}
}
diff --git a/src/CoreShop/Behat/Context/Ui/Frontend/CartContext.php b/src/CoreShop/Behat/Context/Ui/Frontend/CartContext.php
index 6fef1ab0f2..1b6c7c9710 100644
--- a/src/CoreShop/Behat/Context/Ui/Frontend/CartContext.php
+++ b/src/CoreShop/Behat/Context/Ui/Frontend/CartContext.php
@@ -1,17 +1,21 @@
notificationChecker->checkNotification(
sprintf('YOU NEED TO ORDER AT LEAST %s UNITS OF %s.', $quantity, $productName),
- NotificationType::error()
+ NotificationType::error(),
);
}
@@ -183,7 +192,7 @@ public function iShouldBeNotifiedThatICanOnlyOrderAMaximumQuantityOf(string $qua
{
$this->notificationChecker->checkNotification(
sprintf('YOU CAN ORDER A MAXIMUM OF %s UNITS OF %s.', $quantity, $productName),
- NotificationType::error()
+ NotificationType::error(),
);
}
@@ -194,7 +203,7 @@ public function iShouldBeNotifiedThatDoesNotHaveSufficientStock(string $productN
{
$this->notificationChecker->checkNotification(
sprintf('%s DOES NOT HAVE SUFFICIENT STOCK.', $productName),
- NotificationType::error()
+ NotificationType::error(),
);
}
@@ -274,7 +283,7 @@ public function iShouldSeeProductWithUnitInMyCart(ProductInterface $product, Pro
*/
public function iShouldSeeWithQuantityInMyCart($productName, $quantity): void
{
- Assert::same($this->cartPage->getQuantity($productName), (int)$quantity);
+ Assert::same($this->cartPage->getQuantity($productName), (int) $quantity);
}
/**
diff --git a/src/CoreShop/Behat/Context/Ui/Frontend/CheckoutContext.php b/src/CoreShop/Behat/Context/Ui/Frontend/CheckoutContext.php
index aee3a78525..79c4679f6e 100644
--- a/src/CoreShop/Behat/Context/Ui/Frontend/CheckoutContext.php
+++ b/src/CoreShop/Behat/Context/Ui/Frontend/CheckoutContext.php
@@ -1,17 +1,21 @@
changePasswordPage->checkValidationMessageFor(
'new_password',
- 'The password fields must match.'
+ 'The password fields must match.',
));
}
@@ -105,7 +114,7 @@ public function iShouldBeNotifiedThatProvidedPasswordIsDifferentThanTheCurrentOn
{
Assert::true($this->changePasswordPage->checkValidationMessageFor(
'current_password',
- 'This value should be the user\'s current password.'
+ 'This value should be the user\'s current password.',
));
}
@@ -193,7 +202,7 @@ public function iShouldBeNotifiedThatElementIsRequired(string $element): void
{
Assert::true($this->changeProfilePage->checkValidationMessageFor(
$element,
- 'This value should not be blank.'
+ 'This value should not be blank.',
));
}
@@ -204,7 +213,7 @@ public function iShouldBeNotifiedThatElementIsInvalid(string $element): void
{
Assert::true($this->changeProfilePage->checkValidationMessageFor(
$element,
- 'This value is not a valid email address.'
+ 'This value is not a valid email address.',
));
}
@@ -215,7 +224,7 @@ public function iShouldBeNotifiedThatThePasswordDoNotMatch(string $element): voi
{
Assert::true($this->changeProfilePage->checkValidationMessageFor(
$element,
- sprintf('The %s fields must match.', $element)
+ sprintf('The %s fields must match.', $element),
));
}
@@ -226,7 +235,7 @@ public function iShouldBeNotifiedThatTheEmailIsAlreadyUsed(): void
{
Assert::true($this->changeProfilePage->checkValidationMessageFor(
'email',
- 'This email is already used.'
+ 'This email is already used.',
));
}
}
diff --git a/src/CoreShop/Behat/Context/Ui/Frontend/HomepageContext.php b/src/CoreShop/Behat/Context/Ui/Frontend/HomepageContext.php
index 71f931eba0..c856db483d 100644
--- a/src/CoreShop/Behat/Context/Ui/Frontend/HomepageContext.php
+++ b/src/CoreShop/Behat/Context/Ui/Frontend/HomepageContext.php
@@ -1,17 +1,21 @@
getSession(),
null,
$selector,
- $locator
+ $locator,
);
}
diff --git a/src/CoreShop/Behat/Element/Frontend/Account/RegisterElement.php b/src/CoreShop/Behat/Element/Frontend/Account/RegisterElement.php
index 5da079b44f..3f94b6e8e1 100644
--- a/src/CoreShop/Behat/Element/Frontend/Account/RegisterElement.php
+++ b/src/CoreShop/Behat/Element/Frontend/Account/RegisterElement.php
@@ -1,17 +1,21 @@
$unitDefinition->getId(),
'%name%' => $name,
- ]
+ ],
);
}
@@ -82,7 +86,7 @@ public function getItemTotalPriceWithUnit(string $name, ProductUnitDefinitionInt
public function getQuantity(string $productName): int
{
- return (int)$this->getElement('item_quantity_input', ['%name%' => $productName])->getValue();
+ return (int) $this->getElement('item_quantity_input', ['%name%' => $productName])->getValue();
}
public function changeQuantity(string $productName, string $quantity): void
diff --git a/src/CoreShop/Behat/Page/Frontend/CartPageInterface.php b/src/CoreShop/Behat/Page/Frontend/CartPageInterface.php
index 219284ba24..d8f7705b29 100644
--- a/src/CoreShop/Behat/Page/Frontend/CartPageInterface.php
+++ b/src/CoreShop/Behat/Page/Frontend/CartPageInterface.php
@@ -1,17 +1,21 @@
getText();
},
- $this->getElement('latest_products')->findAll('css', '[data-test-product-name]')
+ $this->getElement('latest_products')->findAll('css', '[data-test-product-name]'),
);
}
diff --git a/src/CoreShop/Behat/Page/Frontend/HomePageInterface.php b/src/CoreShop/Behat/Page/Frontend/HomePageInterface.php
index 3d7de1ab50..dfc4a0fc2f 100644
--- a/src/CoreShop/Behat/Page/Frontend/HomePageInterface.php
+++ b/src/CoreShop/Behat/Page/Frontend/HomePageInterface.php
@@ -1,17 +1,21 @@
processQuantityPriceRuleElement(
sprintf(
'[data-test-product-quantity-price-rule-unit-%s]',
- $unit->getId()
- )
+ $unit->getId(),
+ ),
);
}
@@ -119,14 +123,14 @@ public function isAttributeSelected(AttributeInterface $attribute): bool
public function isAttributeDisabled(AttributeInterface $attribute): bool
{
- return $this->getElement('attribute', ['%id%' => $attribute->getId()])->getAttribute('disabled') === "true";
+ return $this->getElement('attribute', ['%id%' => $attribute->getId()])->getAttribute('disabled') === 'true';
}
public function isAttributeEnabled(AttributeInterface $attribute): bool
{
$attr = $this->getElement('attribute', ['%id%' => $attribute->getId()])->getAttribute('disabled');
- return "false" === $attr || null === $attr;
+ return 'false' === $attr || null === $attr;
}
protected function processQuantityPriceRuleElement(string $selector): array
@@ -146,7 +150,7 @@ static function (NodeElement $element) {
'priceExcl' => $priceExcElement->getText(),
];
},
- $element->findAll('css', $selector)
+ $element->findAll('css', $selector),
);
}
diff --git a/src/CoreShop/Behat/Page/Frontend/ProductPageInterface.php b/src/CoreShop/Behat/Page/Frontend/ProductPageInterface.php
index 6790c1c555..8d0702fcce 100644
--- a/src/CoreShop/Behat/Page/Frontend/ProductPageInterface.php
+++ b/src/CoreShop/Behat/Page/Frontend/ProductPageInterface.php
@@ -1,17 +1,21 @@
getSession(),
null,
$selector,
- $locator
+ $locator,
);
}
@@ -67,8 +71,8 @@ public function waitForPimcore($time = 10000, $condition = null): void
sprintf(
'Timeout of %d reached when checking on "%s"',
$time,
- $condition_item
- )
+ $condition_item,
+ ),
);
}
}
diff --git a/src/CoreShop/Behat/Page/Pimcore/AbstractPimcoreTabPage.php b/src/CoreShop/Behat/Page/Pimcore/AbstractPimcoreTabPage.php
index a060c3e846..090a34cf0c 100644
--- a/src/CoreShop/Behat/Page/Pimcore/AbstractPimcoreTabPage.php
+++ b/src/CoreShop/Behat/Page/Pimcore/AbstractPimcoreTabPage.php
@@ -1,17 +1,21 @@
getId(), 'test', ['custom_col' => 'blub']),
diff --git a/src/CoreShop/Behat/Service/Exception/NotificationExpectationMismatchException.php b/src/CoreShop/Behat/Service/Exception/NotificationExpectationMismatchException.php
index aef01c20eb..2d438fab01 100644
--- a/src/CoreShop/Behat/Service/Exception/NotificationExpectationMismatchException.php
+++ b/src/CoreShop/Behat/Service/Exception/NotificationExpectationMismatchException.php
@@ -1,17 +1,21 @@
getClientEmail();
$details['client_id'] = $payment->getClientId();
- $request->setResult((array)$details);
+ $request->setResult((array) $details);
}
public function supports($request): bool
diff --git a/src/CoreShop/Behat/Service/Payum/Concurrency/Action/NotifyAction.php b/src/CoreShop/Behat/Service/Payum/Concurrency/Action/NotifyAction.php
index 7b3f0d77c8..36d3f50561 100644
--- a/src/CoreShop/Behat/Service/Payum/Concurrency/Action/NotifyAction.php
+++ b/src/CoreShop/Behat/Service/Payum/Concurrency/Action/NotifyAction.php
@@ -1,17 +1,21 @@
sessionTokenVariable = sprintf('_security_%s', $firewallContextName);
}
diff --git a/src/CoreShop/Behat/Service/SecurityServiceInterface.php b/src/CoreShop/Behat/Service/SecurityServiceInterface.php
index 13ab250ea7..0f1b76dcf3 100644
--- a/src/CoreShop/Behat/Service/SecurityServiceInterface.php
+++ b/src/CoreShop/Behat/Service/SecurityServiceInterface.php
@@ -1,17 +1,21 @@
cookieSetter->setCookie('_store_id', (string)$store->getId());
+ $this->cookieSetter->setCookie('_store_id', (string) $store->getId());
}
}
diff --git a/src/CoreShop/Behat/Service/StoreContextSetterInterface.php b/src/CoreShop/Behat/Service/StoreContextSetterInterface.php
index b9cb256a4a..2abd5a7124 100644
--- a/src/CoreShop/Behat/Service/StoreContextSetterInterface.php
+++ b/src/CoreShop/Behat/Service/StoreContextSetterInterface.php
@@ -1,17 +1,21 @@
data = [
'country' => null,
diff --git a/src/CoreShop/Bundle/AddressBundle/Controller/CountryController.php b/src/CoreShop/Bundle/AddressBundle/Controller/CountryController.php
index 98c0c67405..a8757d3e6e 100644
--- a/src/CoreShop/Bundle/AddressBundle/Controller/CountryController.php
+++ b/src/CoreShop/Bundle/AddressBundle/Controller/CountryController.php
@@ -1,17 +1,21 @@
scalarNode('address')->defaultValue(AddressInterface::class)->cannotBeEmpty()->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
private function addModelsSection(ArrayNodeDefinition $node): void
@@ -208,7 +213,8 @@ private function addModelsSection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
@@ -239,6 +245,7 @@ private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/AddressBundle/DependencyInjection/CoreShopAddressExtension.php b/src/CoreShop/Bundle/AddressBundle/DependencyInjection/CoreShopAddressExtension.php
index d95bcaf485..352e74cd46 100644
--- a/src/CoreShop/Bundle/AddressBundle/DependencyInjection/CoreShopAddressExtension.php
+++ b/src/CoreShop/Bundle/AddressBundle/DependencyInjection/CoreShopAddressExtension.php
@@ -1,17 +1,21 @@
registerForAutoconfiguration(CountryContextInterface::class)
- ->addTag(CompositeCountryContextPass::COUNTRY_CONTEXT_SERVICE_TAG);
+ ->addTag(CompositeCountryContextPass::COUNTRY_CONTEXT_SERVICE_TAG)
+ ;
$container
->registerForAutoconfiguration(RequestResolverInterface::class)
- ->addTag(CompositeRequestResolverPass::COUNTRY_REQUEST_RESOLVER_SERVICE_TAG);
+ ->addTag(CompositeRequestResolverPass::COUNTRY_REQUEST_RESOLVER_SERVICE_TAG)
+ ;
}
}
diff --git a/src/CoreShop/Bundle/AddressBundle/Doctrine/ORM/AddressIdentifierRepository.php b/src/CoreShop/Bundle/AddressBundle/Doctrine/ORM/AddressIdentifierRepository.php
index 7d67b10841..ded8d9e622 100644
--- a/src/CoreShop/Bundle/AddressBundle/Doctrine/ORM/AddressIdentifierRepository.php
+++ b/src/CoreShop/Bundle/AddressBundle/Doctrine/ORM/AddressIdentifierRepository.php
@@ -1,17 +1,21 @@
andWhere('o.name = :name')
->setParameter('name', $name)
->getQuery()
- ->getOneOrNullResult();
+ ->getOneOrNullResult()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/AddressBundle/Doctrine/ORM/CountryRepository.php b/src/CoreShop/Bundle/AddressBundle/Doctrine/ORM/CountryRepository.php
index 82ac7c846c..700f39383c 100644
--- a/src/CoreShop/Bundle/AddressBundle/Doctrine/ORM/CountryRepository.php
+++ b/src/CoreShop/Bundle/AddressBundle/Doctrine/ORM/CountryRepository.php
@@ -1,17 +1,21 @@
setParameter('name', $name)
->setParameter('locale', $locale)
->getQuery()
- ->getResult();
+ ->getResult()
+ ;
}
public function findByCode(string $code): ?CountryInterface
@@ -44,6 +49,7 @@ public function findByCode(string $code): ?CountryInterface
->andWhere('o.isoCode= :isoCode')
->setParameter('isoCode', $code)
->getQuery()
- ->getOneOrNullResult();
+ ->getOneOrNullResult()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/AddressBundle/Form/Type/AddressIdentifierChoiceType.php b/src/CoreShop/Bundle/AddressBundle/Form/Type/AddressIdentifierChoiceType.php
index 241847e9d2..febaab4513 100644
--- a/src/CoreShop/Bundle/AddressBundle/Form/Type/AddressIdentifierChoiceType.php
+++ b/src/CoreShop/Bundle/AddressBundle/Form/Type/AddressIdentifierChoiceType.php
@@ -1,17 +1,21 @@
'name',
'choice_translation_domain' => false,
'active' => true,
- ]);
+ ])
+ ;
}
public function getParent(): string
diff --git a/src/CoreShop/Bundle/AddressBundle/Form/Type/AddressIdentifierType.php b/src/CoreShop/Bundle/AddressBundle/Form/Type/AddressIdentifierType.php
index 502b43639a..83ad23e5c5 100644
--- a/src/CoreShop/Bundle/AddressBundle/Form/Type/AddressIdentifierType.php
+++ b/src/CoreShop/Bundle/AddressBundle/Form/Type/AddressIdentifierType.php
@@ -1,17 +1,21 @@
add('name', TextType::class)
- ->add('active', CheckboxType::class);
+ ->add('active', CheckboxType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/AddressBundle/Form/Type/AddressType.php b/src/CoreShop/Bundle/AddressBundle/Form/Type/AddressType.php
index 3f1f3e5c98..d310b859e7 100644
--- a/src/CoreShop/Bundle/AddressBundle/Form/Type/AddressType.php
+++ b/src/CoreShop/Bundle/AddressBundle/Form/Type/AddressType.php
@@ -1,17 +1,21 @@
add('_redirect', HiddenType::class, [
'mapped' => false,
- ]);
+ ])
+ ;
if ($options['show_address_identifier_choice'] === true) {
$builder->add('addressIdentifier', AddressIdentifierChoiceType::class, [
diff --git a/src/CoreShop/Bundle/AddressBundle/Form/Type/CountryChoiceType.php b/src/CoreShop/Bundle/AddressBundle/Form/Type/CountryChoiceType.php
index 0c3675e82b..f59599e985 100644
--- a/src/CoreShop/Bundle/AddressBundle/Form/Type/CountryChoiceType.php
+++ b/src/CoreShop/Bundle/AddressBundle/Form/Type/CountryChoiceType.php
@@ -1,17 +1,21 @@
'name',
'choice_translation_domain' => false,
'active' => true,
- ]);
+ ])
+ ;
}
public function getParent(): string
diff --git a/src/CoreShop/Bundle/AddressBundle/Form/Type/CountryTranslationType.php b/src/CoreShop/Bundle/AddressBundle/Form/Type/CountryTranslationType.php
index 36bc1e0e23..a57d9341ab 100644
--- a/src/CoreShop/Bundle/AddressBundle/Form/Type/CountryTranslationType.php
+++ b/src/CoreShop/Bundle/AddressBundle/Form/Type/CountryTranslationType.php
@@ -1,17 +1,21 @@
add('name', TextType::class);
+ ->add('name', TextType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/AddressBundle/Form/Type/CountryType.php b/src/CoreShop/Bundle/AddressBundle/Form/Type/CountryType.php
index 8327beb336..7b80681d41 100644
--- a/src/CoreShop/Bundle/AddressBundle/Form/Type/CountryType.php
+++ b/src/CoreShop/Bundle/AddressBundle/Form/Type/CountryType.php
@@ -1,17 +1,21 @@
TextType::class,
'allow_delete' => true,
'allow_add' => true,
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/AddressBundle/Form/Type/SalutationChoiceType.php b/src/CoreShop/Bundle/AddressBundle/Form/Type/SalutationChoiceType.php
index b89f547a06..72b61461e5 100644
--- a/src/CoreShop/Bundle/AddressBundle/Form/Type/SalutationChoiceType.php
+++ b/src/CoreShop/Bundle/AddressBundle/Form/Type/SalutationChoiceType.php
@@ -1,17 +1,21 @@
'name',
'choice_translation_domain' => false,
'active' => true,
- ]);
+ ])
+ ;
}
public function getParent(): string
diff --git a/src/CoreShop/Bundle/AddressBundle/Form/Type/StateTranslationType.php b/src/CoreShop/Bundle/AddressBundle/Form/Type/StateTranslationType.php
index 2e5692f477..727971a942 100644
--- a/src/CoreShop/Bundle/AddressBundle/Form/Type/StateTranslationType.php
+++ b/src/CoreShop/Bundle/AddressBundle/Form/Type/StateTranslationType.php
@@ -1,17 +1,21 @@
add('name', TextType::class);
+ ->add('name', TextType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/AddressBundle/Form/Type/StateType.php b/src/CoreShop/Bundle/AddressBundle/Form/Type/StateType.php
index c07355ec1c..8730427a5c 100644
--- a/src/CoreShop/Bundle/AddressBundle/Form/Type/StateType.php
+++ b/src/CoreShop/Bundle/AddressBundle/Form/Type/StateType.php
@@ -1,17 +1,21 @@
add('active', CheckboxType::class)
->add('country', CountryChoiceType::class, [
'active' => null,
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/AddressBundle/Form/Type/ZoneChoiceType.php b/src/CoreShop/Bundle/AddressBundle/Form/Type/ZoneChoiceType.php
index 34808ee5a3..55e91c014b 100644
--- a/src/CoreShop/Bundle/AddressBundle/Form/Type/ZoneChoiceType.php
+++ b/src/CoreShop/Bundle/AddressBundle/Form/Type/ZoneChoiceType.php
@@ -1,17 +1,21 @@
'name',
'choice_translation_domain' => false,
'active' => true,
- ]);
+ ])
+ ;
}
public function getParent(): string
diff --git a/src/CoreShop/Bundle/AddressBundle/Form/Type/ZoneType.php b/src/CoreShop/Bundle/AddressBundle/Form/Type/ZoneType.php
index 9716c82513..a41dbdc197 100644
--- a/src/CoreShop/Bundle/AddressBundle/Form/Type/ZoneType.php
+++ b/src/CoreShop/Bundle/AddressBundle/Form/Type/ZoneType.php
@@ -1,17 +1,21 @@
add('name', TextType::class)
- ->add('active', CheckboxType::class);
+ ->add('active', CheckboxType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/AddressBundle/Resources/public/pimcore/css/address.css b/src/CoreShop/Bundle/AddressBundle/Resources/public/pimcore/css/address.css
index cfce11a80b..5397321daf 100644
--- a/src/CoreShop/Bundle/AddressBundle/Resources/public/pimcore/css/address.css
+++ b/src/CoreShop/Bundle/AddressBundle/Resources/public/pimcore/css/address.css
@@ -1,12 +1,15 @@
-/**
- * CoreShop.
+/*
+ * CoreShop
*
- * This source file is subject to the GNU General Public License version 3 (GPLv3)
- * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
- * files that are distributed with this source code.
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
* @license https://www.coreshop.org/license GPLv3 and CCL
+ *
*/
.coreshop_icon_country, .pimcore_icon_coreShopCountryMultiselect, .pimcore_icon_coreShopCountry{
diff --git a/src/CoreShop/Bundle/AddressBundle/Twig/FormatAddressExtension.php b/src/CoreShop/Bundle/AddressBundle/Twig/FormatAddressExtension.php
index 7678d9c492..6fc0f8e1cd 100644
--- a/src/CoreShop/Bundle/AddressBundle/Twig/FormatAddressExtension.php
+++ b/src/CoreShop/Bundle/AddressBundle/Twig/FormatAddressExtension.php
@@ -1,17 +1,21 @@
context->buildViolation($constraint->message)
->setParameter('%address_identifier%', $value)
- ->addViolation();
+ ->addViolation()
+ ;
}
}
}
diff --git a/src/CoreShop/Bundle/ConfigurationBundle/Controller/ConfigurationController.php b/src/CoreShop/Bundle/ConfigurationBundle/Controller/ConfigurationController.php
index d0b5d3def5..92d82d122d 100644
--- a/src/CoreShop/Bundle/ConfigurationBundle/Controller/ConfigurationController.php
+++ b/src/CoreShop/Bundle/ConfigurationBundle/Controller/ConfigurationController.php
@@ -1,17 +1,21 @@
end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/ConfigurationBundle/DependencyInjection/CoreShopConfigurationExtension.php b/src/CoreShop/Bundle/ConfigurationBundle/DependencyInjection/CoreShopConfigurationExtension.php
index c2bfcde555..70fad46f23 100644
--- a/src/CoreShop/Bundle/ConfigurationBundle/DependencyInjection/CoreShopConfigurationExtension.php
+++ b/src/CoreShop/Bundle/ConfigurationBundle/DependencyInjection/CoreShopConfigurationExtension.php
@@ -1,17 +1,21 @@
andWhere('o.key = :key')
->setParameter('key', $key)
->getQuery()
- ->getOneOrNullResult();
+ ->getOneOrNullResult()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/ConfigurationBundle/Form/Type/ConfigurationCollectionType.php b/src/CoreShop/Bundle/ConfigurationBundle/Form/Type/ConfigurationCollectionType.php
index 5d1117f0df..366e573442 100644
--- a/src/CoreShop/Bundle/ConfigurationBundle/Form/Type/ConfigurationCollectionType.php
+++ b/src/CoreShop/Bundle/ConfigurationBundle/Form/Type/ConfigurationCollectionType.php
@@ -1,17 +1,21 @@
ConfigurationType::class,
'allow_add' => true,
'allow_delete' => true,
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/ConfigurationBundle/Form/Type/ConfigurationType.php b/src/CoreShop/Bundle/ConfigurationBundle/Form/Type/ConfigurationType.php
index fd8d4dfa4d..288149f1bd 100644
--- a/src/CoreShop/Bundle/ConfigurationBundle/Form/Type/ConfigurationType.php
+++ b/src/CoreShop/Bundle/ConfigurationBundle/Form/Type/ConfigurationType.php
@@ -1,17 +1,21 @@
add('key', TextType::class)
- ->add('data', TextType::class);
+ ->add('data', TextType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/ConfigurationBundle/Serialization/ObjectHandler.php b/src/CoreShop/Bundle/ConfigurationBundle/Serialization/ObjectHandler.php
index 0450d44484..1bea4d77c9 100644
--- a/src/CoreShop/Bundle/ConfigurationBundle/Serialization/ObjectHandler.php
+++ b/src/CoreShop/Bundle/ConfigurationBundle/Serialization/ObjectHandler.php
@@ -1,17 +1,21 @@
hasItems()
- && ($cart->hasShippableItems() === false || $cart->getShippingAddress() instanceof AddressInterface)
- && $cart->getInvoiceAddress() instanceof AddressInterface;
+ return $cart->hasItems() &&
+ ($cart->hasShippableItems() === false || $cart->getShippingAddress() instanceof AddressInterface) &&
+ $cart->getInvoiceAddress() instanceof AddressInterface;
}
public function commitStep(OrderInterface $cart, Request $request): bool
@@ -62,7 +66,7 @@ public function commitStep(OrderInterface $cart, Request $request): bool
return $isGuest ? $this->guestAddressCheckoutStep->commitStep(
$cart,
- $request
+ $request,
) : $this->customerAddressCheckoutStep->commitStep($cart, $request);
}
@@ -82,7 +86,7 @@ public function prepareStep(OrderInterface $cart, Request $request): array
$isGuest ?
$this->guestAddressCheckoutStep->prepareStep($cart, $request) :
$this->customerAddressCheckoutStep->prepareStep($cart, $request),
- ['is_guest' => $isGuest]
+ ['is_guest' => $isGuest],
);
}
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Checkout/Step/CustomerAddressCheckoutStep.php b/src/CoreShop/Bundle/CoreBundle/Checkout/Step/CustomerAddressCheckoutStep.php
index 6a445df97c..37269ae297 100644
--- a/src/CoreShop/Bundle/CoreBundle/Checkout/Step/CustomerAddressCheckoutStep.php
+++ b/src/CoreShop/Bundle/CoreBundle/Checkout/Step/CustomerAddressCheckoutStep.php
@@ -1,17 +1,21 @@
hasItems()
- && ($cart->hasShippableItems() === false || $cart->getShippingAddress() instanceof AddressInterface)
- && $cart->getInvoiceAddress() instanceof AddressInterface;
+ return $cart->hasItems() &&
+ ($cart->hasShippableItems() === false || $cart->getShippingAddress() instanceof AddressInterface) &&
+ $cart->getInvoiceAddress() instanceof AddressInterface;
}
public function commitStep(OrderInterface $cart, Request $request): bool
diff --git a/src/CoreShop/Bundle/CoreBundle/Checkout/Step/CustomerCheckoutStep.php b/src/CoreShop/Bundle/CoreBundle/Checkout/Step/CustomerCheckoutStep.php
index 372d803ebf..62f2736470 100644
--- a/src/CoreShop/Bundle/CoreBundle/Checkout/Step/CustomerCheckoutStep.php
+++ b/src/CoreShop/Bundle/CoreBundle/Checkout/Step/CustomerCheckoutStep.php
@@ -1,17 +1,21 @@
getData();
if ($form->get('useInvoiceAsShipping')->getData()) {
- $cart->getInvoiceAddress()->setParent(Service::createFolderByPath($cart.'/addresses'));
+ $cart->getInvoiceAddress()->setParent(Service::createFolderByPath($cart . '/addresses'));
$cart->getInvoiceAddress()->setKey(uniqid());
$cart->getInvoiceAddress()->setPublished(true);
$cart->getInvoiceAddress()->save();
@@ -75,7 +81,7 @@ public function commitStep(OrderInterface $cart, Request $request): bool
$cart->setShippingAddress($cart->getInvoiceAddress());
} else {
foreach ([$cart->getInvoiceAddress(), $cart->getShippingAddress()] as $address) {
- $address->setParent(Service::createFolderByPath($cart.'/addresses'));
+ $address->setParent(Service::createFolderByPath($cart . '/addresses'));
$address->setKey(uniqid());
$address->setPublished(true);
$address->save();
diff --git a/src/CoreShop/Bundle/CoreBundle/Checkout/Step/PaymentCheckoutStep.php b/src/CoreShop/Bundle/CoreBundle/Checkout/Step/PaymentCheckoutStep.php
index 03a0d0728c..c6f90e2150 100644
--- a/src/CoreShop/Bundle/CoreBundle/Checkout/Step/PaymentCheckoutStep.php
+++ b/src/CoreShop/Bundle/CoreBundle/Checkout/Step/PaymentCheckoutStep.php
@@ -1,17 +1,21 @@
hasShippableItems() === false
- || ($cart->hasItems() &&
+ return $cart->hasShippableItems() === false ||
+ ($cart->hasItems() &&
$cart->getCarrier() instanceof CarrierInterface &&
$cart->getShippingAddress() instanceof AddressInterface &&
$this->shippableCarrierValidator->isCarrierValid($cart->getCarrier(), $cart, $cart->getShippingAddress()));
diff --git a/src/CoreShop/Bundle/CoreBundle/Checkout/Step/SummaryCheckoutStep.php b/src/CoreShop/Bundle/CoreBundle/Checkout/Step/SummaryCheckoutStep.php
index 47d85142ed..11a256ac5e 100644
--- a/src/CoreShop/Bundle/CoreBundle/Checkout/Step/SummaryCheckoutStep.php
+++ b/src/CoreShop/Bundle/CoreBundle/Checkout/Step/SummaryCheckoutStep.php
@@ -1,17 +1,21 @@
data = [
diff --git a/src/CoreShop/Bundle/CoreBundle/Command/AbstractInstallCommand.php b/src/CoreShop/Bundle/CoreBundle/Command/AbstractInstallCommand.php
index eb07d650e6..2c5c467c07 100644
--- a/src/CoreShop/Bundle/CoreBundle/Command/AbstractInstallCommand.php
+++ b/src/CoreShop/Bundle/CoreBundle/Command/AbstractInstallCommand.php
@@ -1,17 +1,21 @@
setHeaders($headers)
->setRows($rows)
- ->render();
+ ->render()
+ ;
}
protected function createProgressBar(OutputInterface $output, int $length = 10): ProgressBar
diff --git a/src/CoreShop/Bundle/CoreBundle/Command/InstallCommand.php b/src/CoreShop/Bundle/CoreBundle/Command/InstallCommand.php
index 0cf8688a45..33d94c1d5e 100644
--- a/src/CoreShop/Bundle/CoreBundle/Command/InstallCommand.php
+++ b/src/CoreShop/Bundle/CoreBundle/Command/InstallCommand.php
@@ -1,17 +1,21 @@
%command.name% command installs CoreShop.
EOT
- );
+ )
+ ;
}
protected function execute(InputInterface $input, OutputInterface $output): int
@@ -83,10 +86,10 @@ protected function execute(InputInterface $input, OutputInterface $output): int
'Step %d of %d. %s',
$step + 1,
count($this->commands),
- $command['message']
- )
+ $command['message'],
+ ),
);
- $this->commandExecutor->runCommand('coreshop:install:'.$command['command'], [], $output);
+ $this->commandExecutor->runCommand('coreshop:install:' . $command['command'], [], $output);
} catch (RuntimeException) {
$errored = true;
}
@@ -98,8 +101,8 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$outputStyle->success($this->getProperFinalMessage($errored));
$outputStyle->writeln(
sprintf(
- 'You can now open your store at the following path under the website root: /'
- )
+ 'You can now open your store at the following path under the website root: /',
+ ),
);
return 0;
diff --git a/src/CoreShop/Bundle/CoreBundle/Command/InstallDatabaseCommand.php b/src/CoreShop/Bundle/CoreBundle/Command/InstallDatabaseCommand.php
index 08bc4fd013..936e56ff81 100644
--- a/src/CoreShop/Bundle/CoreBundle/Command/InstallDatabaseCommand.php
+++ b/src/CoreShop/Bundle/CoreBundle/Command/InstallDatabaseCommand.php
@@ -1,17 +1,21 @@
%command.name% command creates CoreShop database.
EOT
- );
+ )
+ ;
}
protected function execute(InputInterface $input, OutputInterface $output): int
@@ -48,7 +53,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$outputStyle = new SymfonyStyle($input, $output);
$outputStyle->writeln(sprintf(
'Creating CoreShop database for environment %s.',
- $this->getEnvironment()
+ $this->getEnvironment(),
));
$commands = $this->databaseSetupCommand->getCommands($input, $output, $this->getHelper('question'));
diff --git a/src/CoreShop/Bundle/CoreBundle/Command/InstallDemoCommand.php b/src/CoreShop/Bundle/CoreBundle/Command/InstallDemoCommand.php
index 8ece88f9a8..54e08d242a 100644
--- a/src/CoreShop/Bundle/CoreBundle/Command/InstallDemoCommand.php
+++ b/src/CoreShop/Bundle/CoreBundle/Command/InstallDemoCommand.php
@@ -1,17 +1,21 @@
%command.name% command install CoreShop Demo Data.
EOT
- );
+ )
+ ;
}
protected function execute(InputInterface $input, OutputInterface $output): int
diff --git a/src/CoreShop/Bundle/CoreBundle/Command/InstallFixturesCommand.php b/src/CoreShop/Bundle/CoreBundle/Command/InstallFixturesCommand.php
index d86c88aca4..dccf81e769 100644
--- a/src/CoreShop/Bundle/CoreBundle/Command/InstallFixturesCommand.php
+++ b/src/CoreShop/Bundle/CoreBundle/Command/InstallFixturesCommand.php
@@ -1,17 +1,21 @@
%command.name% command install CoreShop Main Fixtures.
EOT
- );
+ )
+ ;
}
protected function execute(InputInterface $input, OutputInterface $output): int
diff --git a/src/CoreShop/Bundle/CoreBundle/Command/InstallFoldersCommand.php b/src/CoreShop/Bundle/CoreBundle/Command/InstallFoldersCommand.php
index b7a2fab38f..80121c84f5 100644
--- a/src/CoreShop/Bundle/CoreBundle/Command/InstallFoldersCommand.php
+++ b/src/CoreShop/Bundle/CoreBundle/Command/InstallFoldersCommand.php
@@ -1,17 +1,21 @@
%command.name% command creates CoreShop Object Folders.
EOT
- );
+ )
+ ;
}
protected function execute(InputInterface $input, OutputInterface $output): int
@@ -48,7 +53,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$outputStyle = new SymfonyStyle($input, $output);
$outputStyle->writeln(sprintf(
'Creating CoreShop Folders %s.',
- $this->getEnvironment()
+ $this->getEnvironment(),
));
$this->folderInstaller->installFolders();
diff --git a/src/CoreShop/Bundle/CoreBundle/Command/InstallResourcesCommand.php b/src/CoreShop/Bundle/CoreBundle/Command/InstallResourcesCommand.php
index 97682938fe..a68cedb396 100644
--- a/src/CoreShop/Bundle/CoreBundle/Command/InstallResourcesCommand.php
+++ b/src/CoreShop/Bundle/CoreBundle/Command/InstallResourcesCommand.php
@@ -1,17 +1,21 @@
%command.name% command creates CoreShop Resources.
EOT
- );
+ )
+ ;
}
protected function execute(InputInterface $input, OutputInterface $output): int
diff --git a/src/CoreShop/Bundle/CoreBundle/Command/MigrateCommand.php b/src/CoreShop/Bundle/CoreBundle/Command/MigrateCommand.php
index e8b4bc37cc..b502f1834a 100644
--- a/src/CoreShop/Bundle/CoreBundle/Command/MigrateCommand.php
+++ b/src/CoreShop/Bundle/CoreBundle/Command/MigrateCommand.php
@@ -1,17 +1,21 @@
%command.name% executes all CoreShop migrations.
EOT
- );
+ )
+ ;
}
protected function execute(InputInterface $input, OutputInterface $output): int
diff --git a/src/CoreShop/Bundle/CoreBundle/Command/MigrationGenerateCommand.php b/src/CoreShop/Bundle/CoreBundle/Command/MigrationGenerateCommand.php
index e526fe15db..da367921e1 100644
--- a/src/CoreShop/Bundle/CoreBundle/Command/MigrationGenerateCommand.php
+++ b/src/CoreShop/Bundle/CoreBundle/Command/MigrationGenerateCommand.php
@@ -1,17 +1,21 @@
getCompanyRepository()->getList();
- $list->addConditionParam(sprintf('name LIKE "%%%s%%"', (string)$value));
+ $list->addConditionParam(sprintf('name LIKE "%%%s%%"', (string) $value));
$foundObjects = $list->getData();
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Controller/OrderController.php b/src/CoreShop/Bundle/CoreBundle/Controller/OrderController.php
index d4b327da83..8f7c20b943 100644
--- a/src/CoreShop/Bundle/CoreBundle/Controller/OrderController.php
+++ b/src/CoreShop/Bundle/CoreBundle/Controller/OrderController.php
@@ -1,17 +1,21 @@
getShippingAddress(),
true,
- $this->get(CartContextResolverInterface::class)->resolveCartContext($cart)
+ $this->get(CartContextResolverInterface::class)->resolveCartContext($cart),
);
$result[] = [
diff --git a/src/CoreShop/Bundle/CoreBundle/Controller/PortletsController.php b/src/CoreShop/Bundle/CoreBundle/Controller/PortletsController.php
index 91c195679f..6f8121edd9 100644
--- a/src/CoreShop/Bundle/CoreBundle/Controller/PortletsController.php
+++ b/src/CoreShop/Bundle/CoreBundle/Controller/PortletsController.php
@@ -1,17 +1,21 @@
headers->makeDisposition(
ResponseHeaderBag::DISPOSITION_ATTACHMENT,
- sprintf('%s.csv', $portletName)
+ sprintf('%s.csv', $portletName),
);
$response->headers->set('Content-Disposition', $disposition);
diff --git a/src/CoreShop/Bundle/CoreBundle/Controller/ProductController.php b/src/CoreShop/Bundle/CoreBundle/Controller/ProductController.php
index ae1ee054d4..120a468817 100644
--- a/src/CoreShop/Bundle/CoreBundle/Controller/ProductController.php
+++ b/src/CoreShop/Bundle/CoreBundle/Controller/ProductController.php
@@ -1,17 +1,21 @@
getUnitDefinition()->getId()) {
+ if ((int) $unitDefinitionId === $range->getUnitDefinition()->getId()) {
$status = 'locked';
break 2;
diff --git a/src/CoreShop/Bundle/CoreBundle/Controller/ProductVariantUnitSolidifierController.php b/src/CoreShop/Bundle/CoreBundle/Controller/ProductVariantUnitSolidifierController.php
index 38b0047f03..4e06871117 100644
--- a/src/CoreShop/Bundle/CoreBundle/Controller/ProductVariantUnitSolidifierController.php
+++ b/src/CoreShop/Bundle/CoreBundle/Controller/ProductVariantUnitSolidifierController.php
@@ -1,17 +1,21 @@
getId(),
$variant->getId(),
- $e->getMessage()
+ $e->getMessage(),
);
break;
@@ -117,7 +121,7 @@ public function applyAction(Request $request, int $objectId): Response
'error while cloning quantity price rules from product %d to variant %d. Error was: %s',
$object->getId(),
$variant->getId(),
- $e->getMessage()
+ $e->getMessage(),
);
break;
diff --git a/src/CoreShop/Bundle/CoreBundle/Controller/ReportsController.php b/src/CoreShop/Bundle/CoreBundle/Controller/ReportsController.php
index 680db2e459..a2a85e80b8 100644
--- a/src/CoreShop/Bundle/CoreBundle/Controller/ReportsController.php
+++ b/src/CoreShop/Bundle/CoreBundle/Controller/ReportsController.php
@@ -1,17 +1,21 @@
headers->makeDisposition(
ResponseHeaderBag::DISPOSITION_ATTACHMENT,
- sprintf('%s.csv', $reportType)
+ sprintf('%s.csv', $reportType),
);
$response->headers->set('Content-Disposition', $disposition);
diff --git a/src/CoreShop/Bundle/CoreBundle/Controller/SettingsController.php b/src/CoreShop/Bundle/CoreBundle/Controller/SettingsController.php
index f66b3bbdd0..d8b198795d 100644
--- a/src/CoreShop/Bundle/CoreBundle/Controller/SettingsController.php
+++ b/src/CoreShop/Bundle/CoreBundle/Controller/SettingsController.php
@@ -1,17 +1,21 @@
getName()) . ' - ' . str_replace(
['/**', '*/', '//'],
'',
- $this->getTitle()
+ $this->getTitle(),
) . "\n";
$code .= '*' . "\n";
$code .= '* @param \CoreShop\Component\Store\Model\StoreInterface $store' . "\n";
@@ -191,7 +195,7 @@ public function getGetterCode($class)
$code .= '* Get All ' . str_replace(['/**', '*/', '//'], '', $this->getName()) . ' - ' . str_replace(
['/**', '*/', '//'],
'',
- $this->getTitle()
+ $this->getTitle(),
) . "\n";
$code .= '* @return \CoreShop\Component\Core\Model\ProductStoreValuesInterface[]' . "\n";
$code .= '*/' . "\n";
@@ -206,7 +210,7 @@ public function getGetterCode($class)
$code .= '* Get ' . str_replace(['/**', '*/', '//'], '', $this->getName()) . ' - ' . str_replace(
['/**', '*/', '//'],
'',
- $this->getTitle()
+ $this->getTitle(),
) . "\n";
$code .= '*' . "\n";
$code .= '* @param string $type' . "\n";
@@ -236,7 +240,7 @@ public function getSetterCode($class)
$code .= '* Set ' . str_replace(['/**', '*/', '//'], '', $key) . ' - ' . str_replace(
['/**', '*/', '//'],
'',
- $this->getTitle()
+ $this->getTitle(),
) . "\n";
$code .= '*' . "\n";
$code .= '* @param \CoreShop\Component\Core\Model\ProductStoreValuesInterface $storeValues' . "\n";
@@ -254,7 +258,7 @@ public function getSetterCode($class)
$code .= '* Set All ' . str_replace(['/**', '*/', '//'], '', $key) . ' - ' . str_replace(
['/**', '*/', '//'],
'',
- $this->getTitle()
+ $this->getTitle(),
) . "\n";
$code .= '*' . "\n";
$code .= '* @param \CoreShop\Component\Core\Model\ProductStoreValuesInterface[] $storeValues' . "\n";
@@ -271,7 +275,7 @@ public function getSetterCode($class)
$code .= '* Set ' . str_replace(['/**', '*/', '//'], '', $key) . ' - ' . str_replace(
['/**', '*/', '//'],
'',
- $this->getTitle()
+ $this->getTitle(),
) . "\n";
$code .= '*' . "\n";
$code .= '* @param string $type' . "\n";
@@ -439,7 +443,7 @@ public function save($object, $params = [])
if ($productStoreValue->getId()) {
$this->getEntityManager()->getUnitOfWork()->computeChangeSet(
$this->getEntityManager()->getClassMetadata($this->getProductStoreValuesRepository()->getClassName()),
- $productStoreValue
+ $productStoreValue,
);
$changeSet = $this->getEntityManager()->getUnitOfWork()->getEntityChangeSet($productStoreValue);
@@ -697,7 +701,7 @@ public function getVersionPreview($data, $object = null, $params = [])
$preview = [];
foreach ($data as $element) {
- $preview[] = (string)$element;
+ $preview[] = (string) $element;
}
return implode(', ', $preview);
@@ -726,7 +730,7 @@ public function getFromCsvImport($importValue, $object = null, $params = [])
throw new \InvalidArgumentException(sprintf(
'Error decoding Store Price JSON `%s`: %s',
$importValue,
- json_last_error_msg()
+ json_last_error_msg(),
));
}
@@ -795,7 +799,7 @@ public function isEmpty($data)
protected function clearRemovedUnitDefinitions(
ProductStoreValuesInterface $storeValuesEntity,
Model\DataObject\Concrete $object,
- array $serialized
+ array $serialized,
) {
$unitDefinitions = $object->getObjectVar('unitDefinitions');
@@ -857,11 +861,11 @@ protected function clearRemovedUnitDefinitions(
*/
protected function toNumeric($value): float|int
{
- if (!str_contains((string)$value, '.')) {
- return (int)$value;
+ if (!str_contains((string) $value, '.')) {
+ return (int) $value;
}
- return (float)$value;
+ return (float) $value;
}
/**
@@ -873,7 +877,7 @@ protected function expandDotNotationKeys(array $array)
while (count($array)) {
$value = reset($array);
- $key = (string)key($array);
+ $key = (string) key($array);
unset($array[$key]);
if (str_contains($key, '.')) {
diff --git a/src/CoreShop/Bundle/CoreBundle/CoreShopCoreBundle.php b/src/CoreShop/Bundle/CoreBundle/CoreShopCoreBundle.php
index 46c4707c92..2bb9474967 100644
--- a/src/CoreShop/Bundle/CoreBundle/CoreShopCoreBundle.php
+++ b/src/CoreShop/Bundle/CoreBundle/CoreShopCoreBundle.php
@@ -1,17 +1,21 @@
folderCreationService->createFolderForResource($customer, [
'path' => ($userBackup ? 'customer' : 'guest'),
'suffix' => mb_strtoupper(mb_substr($customer->getLastname(), 0, 1)),
- ])
+ ]),
);
/** @psalm-suppress InternalMethod */
$customer->setKey(File::getValidFilename($customer->getEmail()));
@@ -72,7 +79,7 @@ public function persistCustomer(CustomerInterface $customer): void
$address->setParent(
$this->folderCreationService->createFolderForResource($address, [
'prefix' => $customer->getFullPath(),
- ])
+ ]),
);
$address->save();
}
@@ -87,7 +94,7 @@ public function persistCustomer(CustomerInterface $customer): void
$userBackup->setParent(
$this->folderCreationService->createFolderForResource($userBackup, [
'prefix' => $customer->getFullPath(),
- ])
+ ]),
);
/** @psalm-suppress InternalMethod */
$userBackup->setKey(File::getValidFilename($customer->getEmail()));
diff --git a/src/CoreShop/Bundle/CoreBundle/Customer/CustomerManagerInterface.php b/src/CoreShop/Bundle/CoreBundle/Customer/CustomerManagerInterface.php
index ee0d810632..edd43b1674 100644
--- a/src/CoreShop/Bundle/CoreBundle/Customer/CustomerManagerInterface.php
+++ b/src/CoreShop/Bundle/CoreBundle/Customer/CustomerManagerInterface.php
@@ -1,17 +1,21 @@
scalarNode('send_usage_log')->defaultValue(true)->end()
->scalarNode('checkout_manager_factory')->cannotBeEmpty()->end()
->scalarNode('after_logout_redirect_route')->defaultValue('coreshop_index')->cannotBeEmpty()->end()
- ->end();
+ ->end()
+ ;
$this->addModelsSection($rootNode);
$this->addPimcoreResourcesSection($rootNode);
$this->addCheckoutConfigurationSection($rootNode);
@@ -67,7 +72,8 @@ private function addModelsSection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
@@ -101,7 +107,8 @@ private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
private function addCheckoutConfigurationSection(ArrayNodeDefinition $node): void
@@ -142,6 +149,7 @@ private function addCheckoutConfigurationSection(ArrayNodeDefinition $node): voi
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/CoreBundle/DependencyInjection/CoreShopCoreExtension.php b/src/CoreShop/Bundle/CoreBundle/DependencyInjection/CoreShopCoreExtension.php
index 5935e32dac..034bc01fe1 100644
--- a/src/CoreShop/Bundle/CoreBundle/DependencyInjection/CoreShopCoreExtension.php
+++ b/src/CoreShop/Bundle/CoreBundle/DependencyInjection/CoreShopCoreExtension.php
@@ -1,17 +1,21 @@
load('services.yml');
- $env = (string)$container->getParameter('kernel.environment');
+ $env = (string) $container->getParameter('kernel.environment');
if (str_contains($env, 'test')) {
$loader->load('services_test.yml');
}
@@ -94,10 +98,12 @@ public function load(array $configs, ContainerBuilder $container): void
$container
->registerForAutoconfiguration(PortletInterface::class)
- ->addTag(RegisterPortletsPass::PORTLET_TAG);
+ ->addTag(RegisterPortletsPass::PORTLET_TAG)
+ ;
$container
->registerForAutoconfiguration(ReportInterface::class)
- ->addTag(RegisterReportsPass::REPORT_TAG);
+ ->addTag(RegisterReportsPass::REPORT_TAG)
+ ;
}
public function prepend(ContainerBuilder $container): void
diff --git a/src/CoreShop/Bundle/CoreBundle/Doctrine/ORM/CarrierRepository.php b/src/CoreShop/Bundle/CoreBundle/Doctrine/ORM/CarrierRepository.php
index af90da1c9e..7e9eb430b3 100644
--- a/src/CoreShop/Bundle/CoreBundle/Doctrine/ORM/CarrierRepository.php
+++ b/src/CoreShop/Bundle/CoreBundle/Doctrine/ORM/CarrierRepository.php
@@ -1,17 +1,21 @@
andWhere('o.hideFromCheckout = 0')
->setParameter('store', [$store])
->getQuery()
- ->getResult();
+ ->getResult()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Doctrine/ORM/ConfigurationRepository.php b/src/CoreShop/Bundle/CoreBundle/Doctrine/ORM/ConfigurationRepository.php
index d7b3df225d..082d5d347d 100644
--- a/src/CoreShop/Bundle/CoreBundle/Doctrine/ORM/ConfigurationRepository.php
+++ b/src/CoreShop/Bundle/CoreBundle/Doctrine/ORM/ConfigurationRepository.php
@@ -1,17 +1,21 @@
setParameter('configKey', $key)
->setParameter('store', $store)
->getQuery()
- ->getOneOrNullResult();
+ ->getOneOrNullResult()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Doctrine/ORM/CountryRepository.php b/src/CoreShop/Bundle/CoreBundle/Doctrine/ORM/CountryRepository.php
index 897a3cd179..29d8aca912 100644
--- a/src/CoreShop/Bundle/CoreBundle/Doctrine/ORM/CountryRepository.php
+++ b/src/CoreShop/Bundle/CoreBundle/Doctrine/ORM/CountryRepository.php
@@ -1,17 +1,21 @@
andWhere('o.id = :storeId')
->setParameter('storeId', $store->getId())
->getQuery()
- ->getResult();
+ ->getResult()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Doctrine/ORM/CurrencyRepository.php b/src/CoreShop/Bundle/CoreBundle/Doctrine/ORM/CurrencyRepository.php
index a4a774b6f3..a0439dfefe 100644
--- a/src/CoreShop/Bundle/CoreBundle/Doctrine/ORM/CurrencyRepository.php
+++ b/src/CoreShop/Bundle/CoreBundle/Doctrine/ORM/CurrencyRepository.php
@@ -1,17 +1,21 @@
setParameter('storeId', $store->getId())
->distinct()
->getQuery()
- ->getResult();
+ ->getResult()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Doctrine/ORM/PaymentProviderRepository.php b/src/CoreShop/Bundle/CoreBundle/Doctrine/ORM/PaymentProviderRepository.php
index d1359882c2..20bea7be7d 100644
--- a/src/CoreShop/Bundle/CoreBundle/Doctrine/ORM/PaymentProviderRepository.php
+++ b/src/CoreShop/Bundle/CoreBundle/Doctrine/ORM/PaymentProviderRepository.php
@@ -1,17 +1,21 @@
addOrderBy('o.position')
->setParameter('storeId', $store->getId())
->getQuery()
- ->getResult();
+ ->getResult()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Doctrine/ORM/ProductStoreValuesRepository.php b/src/CoreShop/Bundle/CoreBundle/Doctrine/ORM/ProductStoreValuesRepository.php
index 976b601be7..7d88ec9a0e 100644
--- a/src/CoreShop/Bundle/CoreBundle/Doctrine/ORM/ProductStoreValuesRepository.php
+++ b/src/CoreShop/Bundle/CoreBundle/Doctrine/ORM/ProductStoreValuesRepository.php
@@ -1,17 +1,21 @@
andWhere('o.product = :product')
->setParameter('product', $product->getId())
->getQuery()
- ->getResult();
+ ->getResult()
+ ;
}
public function findForProductAndStore(ProductInterface $product, StoreInterface $store): ?ProductStoreValuesInterface
@@ -39,6 +44,7 @@ public function findForProductAndStore(ProductInterface $product, StoreInterface
->setParameter('product', $product->getId())
->setParameter('store', $store)
->getQuery()
- ->getOneOrNullResult();
+ ->getOneOrNullResult()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Doctrine/ORM/TaxRuleRepository.php b/src/CoreShop/Bundle/CoreBundle/Doctrine/ORM/TaxRuleRepository.php
index c3b151bc97..b01752083f 100644
--- a/src/CoreShop/Bundle/CoreBundle/Doctrine/ORM/TaxRuleRepository.php
+++ b/src/CoreShop/Bundle/CoreBundle/Doctrine/ORM/TaxRuleRepository.php
@@ -1,17 +1,21 @@
createQueryBuilder('o')
->andWhere('o.taxRuleGroup = :taxRuleGroup')
@@ -35,6 +39,7 @@ public function findForCountryAndState(
->setParameter('country', $country ? $country->getId() : 0)
->setParameter('state', $state ? $state->getId() : 0)
->getQuery()
- ->getResult();
+ ->getResult()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Event/CustomerRegistrationEvent.php b/src/CoreShop/Bundle/CoreBundle/Event/CustomerRegistrationEvent.php
index f3bea3a3d8..74a503d67d 100644
--- a/src/CoreShop/Bundle/CoreBundle/Event/CustomerRegistrationEvent.php
+++ b/src/CoreShop/Bundle/CoreBundle/Event/CustomerRegistrationEvent.php
@@ -1,17 +1,21 @@
customer = $customer;
diff --git a/src/CoreShop/Bundle/CoreBundle/Event/RequestNewsletterConfirmationEvent.php b/src/CoreShop/Bundle/CoreBundle/Event/RequestNewsletterConfirmationEvent.php
index 71123fe1d3..e82ff42f9c 100644
--- a/src/CoreShop/Bundle/CoreBundle/Event/RequestNewsletterConfirmationEvent.php
+++ b/src/CoreShop/Bundle/CoreBundle/Event/RequestNewsletterConfirmationEvent.php
@@ -1,17 +1,21 @@
router->generate(
'coreshop_customer_confirm_newsletter',
['_locale' => $this->requestStack->getMainRequest()->getLocale()],
- UrlGeneratorInterface::ABSOLUTE_URL
- )
+ UrlGeneratorInterface::ABSOLUTE_URL,
+ ),
);
$this->eventDispatcher->dispatch($confirmEvent, 'coreshop.customer.request_newsletter_confirm');
}
diff --git a/src/CoreShop/Bundle/CoreBundle/EventListener/CustomerOrderDeletionListener.php b/src/CoreShop/Bundle/CoreBundle/EventListener/CustomerOrderDeletionListener.php
index ec91212f4c..085da1bf21 100644
--- a/src/CoreShop/Bundle/CoreBundle/EventListener/CustomerOrderDeletionListener.php
+++ b/src/CoreShop/Bundle/CoreBundle/EventListener/CustomerOrderDeletionListener.php
@@ -1,17 +1,21 @@
UserTypeChecker::TYPE_PASSWORD_RESET,
'resetLink' => $event->getResetLink(),
- ]
+ ],
);
$this->rulesProcessor->applyRules('user', $user->getCustomer(), $params);
@@ -66,7 +70,7 @@ public function applyRegisterCustomerRule(GenericEvent $event): void
$params,
[
'type' => UserTypeChecker::TYPE_REGISTER,
- ]
+ ],
);
$this->rulesProcessor->applyRules('user', $customer, $params);
@@ -91,7 +95,7 @@ public function applyNewsletterConfirmRequestRule(RequestNewsletterConfirmationE
function () use ($customer) {
$customer->save();
},
- false
+ false,
);
$confirmLink = $event->getConfirmLink();
@@ -104,7 +108,7 @@ function () use ($customer) {
'type' => UserTypeChecker::TYPE_NEWSLETTER_DOUBLE_OPT_IN,
'confirmLink' => $confirmLink,
'token' => $customer->getNewsletterToken(),
- ]
+ ],
);
$this->rulesProcessor->applyRules('user', $customer, $params);
@@ -129,7 +133,7 @@ public function applyNewsletterConfirmed(GenericEvent $event): void
$params,
[
'type' => UserTypeChecker::TYPE_NEWSLETTER_CONFIRMED,
- ]
+ ],
);
$this->rulesProcessor->applyRules('user', $customer, $params);
diff --git a/src/CoreShop/Bundle/CoreBundle/EventListener/NotificationRules/OrderCommentsListener.php b/src/CoreShop/Bundle/CoreBundle/EventListener/NotificationRules/OrderCommentsListener.php
index 863991a34b..7fe68a5260 100644
--- a/src/CoreShop/Bundle/CoreBundle/EventListener/NotificationRules/OrderCommentsListener.php
+++ b/src/CoreShop/Bundle/CoreBundle/EventListener/NotificationRules/OrderCommentsListener.php
@@ -1,17 +1,21 @@
', $recipient->getName(), $recipient->getAddress());
}
}
-
+
$noteInstance->addData('recipient', 'text', (empty($mailTos) ? '--' : implode(', ', $mailTos)));
unset($params['recipient']);
diff --git a/src/CoreShop/Bundle/CoreBundle/EventListener/PriceRuleUpdateEventListener.php b/src/CoreShop/Bundle/CoreBundle/EventListener/PriceRuleUpdateEventListener.php
index df8daf20ea..ab69fc4527 100644
--- a/src/CoreShop/Bundle/CoreBundle/EventListener/PriceRuleUpdateEventListener.php
+++ b/src/CoreShop/Bundle/CoreBundle/EventListener/PriceRuleUpdateEventListener.php
@@ -1,17 +1,21 @@
setNeedsRecalculation(true);
$cart->save();
},
- false
+ false,
);
}
}
diff --git a/src/CoreShop/Bundle/CoreBundle/EventListener/ProductStoreValuesAdminGetListener.php b/src/CoreShop/Bundle/CoreBundle/EventListener/ProductStoreValuesAdminGetListener.php
index 67a58678ce..4c0e501f1e 100644
--- a/src/CoreShop/Bundle/CoreBundle/EventListener/ProductStoreValuesAdminGetListener.php
+++ b/src/CoreShop/Bundle/CoreBundle/EventListener/ProductStoreValuesAdminGetListener.php
@@ -1,17 +1,21 @@
storeContext->getStore();
if ($store instanceof StoreInterface) {
-
$request->getSession()->remove('coreshop.cart.' . $store->getId());
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Fixtures/Data/Application/AddressIdentifierFixture.php b/src/CoreShop/Bundle/CoreBundle/Fixtures/Data/Application/AddressIdentifierFixture.php
index 527e2f21df..62c535f178 100644
--- a/src/CoreShop/Bundle/CoreBundle/Fixtures/Data/Application/AddressIdentifierFixture.php
+++ b/src/CoreShop/Bundle/CoreBundle/Fixtures/Data/Application/AddressIdentifierFixture.php
@@ -1,17 +1,21 @@
getName(), 'asset')
+ Service::getValidKey($usedCategory->getName(), 'asset'),
));
$images = [];
@@ -588,8 +592,8 @@ protected function createProduct(string $parentPath): ProductInterface
$imagePath = $kernel->locateResource(
sprintf(
'@CoreShopCoreBundle/Resources/fixtures/image%s.jpeg',
- random_int(1, 3)
- )
+ random_int(1, 3),
+ ),
);
$fileName = sprintf('image_%s.jpg', uniqid());
@@ -629,7 +633,7 @@ protected function createProduct(string $parentPath): ProductInterface
// $product->setWholesalePrice((int)($faker->randomFloat(2, 100, 200) * $decimalFactor));
foreach ($stores as $store) {
- $product->setStoreValuesOfType('price', (int)($faker->randomFloat(2, 200, 400) * $decimalFactor), $store);
+ $product->setStoreValuesOfType('price', (int) ($faker->randomFloat(2, 200, 400) * $decimalFactor), $store);
}
$product->setTaxRule($this->getReference('taxRule'));
@@ -642,7 +646,7 @@ protected function createProduct(string $parentPath): ProductInterface
$product->setParent($this->container->get(ObjectServiceInterface::class)->createFolderByPath(sprintf(
'/demo/%s/%s',
$parentPath,
- Service::getValidKey($usedCategory->getName(), 'object')
+ Service::getValidKey($usedCategory->getName(), 'object'),
)));
$product->setPublished(true);
$product->setKey($product->getName());
diff --git a/src/CoreShop/Bundle/CoreBundle/Fixtures/Data/Demo/AttributeGroupsFixture.php b/src/CoreShop/Bundle/CoreBundle/Fixtures/Data/Demo/AttributeGroupsFixture.php
index f94e5494a7..7d183f7fa8 100644
--- a/src/CoreShop/Bundle/CoreBundle/Fixtures/Data/Demo/AttributeGroupsFixture.php
+++ b/src/CoreShop/Bundle/CoreBundle/Fixtures/Data/Demo/AttributeGroupsFixture.php
@@ -1,17 +1,21 @@
container->get('coreshop.repository.attribute_group')->findAll())) {
$data = [
'color' => [
- 'red', 'blue', 'black'
+ 'red', 'blue', 'black',
],
'size' => [
- 's', 'm', 'l', 'xl'
+ 's', 'm', 'l', 'xl',
],
'season' => [
- 'winter', 'summer'
- ]
+ 'winter', 'summer',
+ ],
];
$colorMap = [
@@ -95,13 +99,12 @@ public function load(ObjectManager $manager): void
$attribute->setKey($attributeKey);
$attribute->setPublished(true);
$attribute->setAttributeGroup($attributeGroup);
- $attribute->setSorting(($index+1)*10);
+ $attribute->setSorting(($index + 1) * 10);
foreach (Tool::getValidLanguages() as $language) {
if ($key === 'size') {
$attribute->setName(strtoupper($attributeKey), $language);
- }
- else {
+ } else {
$attribute->setName(ucfirst($attributeKey), $language);
}
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Fixtures/Data/Demo/CarrierFixture.php b/src/CoreShop/Bundle/CoreBundle/Fixtures/Data/Demo/CarrierFixture.php
index e175a099a3..9a591cd550 100644
--- a/src/CoreShop/Bundle/CoreBundle/Fixtures/Data/Demo/CarrierFixture.php
+++ b/src/CoreShop/Bundle/CoreBundle/Fixtures/Data/Demo/CarrierFixture.php
@@ -1,17 +1,21 @@
's'
+ 'size' => 's',
],
[
- 'size' => 'm'
+ 'size' => 'm',
],
[
- 'size' => 'l'
+ 'size' => 'l',
],
[
- 'size' => 'xl'
+ 'size' => 'xl',
],
],
[
[
'color' => 'red',
- 'size' => 's'
+ 'size' => 's',
],
[
'color' => 'red',
- 'size' => 'm'
+ 'size' => 'm',
],
[
'color' => 'red',
- 'size' => 'l'
+ 'size' => 'l',
],
[
'color' => 'red',
- 'size' => 'xl'
+ 'size' => 'xl',
],
[
'color' => 'black',
- 'size' => 's'
+ 'size' => 's',
],
[
'color' => 'black',
- 'size' => 'm'
+ 'size' => 'm',
],
[
'color' => 'black',
- 'size' => 'l'
+ 'size' => 'l',
],
[
'color' => 'black',
- 'size' => 'xl'
+ 'size' => 'xl',
],
[
'color' => 'blue',
- 'size' => 's'
+ 'size' => 's',
],
[
'color' => 'blue',
- 'size' => 'm'
+ 'size' => 'm',
],
[
'color' => 'blue',
- 'size' => 'l'
+ 'size' => 'l',
],
[
'color' => 'blue',
- 'size' => 'xl'
+ 'size' => 'xl',
],
],
[
@@ -230,7 +227,7 @@ public function load(ObjectManager $manager): void
'size' => 'xl',
'season' => 'summer',
],
- ]
+ ],
];
for ($i = 0; $i < $productsCount; ++$i) {
@@ -248,17 +245,17 @@ public function load(ObjectManager $manager): void
$product->setAllowedAttributeGroups($allowedAttributeGroups);
$product->save();
- for ($x = 0; $x < $variants; $x++) {
+ for ($x = 0; $x < $variants; ++$x) {
if (count($variantType) === 0) {
break;
}
-
+
$variantAttributesKey = array_rand($variantType);
$variantAttributes = $variantType[$variantAttributesKey];
unset($variantType[$variantAttributesKey]);
- $attributes = array_map(function($key, $value) {
+ $attributes = array_map(function ($key, $value) {
if ($key === 'color') {
return $this->container->get('coreshop.repository.attribute_color')->findOneBy(['name' => $value]);
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Fixtures/Data/Demo/ProductWithUnitFixture.php b/src/CoreShop/Bundle/CoreBundle/Fixtures/Data/Demo/ProductWithUnitFixture.php
index c368650b53..b6232ff371 100644
--- a/src/CoreShop/Bundle/CoreBundle/Fixtures/Data/Demo/ProductWithUnitFixture.php
+++ b/src/CoreShop/Bundle/CoreBundle/Fixtures/Data/Demo/ProductWithUnitFixture.php
@@ -1,17 +1,21 @@
setStore($store);
}
- $storeValues->setPrice((int)$faker->randomFloat(2, 200, 400) * $decimalFactor);
+ $storeValues->setPrice((int) $faker->randomFloat(2, 200, 400) * $decimalFactor);
/**
* @var ProductUnitDefinitionPriceInterface $cartonPrice
diff --git a/src/CoreShop/Bundle/CoreBundle/Fixtures/Data/Demo/ShippingRuleFixture.php b/src/CoreShop/Bundle/CoreBundle/Fixtures/Data/Demo/ShippingRuleFixture.php
index 9dd3138be5..d816921678 100644
--- a/src/CoreShop/Bundle/CoreBundle/Fixtures/Data/Demo/ShippingRuleFixture.php
+++ b/src/CoreShop/Bundle/CoreBundle/Fixtures/Data/Demo/ShippingRuleFixture.php
@@ -1,17 +1,21 @@
true,
'unit_definition' => $data->hasUnitDefinition() ? $data->getUnitDefinition() : null,
'label' => 'coreshop.ui.quantity',
- 'disabled' => (bool)$data->getIsGiftItem(),
- ]);
+ 'disabled' => (bool) $data->getIsGiftItem(),
+ ])
+ ;
if (!$product->hasUnitDefinitions()) {
return;
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Extension/CartTypeExtension.php b/src/CoreShop/Bundle/CoreBundle/Form/Extension/CartTypeExtension.php
index 5ce683ef7d..b78c683e94 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Extension/CartTypeExtension.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Extension/CartTypeExtension.php
@@ -1,17 +1,21 @@
false,
'label' => 'coreshop.form.cart_rule.coupon',
])
- ->add('submit_voucher', SubmitType::class);
+ ->add('submit_voucher', SubmitType::class)
+ ;
}
public static function getExtendedTypes(): iterable
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Extension/CountryTypeExtension.php b/src/CoreShop/Bundle/CoreBundle/Form/Extension/CountryTypeExtension.php
index 708d7d1c1c..41266ed3cd 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Extension/CountryTypeExtension.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Extension/CountryTypeExtension.php
@@ -1,17 +1,21 @@
addError(new FormError('Field "starting from" in row ' . $realRowIndex . ' needs to be greater or equal than 0'));
break;
}
- if ((float)$startingFrom <= $lastEnd) {
+ if ((float) $startingFrom <= $lastEnd) {
$form->addError(new FormError('Field "starting from" in row ' . $realRowIndex . ' needs to be greater than ' . $lastEnd));
break;
}
- $lastEnd = (float)$startingFrom;
+ $lastEnd = (float) $startingFrom;
}
}
});
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Extension/ProductQuantityRangeTypeExtension.php b/src/CoreShop/Bundle/CoreBundle/Form/Extension/ProductQuantityRangeTypeExtension.php
index 3492861e6e..11e540555f 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Extension/ProductQuantityRangeTypeExtension.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Extension/ProductQuantityRangeTypeExtension.php
@@ -1,17 +1,21 @@
add('currency', CurrencyChoiceType::class, [])
->add('percentage', NumberType::class, [])
->add('pseudoPrice', MoneyType::class, [])
- ->add('unitDefinition', ProductUnitDefinitionSelectionType::class, []);
+ ->add('unitDefinition', ProductUnitDefinitionSelectionType::class, [])
+ ;
if ($builder->has('rangeStartingFrom')) {
$builder->get('rangeStartingFrom')->addEventListener(FormEvents::PRE_SUBMIT, [$this, 'roundQuantity'], -2048);
@@ -52,11 +57,11 @@ public function roundQuantity(FormEvent $event)
return;
}
- $quantity = (float)str_replace(',', '.', $event->getData());
+ $quantity = (float) str_replace(',', '.', $event->getData());
$formattedQuantity = round($quantity, $scale, \PHP_ROUND_HALF_UP);
if ($quantity !== $formattedQuantity) {
- $event->setData((string)$formattedQuantity);
+ $event->setData((string) $formattedQuantity);
}
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Extension/StoreTypeExtension.php b/src/CoreShop/Bundle/CoreBundle/Form/Extension/StoreTypeExtension.php
index baf6246795..115fcbbb4c 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Extension/StoreTypeExtension.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Extension/StoreTypeExtension.php
@@ -1,17 +1,21 @@
add('state', StateChoiceType::class, [
'active' => null,
'required' => false,
- ]);
+ ])
+ ;
}
public static function getExtendedTypes(): iterable
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/AddressChoiceType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/AddressChoiceType.php
index b09f5eca9d..f124ed3f8b 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/AddressChoiceType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/AddressChoiceType.php
@@ -1,17 +1,21 @@
true,
'allowed_address_identifier' => [],
'placeholder' => 'coreshop.form.address.choose_address',
- ]
- );
+ ],
+ )
+ ;
}
public function getParent(): string
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Checkout/AddressType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Checkout/AddressType.php
index fd86e4d366..c84ec9b49b 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Checkout/AddressType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Checkout/AddressType.php
@@ -1,17 +1,21 @@
0) {
$valid = count(array_filter($choiceList, static function (AddressInterface $address) use ($invoiceAddressId) {
- return $address->getId() === (int)$invoiceAddressId;
+ return $address->getId() === (int) $invoiceAddressId;
})) > 0;
}
}
@@ -145,7 +149,8 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
$event->getForm()->addError(new FormError($message));
}
}
- });
+ })
+ ;
}
public function configureOptions(OptionsResolver $resolver): void
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Checkout/CarrierChoiceType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Checkout/CarrierChoiceType.php
index 90b248025e..56e45906d8 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Checkout/CarrierChoiceType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Checkout/CarrierChoiceType.php
@@ -1,17 +1,21 @@
setDefault('show_carrier_price', true)
- ->setAllowedTypes('cart', OrderInterface::class);
+ ->setAllowedTypes('cart', OrderInterface::class)
+ ;
}
public function buildView(FormView $view, FormInterface $form, array $options): void
@@ -87,7 +92,7 @@ public function buildView(FormView $view, FormInterface $form, array $options):
$cart,
$cart->getShippingAddress(),
$this->taxationDisplayProvider->displayWithTax($context),
- $context
+ $context,
);
$prices[$choice->value] = $price;
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Checkout/CarrierType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Checkout/CarrierType.php
index 0520b51236..b50978ffaf 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Checkout/CarrierType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Checkout/CarrierType.php
@@ -1,17 +1,21 @@
add('comment', TextareaType::class, [
'required' => false,
'label' => 'coreshop.ui.comment',
- ]);
+ ])
+ ;
}
public function configureOptions(OptionsResolver $resolver): void
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Checkout/GuestAddressType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Checkout/GuestAddressType.php
index b35b2116e5..d40561f50e 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Checkout/GuestAddressType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Checkout/GuestAddressType.php
@@ -1,17 +1,21 @@
false,
'label' => 'coreshop.form.address.use_invoice_as_shipping',
- ]
+ ],
)
->add('invoiceAddress', AddressType::class)
->addEventListener(FormEvents::POST_SET_DATA, static function (FormEvent $event) {
@@ -48,6 +52,7 @@ public function buildForm(FormBuilderInterface $builder, array $options)
} else {
$event->getForm()->get('useInvoiceAsShipping')->setData(true);
}
- });
+ })
+ ;
}
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Checkout/PaymentType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Checkout/PaymentType.php
index 300daaedfc..56971e8a6d 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Checkout/PaymentType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Checkout/PaymentType.php
@@ -1,17 +1,21 @@
removeConfigurationFields($event->getForm());
}
- });
+ })
+ ;
$prototypes = [];
foreach (array_keys($this->gatewayFactories) as $type) {
@@ -91,7 +96,7 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
$formBuilder = $builder->create(
'paymentSettings',
- $this->formTypeRegistry->get($type, 'default')
+ $this->formTypeRegistry->get($type, 'default'),
);
$prototypes[$type] = $formBuilder->getForm();
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Checkout/SummaryType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Checkout/SummaryType.php
index c5d0dc7e2a..10877224c7 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Checkout/SummaryType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Checkout/SummaryType.php
@@ -1,17 +1,21 @@
add('submitOrder', SubmitType::class, [
'label' => 'coreshop.ui.buy',
- ]);
+ ])
+ ;
}
public function configureOptions(OptionsResolver $resolver): void
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/CustomerRegistrationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/CustomerRegistrationType.php
index 75c6adba1c..5791eab7f9 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/CustomerRegistrationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/CustomerRegistrationType.php
@@ -1,17 +1,21 @@
$this->validationGroups,
'constraints' => new IsTrue(['groups' => $this->validationGroups]),
])
- ->add('submit', SubmitType::class);
+ ->add('submit', SubmitType::class)
+ ;
if ($this->loginIdentifier !== 'username') {
$builder->addEventListener(FormEvents::SUBMIT, static function (FormEvent $event) {
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/GuestRegistrationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/GuestRegistrationType.php
index 4ecf952cc9..6f139650aa 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/GuestRegistrationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/GuestRegistrationType.php
@@ -1,17 +1,21 @@
setData($customer);
}
})
- ->setDataLocked(false);
+ ->setDataLocked(false)
+ ;
}
public function configureOptions(OptionsResolver $resolver): void
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Action/OrderMailConfigurationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Action/OrderMailConfigurationType.php
index 505016e6f7..c702e1a32d 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Action/OrderMailConfigurationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Action/OrderMailConfigurationType.php
@@ -1,17 +1,21 @@
add('sendInvoices', CheckboxType::class)
->add('sendShipments', CheckboxType::class)
- ->add('doNotSendToDesignatedRecipient', CheckboxType::class);
+ ->add('doNotSendToDesignatedRecipient', CheckboxType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Action/StoreMailConfigurationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Action/StoreMailConfigurationType.php
index d0c0e00655..b00b45334d 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Action/StoreMailConfigurationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Action/StoreMailConfigurationType.php
@@ -1,17 +1,21 @@
NumberType::class,
],
])
- ->add('doNotSendToDesignatedRecipient', CheckboxType::class);
+ ->add('doNotSendToDesignatedRecipient', CheckboxType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Action/StoreOrderMailConfigurationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Action/StoreOrderMailConfigurationType.php
index 0a7e94fbe5..8a0faf759b 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Action/StoreOrderMailConfigurationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Action/StoreOrderMailConfigurationType.php
@@ -1,17 +1,21 @@
add('sendInvoices', CheckboxType::class)
->add('sendShipments', CheckboxType::class)
- ->add('doNotSendToDesignatedRecipient', CheckboxType::class);
+ ->add('doNotSendToDesignatedRecipient', CheckboxType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/BackendCreatedConfigurationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/BackendCreatedConfigurationType.php
index fc561cc629..e873100562 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/BackendCreatedConfigurationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/BackendCreatedConfigurationType.php
@@ -1,17 +1,21 @@
add('backendCreated', CheckboxType::class);
+ ->add('backendCreated', CheckboxType::class)
+ ;
}
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/InvoiceStateConfigurationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/InvoiceStateConfigurationType.php
index f953f44854..dc6c338ae5 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/InvoiceStateConfigurationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/InvoiceStateConfigurationType.php
@@ -1,17 +1,21 @@
add('invoiceState', TextType::class, [
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/OrderInvoiceStateConfigurationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/OrderInvoiceStateConfigurationType.php
index e6d02c7e4a..7004dd849d 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/OrderInvoiceStateConfigurationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/OrderInvoiceStateConfigurationType.php
@@ -1,17 +1,21 @@
add('orderInvoiceState', TextType::class, [
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/OrderPaymentStateConfigurationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/OrderPaymentStateConfigurationType.php
index 1ee02b1640..22de6aec0b 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/OrderPaymentStateConfigurationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/OrderPaymentStateConfigurationType.php
@@ -1,17 +1,21 @@
add('orderPaymentState', TextType::class, [
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/OrderSaleStateConfigurationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/OrderSaleStateConfigurationType.php
index 1e658e64f5..56706d14c4 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/OrderSaleStateConfigurationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/OrderSaleStateConfigurationType.php
@@ -1,17 +1,21 @@
add('saleState', TextType::class, []);
+ ->add('saleState', TextType::class, [])
+ ;
}
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/OrderShippingStateConfigurationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/OrderShippingStateConfigurationType.php
index c96295f1f9..c8ff9725ca 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/OrderShippingStateConfigurationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/OrderShippingStateConfigurationType.php
@@ -1,17 +1,21 @@
add('orderShippingState', TextType::class, [
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/OrderStateConfigurationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/OrderStateConfigurationType.php
index a5c11959c5..574de00949 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/OrderStateConfigurationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/OrderStateConfigurationType.php
@@ -1,17 +1,21 @@
add('orderState', TextType::class, [
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/PaymentStateConfigurationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/PaymentStateConfigurationType.php
index 6031743dba..2489dcb88f 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/PaymentStateConfigurationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/PaymentStateConfigurationType.php
@@ -1,17 +1,21 @@
add('paymentState', TextType::class, [
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/QuoteStateConfigurationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/QuoteStateConfigurationType.php
index e0f8d444c2..64544056cc 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/QuoteStateConfigurationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/QuoteStateConfigurationType.php
@@ -1,17 +1,21 @@
add('shipmentState', TextType::class, [
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/StateTransitionConfigurationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/StateTransitionConfigurationType.php
index db4906bcbb..1db199a05e 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/StateTransitionConfigurationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/StateTransitionConfigurationType.php
@@ -1,17 +1,21 @@
add('transition', TextType::class, [
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/StoresConfigurationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/StoresConfigurationType.php
index 8546057968..d5d4f093ee 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/StoresConfigurationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/StoresConfigurationType.php
@@ -1,17 +1,21 @@
add('stores', CollectionType::class, [
'allow_add' => true,
'allow_delete' => true,
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/UserTypeConfigurationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/UserTypeConfigurationType.php
index c107453d2e..3a280967bf 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/UserTypeConfigurationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Notification/Condition/UserTypeConfigurationType.php
@@ -1,17 +1,21 @@
productStoreValuesRepository->find($value);
- }
+ },
));
}
@@ -49,7 +53,8 @@ public function configureOptions(OptionsResolver $resolver): void
$resolver
->setDefaults([
'csrf_protection' => false,
- ]);
+ ])
+ ;
}
public function getParent(): string
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Product/ProductStoreValuesType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Product/ProductStoreValuesType.php
index f6a5618190..ddea44866f 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Product/ProductStoreValuesType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Product/ProductStoreValuesType.php
@@ -1,17 +1,21 @@
add('store', StoreChoiceType::class)
->add('price', MoneyType::class)
- ->add('productUnitDefinitionPrices', ProductUnitDefinitionPriceCollectionType::class);
+ ->add('productUnitDefinitionPrices', ProductUnitDefinitionPriceCollectionType::class)
+ ;
}
public function onPostSubmit(FormEvent $event): void
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/ProductPriceRule/Condition/QuantityConfigurationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/ProductPriceRule/Condition/QuantityConfigurationType.php
index e01afef2d8..f020bd5da3 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/ProductPriceRule/Condition/QuantityConfigurationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/ProductPriceRule/Condition/QuantityConfigurationType.php
@@ -1,17 +1,21 @@
$this->validationGroups]),
new Type(['type' => 'numeric', 'groups' => $this->validationGroups]),
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Action/FreeShippingConfigurationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Action/FreeShippingConfigurationType.php
index 0be4603955..7ded4aa1b2 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Action/FreeShippingConfigurationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Action/FreeShippingConfigurationType.php
@@ -1,17 +1,21 @@
add('carriers', CollectionType::class, [
'allow_add' => true,
'allow_delete' => true,
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/CategoriesConfigurationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/CategoriesConfigurationType.php
index 810efa935f..d0d14c6699 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/CategoriesConfigurationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/CategoriesConfigurationType.php
@@ -1,17 +1,21 @@
true,
'allow_delete' => true,
])
- ->add('recursive', CheckboxType::class);
+ ->add('recursive', CheckboxType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/CommentConfigurationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/CommentConfigurationType.php
index 39b355e9f7..a86b6d8e9e 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/CommentConfigurationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/CommentConfigurationType.php
@@ -1,17 +1,21 @@
add('commentAction', TextType::class);
+ ->add('commentAction', TextType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/CountriesConfigurationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/CountriesConfigurationType.php
index 523e88d7c6..df1ff06923 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/CountriesConfigurationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/CountriesConfigurationType.php
@@ -1,17 +1,21 @@
add('countries', CollectionType::class, [
'allow_add' => true,
'allow_delete' => true,
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/CurrenciesConfigurationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/CurrenciesConfigurationType.php
index 9b1cb0c867..14cbc2ca02 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/CurrenciesConfigurationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/CurrenciesConfigurationType.php
@@ -1,17 +1,21 @@
add('currencies', CollectionType::class, [
'allow_add' => true,
'allow_delete' => true,
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/CustomerGroupsConfigurationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/CustomerGroupsConfigurationType.php
index 217dc52088..f1a810bd54 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/CustomerGroupsConfigurationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/CustomerGroupsConfigurationType.php
@@ -1,17 +1,21 @@
add('customerGroups', CollectionType::class, [
'allow_add' => true,
'allow_delete' => true,
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/CustomersConfigurationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/CustomersConfigurationType.php
index 0edd8bf3b6..1d6959010b 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/CustomersConfigurationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/CustomersConfigurationType.php
@@ -1,17 +1,21 @@
add('customers', CollectionType::class, [
'allow_add' => true,
'allow_delete' => true,
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/ProductsConfigurationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/ProductsConfigurationType.php
index 9b79f7c643..2a97820079 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/ProductsConfigurationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/ProductsConfigurationType.php
@@ -1,17 +1,21 @@
true,
'allow_delete' => true,
])
- ->add('include_variants', CheckboxType::class);
+ ->add('include_variants', CheckboxType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/StoresConfigurationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/StoresConfigurationType.php
index 37a04e722a..8a3e2a1d55 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/StoresConfigurationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/StoresConfigurationType.php
@@ -1,17 +1,21 @@
add('stores', CollectionType::class, [
'allow_add' => true,
'allow_delete' => true,
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/TimespanConfigurationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/TimespanConfigurationType.php
index 83348a8a07..3a94e84264 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/TimespanConfigurationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/TimespanConfigurationType.php
@@ -1,17 +1,21 @@
add('dateTo', NumberType::class)
- ->add('dateFrom', NumberType::class);
+ ->add('dateFrom', NumberType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/ZonesConfigurationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/ZonesConfigurationType.php
index f89b0a21d9..7fe0eb0403 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/ZonesConfigurationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Rule/Condition/ZonesConfigurationType.php
@@ -1,17 +1,21 @@
add('zones', CollectionType::class, [
'allow_add' => true,
'allow_delete' => true,
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Shipping/Rule/Action/AdditionAmountActionConfigurationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Shipping/Rule/Action/AdditionAmountActionConfigurationType.php
index 65947b8727..530920bfc0 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Shipping/Rule/Action/AdditionAmountActionConfigurationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Shipping/Rule/Action/AdditionAmountActionConfigurationType.php
@@ -1,17 +1,21 @@
[
new NotBlank(['groups' => $this->validationGroups]),
],
- ]);
+ ])
+ ;
$builder->get('currency')->addModelTransformer(new CallbackTransformer(
function (mixed $currency): mixed {
@@ -60,7 +65,7 @@ function (mixed $currency): mixed {
}
return null;
- }
+ },
));
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Shipping/Rule/Action/DiscountAmountActionConfigurationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Shipping/Rule/Action/DiscountAmountActionConfigurationType.php
index 7b4b74fc85..4d8ded1471 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Shipping/Rule/Action/DiscountAmountActionConfigurationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Shipping/Rule/Action/DiscountAmountActionConfigurationType.php
@@ -1,17 +1,21 @@
[
new NotBlank(['groups' => $this->validationGroups]),
],
- ]);
+ ])
+ ;
$builder->get('currency')->addModelTransformer(new CallbackTransformer(
function (mixed $currency): mixed {
@@ -60,7 +65,7 @@ function (mixed $currency): mixed {
}
return null;
- }
+ },
));
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/Shipping/Rule/Action/PriceActionConfigurationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/Shipping/Rule/Action/PriceActionConfigurationType.php
index c7166fe54b..493e96ebe4 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/Shipping/Rule/Action/PriceActionConfigurationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/Shipping/Rule/Action/PriceActionConfigurationType.php
@@ -1,17 +1,21 @@
[
new NotBlank(['groups' => $this->validationGroups]),
],
- ]);
+ ])
+ ;
$builder->get('currency')->addModelTransformer(new CallbackTransformer(
function (mixed $currency): mixed {
@@ -56,7 +61,7 @@ function (mixed $currency): mixed {
}
return null;
- }
+ },
));
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Form/Type/UserRegistrationType.php b/src/CoreShop/Bundle/CoreBundle/Form/Type/UserRegistrationType.php
index e5fa791edd..65c9367b8c 100644
--- a/src/CoreShop/Bundle/CoreBundle/Form/Type/UserRegistrationType.php
+++ b/src/CoreShop/Bundle/CoreBundle/Form/Type/UserRegistrationType.php
@@ -1,17 +1,21 @@
['label' => 'coreshop.form.user.password.label'],
'second_options' => ['label' => 'coreshop.form.user.password.confirmation'],
'invalid_message' => 'coreshop.form.user.password.must_match',
- ]);
+ ])
+ ;
}
public function configureOptions(OptionsResolver $resolver): void
diff --git a/src/CoreShop/Bundle/CoreBundle/Installer.php b/src/CoreShop/Bundle/CoreBundle/Installer.php
index aec8e6c0bb..a42c75d571 100644
--- a/src/CoreShop/Bundle/CoreBundle/Installer.php
+++ b/src/CoreShop/Bundle/CoreBundle/Installer.php
@@ -1,17 +1,21 @@
%s"',
realpath($directory),
- $this->name
+ $this->name,
));
}
}
@@ -67,7 +71,7 @@ public function ensureDirectoryIsWritable(string $directory, OutputInterface $ou
throw new \RuntimeException(sprintf(
'Set "%s" writable and run command "%s"',
realpath(dirname($directory)),
- $this->name
+ $this->name,
));
}
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Installer/Executor/CommandExecutor.php b/src/CoreShop/Bundle/CoreBundle/Installer/Executor/CommandExecutor.php
index 28b48b764c..5d4dd29eec 100644
--- a/src/CoreShop/Bundle/CoreBundle/Installer/Executor/CommandExecutor.php
+++ b/src/CoreShop/Bundle/CoreBundle/Installer/Executor/CommandExecutor.php
@@ -1,17 +1,21 @@
$command],
$this->getDefaultParameters(),
- $parameters
+ $parameters,
);
$this->application->setAutoExit(false);
diff --git a/src/CoreShop/Bundle/CoreBundle/Installer/Executor/FolderInstallerProvider.php b/src/CoreShop/Bundle/CoreBundle/Installer/Executor/FolderInstallerProvider.php
index 3e0c3fcc97..44fbc4030f 100644
--- a/src/CoreShop/Bundle/CoreBundle/Installer/Executor/FolderInstallerProvider.php
+++ b/src/CoreShop/Bundle/CoreBundle/Installer/Executor/FolderInstallerProvider.php
@@ -1,17 +1,21 @@
setAttribute('iconCls', 'coreshop_nav_icon_order')
->setAttribute('resource', 'coreshop.order')
->setAttribute('function', 'open_order_by_number')
- ->setExtra('order', 10);
+ ->setExtra('order', 10)
+ ;
$menuItem->addChild('coreshop_quote_by_number')
->setLabel('coreshop_quote_by_number')
@@ -49,7 +54,8 @@ public function buildMenu(ItemInterface $menuItem, FactoryInterface $factory, st
->setAttribute('iconCls', 'coreshop_nav_icon_quote')
->setAttribute('resource', 'coreshop.order')
->setAttribute('function', 'coreshop_quote_by_number')
- ->setExtra('order', 20);
+ ->setExtra('order', 20)
+ ;
$menuItem->addChild('coreshop_settings')
->setLabel('coreshop_settings')
@@ -57,14 +63,16 @@ public function buildMenu(ItemInterface $menuItem, FactoryInterface $factory, st
->setAttribute('iconCls', 'coreshop_nav_icon_settings')
->setAttribute('resource', 'coreshop.core')
->setAttribute('function', 'settings')
- ->setExtra('order', 30);
+ ->setExtra('order', 30)
+ ;
$priceRules = $menuItem
->addChild('coreshop_pricerules')
->setLabel('coreshop_pricerules')
->setAttribute('iconCls', 'coreshop_nav_icon_price_rule')
->setAttribute('container', true)
- ->setExtra('order', 40);
+ ->setExtra('order', 40)
+ ;
$priceRules
->addChild('coreshop_cart_pricerules')
@@ -73,7 +81,8 @@ public function buildMenu(ItemInterface $menuItem, FactoryInterface $factory, st
->setAttribute('iconCls', 'coreshop_nav_icon_price_rule')
->setAttribute('resource', 'coreshop.order')
->setAttribute('function', 'cart_price_rule')
- ->setExtra('order', 10);
+ ->setExtra('order', 10)
+ ;
$priceRules
->addChild('coreshop_product_pricerules')
@@ -82,14 +91,16 @@ public function buildMenu(ItemInterface $menuItem, FactoryInterface $factory, st
->setAttribute('iconCls', 'coreshop_nav_icon_price_rule')
->setAttribute('resource', 'coreshop.product')
->setAttribute('function', 'product_price_rule')
- ->setExtra('order', 20);
+ ->setExtra('order', 20)
+ ;
$localization = $menuItem
->addChild('coreshop_localization')
->setLabel('coreshop_localization')
->setAttribute('iconCls', 'coreshop_nav_icon_localization')
->setAttribute('container', true)
- ->setExtra('order', 50);
+ ->setExtra('order', 50)
+ ;
$localization
->addChild('coreshop_countries')
@@ -98,7 +109,8 @@ public function buildMenu(ItemInterface $menuItem, FactoryInterface $factory, st
->setAttribute('iconCls', 'coreshop_nav_icon_country')
->setAttribute('resource', 'coreshop.address')
->setAttribute('function', 'country')
- ->setExtra('order', 10);
+ ->setExtra('order', 10)
+ ;
$localization
->addChild('coreshop_states')
@@ -107,7 +119,8 @@ public function buildMenu(ItemInterface $menuItem, FactoryInterface $factory, st
->setAttribute('iconCls', 'coreshop_nav_icon_state')
->setAttribute('resource', 'coreshop.address')
->setAttribute('function', 'state')
- ->setExtra('order', 20);
+ ->setExtra('order', 20)
+ ;
$localization
->addChild('coreshop_currencies')
@@ -116,7 +129,8 @@ public function buildMenu(ItemInterface $menuItem, FactoryInterface $factory, st
->setAttribute('iconCls', 'coreshop_nav_icon_currency')
->setAttribute('resource', 'coreshop.currency')
->setAttribute('function', 'currency')
- ->setExtra('order', 30);
+ ->setExtra('order', 30)
+ ;
$localization
->addChild('coreshop_exchange_rates')
@@ -125,7 +139,8 @@ public function buildMenu(ItemInterface $menuItem, FactoryInterface $factory, st
->setAttribute('iconCls', 'coreshop_nav_icon_exchange_rate')
->setAttribute('resource', 'coreshop.currency')
->setAttribute('function', 'exchange_rate')
- ->setExtra('order', 40);
+ ->setExtra('order', 40)
+ ;
$localization
->addChild('coreshop_zones')
@@ -134,7 +149,8 @@ public function buildMenu(ItemInterface $menuItem, FactoryInterface $factory, st
->setAttribute('iconCls', 'coreshop_nav_icon_zone')
->setAttribute('resource', 'coreshop.address')
->setAttribute('function', 'zone')
- ->setExtra('order', 50);
+ ->setExtra('order', 50)
+ ;
$localization
->addChild('coreshop_taxes')
@@ -143,7 +159,8 @@ public function buildMenu(ItemInterface $menuItem, FactoryInterface $factory, st
->setAttribute('iconCls', 'coreshop_nav_icon_taxes')
->setAttribute('resource', 'coreshop.taxation')
->setAttribute('function', 'tax_item')
- ->setExtra('order', 60);
+ ->setExtra('order', 60)
+ ;
$localization
->addChild('coreshop_taxrulegroups')
@@ -152,14 +169,16 @@ public function buildMenu(ItemInterface $menuItem, FactoryInterface $factory, st
->setAttribute('iconCls', 'coreshop_nav_icon_tax_rule_groups')
->setAttribute('resource', 'coreshop.taxation')
->setAttribute('function', 'tax_rule_group')
- ->setExtra('order', 70);
+ ->setExtra('order', 70)
+ ;
$ordersMenu = $menuItem
->addChild('coreshop_order')
->setLabel('coreshop_order')
->setAttribute('iconCls', 'coreshop_nav_icon_order')
->setAttribute('container', true)
- ->setExtra('order', 60);
+ ->setExtra('order', 60)
+ ;
$ordersMenu
->addChild('coreshop_orders')
@@ -168,7 +187,8 @@ public function buildMenu(ItemInterface $menuItem, FactoryInterface $factory, st
->setAttribute('iconCls', 'coreshop_nav_icon_orders')
->setAttribute('resource', 'coreshop.order')
->setAttribute('function', 'orders')
- ->setExtra('order', 10);
+ ->setExtra('order', 10)
+ ;
$ordersMenu
->addChild('coreshop_order_create')
@@ -177,7 +197,8 @@ public function buildMenu(ItemInterface $menuItem, FactoryInterface $factory, st
->setAttribute('iconCls', 'coreshop_nav_icon_order_create')
->setAttribute('resource', 'coreshop.order')
->setAttribute('function', 'create_order')
- ->setExtra('order', 20);
+ ->setExtra('order', 20)
+ ;
$ordersMenu
->addChild('coreshop_quotes')
@@ -186,7 +207,8 @@ public function buildMenu(ItemInterface $menuItem, FactoryInterface $factory, st
->setAttribute('iconCls', 'coreshop_nav_icon_quotes')
->setAttribute('resource', 'coreshop.order')
->setAttribute('function', 'quotes')
- ->setExtra('order', 30);
+ ->setExtra('order', 30)
+ ;
$ordersMenu
->addChild('coreshop_quote_create')
@@ -195,7 +217,8 @@ public function buildMenu(ItemInterface $menuItem, FactoryInterface $factory, st
->setAttribute('iconCls', 'coreshop_nav_icon_quote_create')
->setAttribute('resource', 'coreshop.order')
->setAttribute('function', 'create_quote')
- ->setExtra('order', 40);
+ ->setExtra('order', 40)
+ ;
$ordersMenu
->addChild('coreshop_carts')
@@ -204,7 +227,8 @@ public function buildMenu(ItemInterface $menuItem, FactoryInterface $factory, st
->setAttribute('iconCls', 'coreshop_nav_icon_carts')
->setAttribute('resource', 'coreshop.order')
->setAttribute('function', 'carts')
- ->setExtra('order', 50);
+ ->setExtra('order', 50)
+ ;
$ordersMenu
->addChild('coreshop_cart_create')
@@ -213,14 +237,16 @@ public function buildMenu(ItemInterface $menuItem, FactoryInterface $factory, st
->setAttribute('iconCls', 'coreshop_nav_icon_cart_create')
->setAttribute('resource', 'coreshop.order')
->setAttribute('function', 'create_cart')
- ->setExtra('order', 60);
+ ->setExtra('order', 60)
+ ;
$carriersMenu = $menuItem
->addChild('coreshop_shipping')
->setLabel('coreshop_shipping')
->setAttribute('iconCls', 'coreshop_nav_icon_shipping')
->setAttribute('container', true)
- ->setExtra('order', 70);
+ ->setExtra('order', 70)
+ ;
$carriersMenu
->addChild('coreshop_carriers')
@@ -229,7 +255,8 @@ public function buildMenu(ItemInterface $menuItem, FactoryInterface $factory, st
->setAttribute('iconCls', 'coreshop_nav_icon_carriers')
->setAttribute('resource', 'coreshop.shipping')
->setAttribute('function', 'carrier')
- ->setExtra('order', 10);
+ ->setExtra('order', 10)
+ ;
$carriersMenu
->addChild('coreshop_carriers_shipping_rules')
@@ -238,14 +265,16 @@ public function buildMenu(ItemInterface $menuItem, FactoryInterface $factory, st
->setAttribute('iconCls', 'coreshop_nav_icon_carrier_shipping_rule')
->setAttribute('resource', 'coreshop.shipping')
->setAttribute('function', 'shipping_rules')
- ->setExtra('order', 20);
+ ->setExtra('order', 20)
+ ;
$productsMenu = $menuItem
->addChild('coreshop_product')
->setLabel('coreshop_product')
->setAttribute('iconCls', 'coreshop_nav_icon_product')
->setAttribute('container', true)
- ->setExtra('order', 80);
+ ->setExtra('order', 80)
+ ;
$productsMenu
->addChild('coreshop_indexes')
@@ -254,7 +283,8 @@ public function buildMenu(ItemInterface $menuItem, FactoryInterface $factory, st
->setAttribute('iconCls', 'coreshop_nav_icon_indexes')
->setAttribute('resource', 'coreshop.index')
->setAttribute('function', 'index')
- ->setExtra('order', 10);
+ ->setExtra('order', 10)
+ ;
$productsMenu
->addChild('coreshop_product_units')
@@ -263,7 +293,8 @@ public function buildMenu(ItemInterface $menuItem, FactoryInterface $factory, st
->setAttribute('iconCls', 'coreshop_nav_icon_product_units')
->setAttribute('resource', 'coreshop.product')
->setAttribute('function', 'product_unit')
- ->setExtra('order', 30);
+ ->setExtra('order', 30)
+ ;
$productsMenu
->addChild('coreshop_filters')
@@ -272,14 +303,16 @@ public function buildMenu(ItemInterface $menuItem, FactoryInterface $factory, st
->setAttribute('iconCls', 'coreshop_nav_icon_filters')
->setAttribute('resource', 'coreshop.index')
->setAttribute('function', 'filter')
- ->setExtra('order', 20);
+ ->setExtra('order', 20)
+ ;
$customersMenu = $menuItem
->addChild('coreshop_customer')
->setLabel('coreshop_customer')
->setAttribute('iconCls', 'coreshop_nav_icon_customer')
->setAttribute('container', true)
- ->setExtra('order', 81);
+ ->setExtra('order', 81)
+ ;
$customersMenu
->addChild('coreshop_customers')
@@ -288,7 +321,8 @@ public function buildMenu(ItemInterface $menuItem, FactoryInterface $factory, st
->setAttribute('iconCls', 'coreshop_nav_icon_customers')
->setAttribute('resource', 'coreshop.customer')
->setAttribute('function', 'customers')
- ->setExtra('order', 10);
+ ->setExtra('order', 10)
+ ;
$customersMenu
->addChild('coreshop_customer_groups')
@@ -297,7 +331,8 @@ public function buildMenu(ItemInterface $menuItem, FactoryInterface $factory, st
->setAttribute('iconCls', 'coreshop_nav_icon_customer_groups')
->setAttribute('resource', 'coreshop.customer')
->setAttribute('function', 'customer_groups')
- ->setExtra('order', 20);
+ ->setExtra('order', 20)
+ ;
$customersMenu
->addChild('coreshop_customer_to_company_assign_to_new')
@@ -306,7 +341,8 @@ public function buildMenu(ItemInterface $menuItem, FactoryInterface $factory, st
->setAttribute('iconCls', 'coreshop_nav_icon_customer_to_company_assign_to_new')
->setAttribute('resource', 'coreshop.core')
->setAttribute('function', 'customer_to_company_assign_to_new')
- ->setExtra('order', 30);
+ ->setExtra('order', 30)
+ ;
$customersMenu
->addChild('coreshop_customer_to_company_assign_to_existing')
@@ -315,7 +351,8 @@ public function buildMenu(ItemInterface $menuItem, FactoryInterface $factory, st
->setAttribute('iconCls', 'coreshop_nav_icon_customer_to_company_assign_to_existing')
->setAttribute('resource', 'coreshop.core')
->setAttribute('function', 'customer_to_company_assign_to_existing')
- ->setExtra('order', 40);
+ ->setExtra('order', 40)
+ ;
$menuItem->addChild('coreshop_notification_rules')
->setLabel('coreshop_notification_rules')
@@ -323,7 +360,8 @@ public function buildMenu(ItemInterface $menuItem, FactoryInterface $factory, st
->setAttribute('iconCls', 'coreshop_nav_icon_notification_rule')
->setAttribute('resource', 'coreshop.notification')
->setAttribute('function', 'notification_rule')
- ->setExtra('order', 80);
+ ->setExtra('order', 80)
+ ;
$menuItem->addChild('coreshop_payment_providers')
->setLabel('coreshop_payment_providers')
@@ -331,7 +369,8 @@ public function buildMenu(ItemInterface $menuItem, FactoryInterface $factory, st
->setAttribute('iconCls', 'coreshop_nav_icon_payment_provider')
->setAttribute('resource', 'coreshop.payment')
->setAttribute('function', 'payment_provider')
- ->setExtra('order', 90);
+ ->setExtra('order', 90)
+ ;
$menuItem->addChild('coreshop_stores')
->setLabel('coreshop_stores')
@@ -339,13 +378,15 @@ public function buildMenu(ItemInterface $menuItem, FactoryInterface $factory, st
->setAttribute('iconCls', 'coreshop_nav_icon_store')
->setAttribute('resource', 'coreshop.store')
->setAttribute('function', 'store')
- ->setExtra('order', 100);
+ ->setExtra('order', 100)
+ ;
$menuItem->addChild('coreshop_about')
->setLabel('coreshop_about')
->setAttribute('iconCls', 'coreshop_nav_icon_logo')
->setAttribute('resource', 'coreshop.core')
->setAttribute('function', 'about')
- ->setExtra('order', 1000);
+ ->setExtra('order', 1000)
+ ;
}
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Migrations/Version20190605141526.php b/src/CoreShop/Bundle/CoreBundle/Migrations/Version20190605141526.php
index b54b59fe8d..ee09f2947b 100644
--- a/src/CoreShop/Bundle/CoreBundle/Migrations/Version20190605141526.php
+++ b/src/CoreShop/Bundle/CoreBundle/Migrations/Version20190605141526.php
@@ -1,17 +1,21 @@
container->get('coreshop.factory.user')->createNew();
- $user->setLoginIdentifier($loginIdentifier );
+ $user->setLoginIdentifier($loginIdentifier);
$user->setPassword($customer->getPassword());
$user->setParent(Service::createFolderByPath(sprintf(
'/%s/%s',
$customer->getFullPath(),
- $this->container->getParameter('coreshop.folder.user')
+ $this->container->getParameter('coreshop.folder.user'),
)));
$user->setCustomer($customer);
$user->setKey($customer->getEmail());
diff --git a/src/CoreShop/Bundle/CoreBundle/Migrations/Version20200414153349.php b/src/CoreShop/Bundle/CoreBundle/Migrations/Version20200414153349.php
index 138cae8677..0f44c44650 100644
--- a/src/CoreShop/Bundle/CoreBundle/Migrations/Version20200414153349.php
+++ b/src/CoreShop/Bundle/CoreBundle/Migrations/Version20200414153349.php
@@ -1,17 +1,21 @@
'numeric',
'fieldtype' => 'numeric',
'width' => '',
- 'defaultValue' => NULL,
+ 'defaultValue' => null,
'integer' => true,
'unsigned' => false,
- 'minValue' => NULL,
- 'maxValue' => NULL,
+ 'minValue' => null,
+ 'maxValue' => null,
'unique' => false,
- 'decimalSize' => NULL,
- 'decimalPrecision' => NULL,
+ 'decimalSize' => null,
+ 'decimalPrecision' => null,
'name' => 'convertedPaymentTotal',
'title' => 'coreshop.order.converted_payment_total',
'tooltip' => '',
@@ -53,7 +57,7 @@ public function up(Schema $schema): void
'index' => false,
'locked' => false,
'style' => '',
- 'permissions' => NULL,
+ 'permissions' => null,
'datatype' => 'data',
'relationType' => false,
'invisible' => false,
@@ -258,7 +262,7 @@ public function up(Schema $schema): void
$fieldBefore = $field['name'];
$this->write(
- sprintf('Field "%s" already found, skipping', $field['name'])
+ sprintf('Field "%s" already found, skipping', $field['name']),
);
continue;
diff --git a/src/CoreShop/Bundle/CoreBundle/Migrations/Version20200415152607.php b/src/CoreShop/Bundle/CoreBundle/Migrations/Version20200415152607.php
index a4a4304e35..9b83463bbd 100644
--- a/src/CoreShop/Bundle/CoreBundle/Migrations/Version20200415152607.php
+++ b/src/CoreShop/Bundle/CoreBundle/Migrations/Version20200415152607.php
@@ -1,17 +1,21 @@
'coreshop_permission_settings',
'category' => 'coreshop_permission_group_coreshop',
]);
-
}
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
-
}
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220330151612.php b/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220330151612.php
index eb2df064dd..f7473d7c92 100644
--- a/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220330151612.php
+++ b/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220330151612.php
@@ -2,6 +2,20 @@
declare(strict_types=1);
+/*
+ * CoreShop
+ *
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
+ *
+ * @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
+ * @license https://www.coreshop.org/license GPLv3 and CCL
+ *
+ */
+
namespace CoreShop\Bundle\CoreBundle\Migrations;
use CoreShop\Component\Pimcore\DataObject\ClassUpdate;
@@ -25,29 +39,29 @@ public function up(Schema $schema): void
$classUpdater = new ClassUpdate($orderClassName);
$fieldQuoteStatus = [
- "fieldtype" => "input",
- "width" => null,
- "queryColumnType" => "varchar",
- "columnType" => "varchar",
- "columnLength" => 190,
- "phpdocType" => "string",
- "regex" => "",
- "unique" => false,
- "showCharCount" => null,
- "name" => "quoteState",
- "title" => "coreshop.order.quote_state",
- "tooltip" => "",
- "mandatory" => false,
- "noteditable" => true,
- "index" => false,
- "locked" => false,
- "style" => "",
- "permissions" => null,
- "datatype" => "data",
- "relationType" => false,
- "invisible" => false,
- "visibleGridView" => false,
- "visibleSearch" => false,
+ 'fieldtype' => 'input',
+ 'width' => null,
+ 'queryColumnType' => 'varchar',
+ 'columnType' => 'varchar',
+ 'columnLength' => 190,
+ 'phpdocType' => 'string',
+ 'regex' => '',
+ 'unique' => false,
+ 'showCharCount' => null,
+ 'name' => 'quoteState',
+ 'title' => 'coreshop.order.quote_state',
+ 'tooltip' => '',
+ 'mandatory' => false,
+ 'noteditable' => true,
+ 'index' => false,
+ 'locked' => false,
+ 'style' => '',
+ 'permissions' => null,
+ 'datatype' => 'data',
+ 'relationType' => false,
+ 'invisible' => false,
+ 'visibleGridView' => false,
+ 'visibleSearch' => false,
];
if (!$classUpdater->hasField('quoteState')) {
@@ -60,6 +74,5 @@ public function up(Schema $schema): void
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
-
}
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220330153600.php b/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220330153600.php
index 282209518f..c19430420e 100644
--- a/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220330153600.php
+++ b/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220330153600.php
@@ -2,6 +2,20 @@
declare(strict_types=1);
+/*
+ * CoreShop
+ *
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
+ *
+ * @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
+ * @license https://www.coreshop.org/license GPLv3 and CCL
+ *
+ */
+
namespace CoreShop\Bundle\CoreBundle\Migrations;
use CoreShop\Component\Pimcore\DataObject\ClassUpdate;
@@ -25,29 +39,29 @@ public function up(Schema $schema): void
$classUpdater = new ClassUpdate($orderClassName);
$fieldQuoteNumber = [
- "fieldtype" => "input",
- "width" => null,
- "queryColumnType" => "varchar",
- "columnType" => "varchar",
- "columnLength" => 190,
- "phpdocType" => "string",
- "regex" => "",
- "unique" => false,
- "showCharCount" => null,
- "name" => "quoteNumber",
- "title" => "coreshop.order.quote_number",
- "tooltip" => "",
- "mandatory" => false,
- "noteditable" => true,
- "index" => false,
- "locked" => false,
- "style" => "",
- "permissions" => null,
- "datatype" => "data",
- "relationType" => false,
- "invisible" => false,
- "visibleGridView" => false,
- "visibleSearch" => false,
+ 'fieldtype' => 'input',
+ 'width' => null,
+ 'queryColumnType' => 'varchar',
+ 'columnType' => 'varchar',
+ 'columnLength' => 190,
+ 'phpdocType' => 'string',
+ 'regex' => '',
+ 'unique' => false,
+ 'showCharCount' => null,
+ 'name' => 'quoteNumber',
+ 'title' => 'coreshop.order.quote_number',
+ 'tooltip' => '',
+ 'mandatory' => false,
+ 'noteditable' => true,
+ 'index' => false,
+ 'locked' => false,
+ 'style' => '',
+ 'permissions' => null,
+ 'datatype' => 'data',
+ 'relationType' => false,
+ 'invisible' => false,
+ 'visibleGridView' => false,
+ 'visibleSearch' => false,
];
if (!$classUpdater->hasField('quoteNumber')) {
@@ -60,6 +74,5 @@ public function up(Schema $schema): void
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
-
}
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220414125342.php b/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220414125342.php
index 19d3267fa9..86c7ab83e5 100644
--- a/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220414125342.php
+++ b/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220414125342.php
@@ -2,6 +2,20 @@
declare(strict_types=1);
+/*
+ * CoreShop
+ *
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
+ *
+ * @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
+ * @license https://www.coreshop.org/license GPLv3 and CCL
+ *
+ */
+
namespace CoreShop\Bundle\CoreBundle\Migrations;
use CoreShop\Component\Pimcore\DataObject\ClassUpdate;
@@ -25,92 +39,92 @@ public function up(Schema $schema): void
$classUpdater = new ClassUpdate($orderClassName);
$convertedTotalGrossField = [
- "fieldtype" => "coreShopMoney",
- "width" => "",
- "defaultValue" => null,
- "phpdocType" => "int",
- "minValue" => null,
- "maxValue" => null,
- "name" => "convertedSubtotalGross",
- "title" => "coreshop.order_item.converted_subtotal_gross",
- "tooltip" => "",
- "mandatory" => false,
- "noteditable" => true,
- "index" => false,
- "locked" => false,
- "style" => "",
- "permissions" => null,
- "datatype" => "data",
- "relationType" => false,
- "invisible" => false,
- "visibleGridView" => false,
- "visibleSearch" => false,
+ 'fieldtype' => 'coreShopMoney',
+ 'width' => '',
+ 'defaultValue' => null,
+ 'phpdocType' => 'int',
+ 'minValue' => null,
+ 'maxValue' => null,
+ 'name' => 'convertedSubtotalGross',
+ 'title' => 'coreshop.order_item.converted_subtotal_gross',
+ 'tooltip' => '',
+ 'mandatory' => false,
+ 'noteditable' => true,
+ 'index' => false,
+ 'locked' => false,
+ 'style' => '',
+ 'permissions' => null,
+ 'datatype' => 'data',
+ 'relationType' => false,
+ 'invisible' => false,
+ 'visibleGridView' => false,
+ 'visibleSearch' => false,
];
$convertedTotalNetField = [
- "fieldtype" => "coreShopMoney",
- "width" => "",
- "defaultValue" => null,
- "phpdocType" => "int",
- "minValue" => null,
- "maxValue" => null,
- "name" => "convertedSubtotalNet",
- "title" => "coreshop.order_item.converted_subtotal_net",
- "tooltip" => "",
- "mandatory" => false,
- "noteditable" => true,
- "index" => false,
- "locked" => false,
- "style" => "",
- "permissions" => null,
- "datatype" => "data",
- "relationType" => false,
- "invisible" => false,
- "visibleGridView" => false,
- "visibleSearch" => false,
+ 'fieldtype' => 'coreShopMoney',
+ 'width' => '',
+ 'defaultValue' => null,
+ 'phpdocType' => 'int',
+ 'minValue' => null,
+ 'maxValue' => null,
+ 'name' => 'convertedSubtotalNet',
+ 'title' => 'coreshop.order_item.converted_subtotal_net',
+ 'tooltip' => '',
+ 'mandatory' => false,
+ 'noteditable' => true,
+ 'index' => false,
+ 'locked' => false,
+ 'style' => '',
+ 'permissions' => null,
+ 'datatype' => 'data',
+ 'relationType' => false,
+ 'invisible' => false,
+ 'visibleGridView' => false,
+ 'visibleSearch' => false,
];
$subtotalNetField = [
- "fieldtype" => "coreShopMoney",
- "width" => "",
- "defaultValue" => null,
- "phpdocType" => "int",
- "minValue" => null,
- "maxValue" => null,
- "name" => "subtotalNet",
- "title" => "coreshop.order_item.subtotal_net",
- "tooltip" => "",
- "mandatory" => false,
- "noteditable" => true,
- "index" => false,
- "locked" => false,
- "style" => "",
- "permissions" => null,
- "datatype" => "data",
- "relationType" => false,
- "invisible" => false,
- "visibleGridView" => false,
- "visibleSearch" => false,
+ 'fieldtype' => 'coreShopMoney',
+ 'width' => '',
+ 'defaultValue' => null,
+ 'phpdocType' => 'int',
+ 'minValue' => null,
+ 'maxValue' => null,
+ 'name' => 'subtotalNet',
+ 'title' => 'coreshop.order_item.subtotal_net',
+ 'tooltip' => '',
+ 'mandatory' => false,
+ 'noteditable' => true,
+ 'index' => false,
+ 'locked' => false,
+ 'style' => '',
+ 'permissions' => null,
+ 'datatype' => 'data',
+ 'relationType' => false,
+ 'invisible' => false,
+ 'visibleGridView' => false,
+ 'visibleSearch' => false,
];
$subtotalGrossField = [
- "fieldtype" => "coreShopMoney",
- "width" => "",
- "defaultValue" => null,
- "phpdocType" => "int",
- "minValue" => null,
- "maxValue" => null,
- "name" => "subtotalGross",
- "title" => "coreshop.order_item.subtotal_gross",
- "tooltip" => "",
- "mandatory" => false,
- "noteditable" => true,
- "index" => false,
- "locked" => false,
- "style" => "",
- "permissions" => null,
- "datatype" => "data",
- "relationType" => false,
- "invisible" => false,
- "visibleGridView" => false,
- "visibleSearch" => false,
+ 'fieldtype' => 'coreShopMoney',
+ 'width' => '',
+ 'defaultValue' => null,
+ 'phpdocType' => 'int',
+ 'minValue' => null,
+ 'maxValue' => null,
+ 'name' => 'subtotalGross',
+ 'title' => 'coreshop.order_item.subtotal_gross',
+ 'tooltip' => '',
+ 'mandatory' => false,
+ 'noteditable' => true,
+ 'index' => false,
+ 'locked' => false,
+ 'style' => '',
+ 'permissions' => null,
+ 'datatype' => 'data',
+ 'relationType' => false,
+ 'invisible' => false,
+ 'visibleGridView' => false,
+ 'visibleSearch' => false,
];
if (!$classUpdater->hasField('convertedSubtotalGross')) {
@@ -135,6 +149,5 @@ public function up(Schema $schema): void
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
-
}
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220503143220.php b/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220503143220.php
index 7d2d60ea17..24f8bf178b 100644
--- a/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220503143220.php
+++ b/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220503143220.php
@@ -2,6 +2,20 @@
declare(strict_types=1);
+/*
+ * CoreShop
+ *
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
+ *
+ * @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
+ * @license https://www.coreshop.org/license GPLv3 and CCL
+ *
+ */
+
namespace CoreShop\Bundle\CoreBundle\Migrations;
use CoreShop\Component\Pimcore\DataObject\ClassInstaller;
diff --git a/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220503144151.php b/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220503144151.php
index 1c218431fd..b295f296a0 100644
--- a/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220503144151.php
+++ b/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220503144151.php
@@ -2,6 +2,20 @@
declare(strict_types=1);
+/*
+ * CoreShop
+ *
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
+ *
+ * @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
+ * @license https://www.coreshop.org/license GPLv3 and CCL
+ *
+ */
+
namespace CoreShop\Bundle\CoreBundle\Migrations;
use CoreShop\Component\Pimcore\DataObject\ClassUpdate;
@@ -28,118 +42,118 @@ public function up(Schema $schema): void
}
$attributesLayout = [
- "fieldtype" => "panel",
- "layout" => null,
- "border" => false,
- "name" => "attributes",
- "type" => null,
- "region" => null,
- "title" => "coreshop.product.attributes",
- "width" => "",
- "height" => "",
- "collapsible" => false,
- "collapsed" => false,
- "bodyStyle" => "",
- "datatype" => "layout",
- "permissions" => null,
- "childs" => [
+ 'fieldtype' => 'panel',
+ 'layout' => null,
+ 'border' => false,
+ 'name' => 'attributes',
+ 'type' => null,
+ 'region' => null,
+ 'title' => 'coreshop.product.attributes',
+ 'width' => '',
+ 'height' => '',
+ 'collapsible' => false,
+ 'collapsed' => false,
+ 'bodyStyle' => '',
+ 'datatype' => 'layout',
+ 'permissions' => null,
+ 'childs' => [
[
- "fieldtype" => "coreShopRelation",
- "stack" => "coreshop.purchasable",
- "returnConcrete" => true,
- "relationType" => true,
- "objectsAllowed" => true,
- "assetsAllowed" => false,
- "documentsAllowed" => false,
- "width" => null,
- "assetUploadPath" => null,
- "assetTypes" => [],
- "documentTypes" => [],
- "classes" => [
+ 'fieldtype' => 'coreShopRelation',
+ 'stack' => 'coreshop.purchasable',
+ 'returnConcrete' => true,
+ 'relationType' => true,
+ 'objectsAllowed' => true,
+ 'assetsAllowed' => false,
+ 'documentsAllowed' => false,
+ 'width' => null,
+ 'assetUploadPath' => null,
+ 'assetTypes' => [],
+ 'documentTypes' => [],
+ 'classes' => [
[
- "classes" => "CoreShopProduct",
+ 'classes' => 'CoreShopProduct',
],
],
- "pathFormatterClass" => "",
- "name" => "mainVariant",
- "title" => "Main Variant",
- "tooltip" => "",
- "mandatory" => false,
- "noteditable" => false,
- "index" => false,
- "locked" => false,
- "style" => "",
- "permissions" => null,
- "datatype" => "data",
- "invisible" => true,
- "visibleGridView" => false,
- "visibleSearch" => false,
+ 'pathFormatterClass' => '',
+ 'name' => 'mainVariant',
+ 'title' => 'Main Variant',
+ 'tooltip' => '',
+ 'mandatory' => false,
+ 'noteditable' => false,
+ 'index' => false,
+ 'locked' => false,
+ 'style' => '',
+ 'permissions' => null,
+ 'datatype' => 'data',
+ 'invisible' => true,
+ 'visibleGridView' => false,
+ 'visibleSearch' => false,
],
[
- "fieldtype" => "coreShopRelations",
- "stack" => "coreshop.attribute_group",
- "relationType" => true,
- "objectsAllowed" => true,
- "assetsAllowed" => false,
- "documentsAllowed" => false,
- "width" => null,
- "height" => "",
- "maxItems" => "",
- "assetUploadPath" => null,
- "assetTypes" => [],
- "documentTypes" => [],
- "enableTextSelection" => false,
- "classes" => [],
- "pathFormatterClass" => "",
- "name" => "allowedAttributeGroups",
- "title" => "coreshop.product.allowed_attribute_groups",
- "tooltip" => "",
- "mandatory" => false,
- "noteditable" => false,
- "index" => false,
- "locked" => false,
- "style" => "",
- "permissions" => null,
- "datatype" => "data",
- "invisible" => false,
- "visibleGridView" => false,
- "visibleSearch" => false,
+ 'fieldtype' => 'coreShopRelations',
+ 'stack' => 'coreshop.attribute_group',
+ 'relationType' => true,
+ 'objectsAllowed' => true,
+ 'assetsAllowed' => false,
+ 'documentsAllowed' => false,
+ 'width' => null,
+ 'height' => '',
+ 'maxItems' => '',
+ 'assetUploadPath' => null,
+ 'assetTypes' => [],
+ 'documentTypes' => [],
+ 'enableTextSelection' => false,
+ 'classes' => [],
+ 'pathFormatterClass' => '',
+ 'name' => 'allowedAttributeGroups',
+ 'title' => 'coreshop.product.allowed_attribute_groups',
+ 'tooltip' => '',
+ 'mandatory' => false,
+ 'noteditable' => false,
+ 'index' => false,
+ 'locked' => false,
+ 'style' => '',
+ 'permissions' => null,
+ 'datatype' => 'data',
+ 'invisible' => false,
+ 'visibleGridView' => false,
+ 'visibleSearch' => false,
],
[
- "fieldtype" => "coreShopRelations",
- "stack" => "coreshop.attribute",
- "relationType" => true,
- "objectsAllowed" => true,
- "assetsAllowed" => false,
- "documentsAllowed" => false,
- "width" => null,
- "height" => "",
- "maxItems" => "",
- "assetUploadPath" => null,
- "assetTypes" => [],
- "documentTypes" => [],
- "enableTextSelection" => false,
- "classes" => [],
- "pathFormatterClass" => "",
- "name" => "attributes",
- "title" => "coreshop.product.attributes",
- "tooltip" => "",
- "mandatory" => false,
- "noteditable" => false,
- "index" => false,
- "locked" => false,
- "style" => "",
- "permissions" => null,
- "datatype" => "data",
- "invisible" => false,
- "visibleGridView" => false,
- "visibleSearch" => false,
+ 'fieldtype' => 'coreShopRelations',
+ 'stack' => 'coreshop.attribute',
+ 'relationType' => true,
+ 'objectsAllowed' => true,
+ 'assetsAllowed' => false,
+ 'documentsAllowed' => false,
+ 'width' => null,
+ 'height' => '',
+ 'maxItems' => '',
+ 'assetUploadPath' => null,
+ 'assetTypes' => [],
+ 'documentTypes' => [],
+ 'enableTextSelection' => false,
+ 'classes' => [],
+ 'pathFormatterClass' => '',
+ 'name' => 'attributes',
+ 'title' => 'coreshop.product.attributes',
+ 'tooltip' => '',
+ 'mandatory' => false,
+ 'noteditable' => false,
+ 'index' => false,
+ 'locked' => false,
+ 'style' => '',
+ 'permissions' => null,
+ 'datatype' => 'data',
+ 'invisible' => false,
+ 'visibleGridView' => false,
+ 'visibleSearch' => false,
],
],
- "locked" => false,
- "icon" => "",
- "labelWidth" => 0,
- "labelAlign" => "left",
+ 'locked' => false,
+ 'icon' => '',
+ 'labelWidth' => 0,
+ 'labelAlign' => 'left',
];
$classUpdater->insertLayoutAfter('details', $attributesLayout);
diff --git a/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220509091354.php b/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220509091354.php
index 8c4e1489aa..63fa8c6acb 100644
--- a/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220509091354.php
+++ b/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220509091354.php
@@ -2,6 +2,20 @@
declare(strict_types=1);
+/*
+ * CoreShop
+ *
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
+ *
+ * @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
+ * @license https://www.coreshop.org/license GPLv3 and CCL
+ *
+ */
+
namespace CoreShop\Bundle\CoreBundle\Migrations;
use Doctrine\DBAL\Schema\Schema;
diff --git a/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220817144912.php b/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220817144912.php
index 1c4a8cc918..24ae59f769 100644
--- a/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220817144912.php
+++ b/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220817144912.php
@@ -2,10 +2,23 @@
declare(strict_types=1);
+/*
+ * CoreShop
+ *
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
+ *
+ * @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
+ * @license https://www.coreshop.org/license GPLv3 and CCL
+ *
+ */
+
namespace CoreShop\Bundle\CoreBundle\Migrations;
use CoreShop\Component\Pimcore\DataObject\ClassInstallerInterface;
-use CoreShop\Component\Pimcore\DataObject\ClassUpdate;
use Doctrine\DBAL\Schema\Schema;
use Doctrine\Migrations\AbstractMigration;
use Pimcore\Model\DataObject\Fieldcollection\Definition;
@@ -24,7 +37,7 @@ public function getDescription(): string
public function up(Schema $schema): void
{
$fc = Definition::getByKey('CoreShopPriceRuleItem');
-
+
if (null !== $fc) {
return;
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220817144952.php b/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220817144952.php
index be96a9b196..404c173dfa 100644
--- a/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220817144952.php
+++ b/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220817144952.php
@@ -2,6 +2,20 @@
declare(strict_types=1);
+/*
+ * CoreShop
+ *
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
+ *
+ * @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
+ * @license https://www.coreshop.org/license GPLv3 and CCL
+ *
+ */
+
namespace CoreShop\Bundle\CoreBundle\Migrations;
use CoreShop\Component\Pimcore\DataObject\ClassUpdate;
@@ -28,52 +42,52 @@ public function up(Schema $schema): void
}
$attributesLayout = [
- "fieldtype" => "panel",
- "labelWidth" => 100,
- "name" => "price_rules",
- "type" => null,
- "region" => null,
- "title" => "coreshop.order.price_rules",
- "width" => null,
- "height" => null,
- "collapsible" => false,
- "collapsed" => false,
- "datatype" => "layout",
- "bodyStyle" => [
- "datatype" => "layout",
- "permissions" => null,
- "childs" => [
+ 'fieldtype' => 'panel',
+ 'labelWidth' => 100,
+ 'name' => 'price_rules',
+ 'type' => null,
+ 'region' => null,
+ 'title' => 'coreshop.order.price_rules',
+ 'width' => null,
+ 'height' => null,
+ 'collapsible' => false,
+ 'collapsed' => false,
+ 'datatype' => 'layout',
+ 'bodyStyle' => [
+ 'datatype' => 'layout',
+ 'permissions' => null,
+ 'childs' => [
[
- "fieldtype" => "fieldcollections",
- "phpdocType" => "\\Pimcore\\Model\\DataObject\\Fieldcollection",
- "allowedTypes" => [
- "CoreShopPriceRuleItem"
+ 'fieldtype' => 'fieldcollections',
+ 'phpdocType' => '\\Pimcore\\Model\\DataObject\\Fieldcollection',
+ 'allowedTypes' => [
+ 'CoreShopPriceRuleItem',
],
- "lazyLoading" => true,
- "maxItems" => "",
- "disallowAddRemove" => false,
- "disallowReorder" => false,
- "collapsed" => false,
- "collapsible" => false,
- "border" => false,
- "name" => "priceRuleItems",
- "title" => "coreshop.order.price_rules",
- "tooltip" => "",
- "mandatory" => false,
- "noteditable" => true,
- "index" => false,
- "locked" => false,
- "style" => "",
- "permissions" => null,
- "datatype" => "data",
- "relationType" => false,
- "invisible" => false,
- "visibleGridView" => false,
- "visibleSearch" => false
- ]
+ 'lazyLoading' => true,
+ 'maxItems' => '',
+ 'disallowAddRemove' => false,
+ 'disallowReorder' => false,
+ 'collapsed' => false,
+ 'collapsible' => false,
+ 'border' => false,
+ 'name' => 'priceRuleItems',
+ 'title' => 'coreshop.order.price_rules',
+ 'tooltip' => '',
+ 'mandatory' => false,
+ 'noteditable' => true,
+ 'index' => false,
+ 'locked' => false,
+ 'style' => '',
+ 'permissions' => null,
+ 'datatype' => 'data',
+ 'relationType' => false,
+ 'invisible' => false,
+ 'visibleGridView' => false,
+ 'visibleSearch' => false,
+ ],
],
- "locked" => false
- ]
+ 'locked' => false,
+ ],
];
$classUpdater->insertLayoutAfter('numbers', $attributesLayout);
diff --git a/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220824065814.php b/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220824065814.php
index ac50692776..744d3873ed 100644
--- a/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220824065814.php
+++ b/src/CoreShop/Bundle/CoreBundle/Migrations/Version20220824065814.php
@@ -2,6 +2,20 @@
declare(strict_types=1);
+/*
+ * CoreShop
+ *
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
+ *
+ * @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
+ * @license https://www.coreshop.org/license GPLv3 and CCL
+ *
+ */
+
namespace CoreShop\Bundle\CoreBundle\Migrations;
use CoreShop\Component\Pimcore\DataObject\ClassInstallerInterface;
@@ -46,6 +60,5 @@ public function up(Schema $schema): void
public function down(Schema $schema): void
{
// this down() migration is auto-generated, please modify it to your needs
-
}
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Order/OrderMailProcessor.php b/src/CoreShop/Bundle/CoreBundle/Order/OrderMailProcessor.php
index 70a0b4e370..a7aec542b3 100644
--- a/src/CoreShop/Bundle/CoreBundle/Order/OrderMailProcessor.php
+++ b/src/CoreShop/Bundle/CoreBundle/Order/OrderMailProcessor.php
@@ -1,17 +1,21 @@
storeId = $config->storeId;
diff --git a/src/CoreShop/Bundle/CoreBundle/Pimcore/LinkGenerator/DataObjectLinkGenerator.php b/src/CoreShop/Bundle/CoreBundle/Pimcore/LinkGenerator/DataObjectLinkGenerator.php
index 717256147d..df68d7de82 100644
--- a/src/CoreShop/Bundle/CoreBundle/Pimcore/LinkGenerator/DataObjectLinkGenerator.php
+++ b/src/CoreShop/Bundle/CoreBundle/Pimcore/LinkGenerator/DataObjectLinkGenerator.php
@@ -1,17 +1,21 @@
where('o_path LIKE :path')
->andWhere('stores LIKE :stores')
->setParameter('path', $category->getRealFullPath() . '/%')
- ->setParameter('stores', '%,' . $store->getId() . ',%');
+ ->setParameter('stores', '%,' . $store->getId() . ',%')
+ ;
$childIds = [];
@@ -98,12 +103,12 @@ private function setSortingForListing(Listing $list, CategoryInterface $category
if (method_exists($category, 'getChildrenSortBy')) {
$list->setOrderKey(
sprintf('o_%s ASC', $category->getChildrenSortBy()),
- false
+ false,
);
} else {
$list->setOrderKey(
'o_key ASC',
- false
+ false,
);
}
}
@@ -112,7 +117,7 @@ private function setSortingForListingWithoutCategory(Listing $list): void
{
$list->setOrderKey(
'o_index ASC, o_key ASC',
- false
+ false,
);
}
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Pimcore/Repository/CustomerRepository.php b/src/CoreShop/Bundle/CoreBundle/Pimcore/Repository/CustomerRepository.php
index 302c884ed1..992bda1d46 100644
--- a/src/CoreShop/Bundle/CoreBundle/Pimcore/Repository/CustomerRepository.php
+++ b/src/CoreShop/Bundle/CoreBundle/Pimcore/Repository/CustomerRepository.php
@@ -1,17 +1,21 @@
andWhere('o_type = :variant')
->setParameter('path', $product->getRealFullPath() . '/%')
->setParameter('stores', '%,' . $store->getId() . ',%')
- ->setParameter('variant', 'variant');
+ ->setParameter('variant', 'variant')
+ ;
$variantIds = [];
diff --git a/src/CoreShop/Bundle/CoreBundle/Pimcore/Repository/WishlistRepository.php b/src/CoreShop/Bundle/CoreBundle/Pimcore/Repository/WishlistRepository.php
index 0c89f5305b..71d7d9cc07 100644
--- a/src/CoreShop/Bundle/CoreBundle/Pimcore/Repository/WishlistRepository.php
+++ b/src/CoreShop/Bundle/CoreBundle/Pimcore/Repository/WishlistRepository.php
@@ -1,23 +1,25 @@
getList();
$list->setCondition('customer__id = ? AND store = ?', [$customer->getId(), $store->getId()]);
@@ -41,5 +43,4 @@ public function findLatestByStoreAndCustomer(
return null;
}
-
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Report/AbandonedCartsReport.php b/src/CoreShop/Bundle/CoreBundle/Report/AbandonedCartsReport.php
index 5dea58b010..33775783f9 100644
--- a/src/CoreShop/Bundle/CoreBundle/Report/AbandonedCartsReport.php
+++ b/src/CoreShop/Bundle/CoreBundle/Report/AbandonedCartsReport.php
@@ -1,17 +1,21 @@
db->fetchAllAssociative($sqlQuery, [$fromTimestamp, $toTimestamp]);
- $this->totalRecords = (int)$this->db->fetchOne('SELECT FOUND_ROWS()');
+ $this->totalRecords = (int) $this->db->fetchOne('SELECT FOUND_ROWS()');
foreach ($data as &$entry) {
$entry['itemsInCart'] = count(array_filter(explode(',', $entry['items'])));
diff --git a/src/CoreShop/Bundle/CoreBundle/Report/CarriersReport.php b/src/CoreShop/Bundle/CoreBundle/Report/CarriersReport.php
index d29d187074..86ce151cde 100644
--- a/src/CoreShop/Bundle/CoreBundle/Report/CarriersReport.php
+++ b/src/CoreShop/Bundle/CoreBundle/Report/CarriersReport.php
@@ -1,17 +1,21 @@
$carrier instanceof CarrierInterface ? $carrier->getIdentifier() : $result['carrier'],
- 'data' => (float)$result['percentage'],
+ 'data' => (float) $result['percentage'],
];
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Report/CartsReport.php b/src/CoreShop/Bundle/CoreBundle/Report/CartsReport.php
index ab3e2121a5..b399309f21 100644
--- a/src/CoreShop/Bundle/CoreBundle/Report/CartsReport.php
+++ b/src/CoreShop/Bundle/CoreBundle/Report/CartsReport.php
@@ -1,17 +1,21 @@
? AND orders.orderDate < ? AND orderItems.product__id IS NOT NULL
+ WHERE orders.store = $storeId" . (($orderStateFilter !== null) ? ' AND `orders`.orderState IN (' . rtrim(str_repeat('?,', count($orderStateFilter)), ',') . ')' : '') . " AND orders.orderDate > ? AND orders.orderDate < ? AND orderItems.product__id IS NOT NULL
GROUP BY categories.oo_id
ORDER BY quantityCount DESC
LIMIT $offset,$limit";
$queryParameters = [];
- if($orderStateFilter !== null) {
+ if ($orderStateFilter !== null) {
array_push($queryParameters, ...$orderStateFilter);
}
$queryParameters[] = $from->getTimestamp();
$queryParameters[] = $to->getTimestamp();
$results = $this->db->fetchAllAssociative($query, $queryParameters);
- if(count($results) === 0) {
+ if (count($results) === 0) {
// when products get assigned to category
$query = "
SELECT SQL_CALC_FOUND_ROWS
@@ -111,19 +121,19 @@ public function getReportData(ParameterBag $parameterBag): array
SUM(orderItems.quantity) AS `quantityCount`,
COUNT(orderItems.product__id) AS `orderCount`
FROM object_$categoryClassId AS categories
- INNER JOIN object_localized_query_".$categoryClassId.'_'.$locale." AS localizedCategories ON localizedCategories.ooo_id = categories.oo_id
+ INNER JOIN object_localized_query_" . $categoryClassId . '_' . $locale . " AS localizedCategories ON localizedCategories.ooo_id = categories.oo_id
INNER JOIN dependencies AS catProductDependencies ON catProductDependencies.sourceId = categories.oo_id AND catProductDependencies.sourcetype = \"object\"
INNER JOIN object_query_$orderItemClassId AS orderItems ON orderItems.product__id = catProductDependencies.targetId
INNER JOIN object_relations_$orderClassId AS orderRelations ON orderRelations.dest_id = orderItems.oo_id AND orderRelations.fieldname = \"items\"
INNER JOIN object_query_$orderClassId AS `orders` ON `orders`.oo_id = orderRelations.src_id
- WHERE orders.store = $storeId".(($orderStateFilter !== null) ? ' AND `orders`.orderState IN ('.rtrim(str_repeat('?,', count($orderStateFilter)), ',').')' : '')." AND orders.orderDate > ? AND orders.orderDate < ? AND orderItems.product__id IS NOT NULL
+ WHERE orders.store = $storeId" . (($orderStateFilter !== null) ? ' AND `orders`.orderState IN (' . rtrim(str_repeat('?,', count($orderStateFilter)), ',') . ')' : '') . " AND orders.orderDate > ? AND orders.orderDate < ? AND orderItems.product__id IS NOT NULL
GROUP BY categories.oo_id
ORDER BY quantityCount DESC
LIMIT $offset,$limit";
$results = $this->db->fetchAllAssociative($query, $queryParameters);
}
- $this->totalRecords = (int)$this->db->fetchOne('SELECT FOUND_ROWS()');
+ $this->totalRecords = (int) $this->db->fetchOne('SELECT FOUND_ROWS()');
$data = [];
foreach ($results as $result) {
@@ -135,8 +145,8 @@ public function getReportData(ParameterBag $parameterBag): array
'profit' => $result['profit'],
'quantityCount' => $result['quantityCount'],
'orderCount' => $result['orderCount'],
- 'salesFormatted' => $this->moneyFormatter->format((int)$result['sales'], $store->getCurrency()->getIsoCode(), $this->localeService->getLocaleCode()),
- 'profitFormatted' => $this->moneyFormatter->format((int)$result['profit'], $store->getCurrency()->getIsoCode(), $this->localeService->getLocaleCode()),
+ 'salesFormatted' => $this->moneyFormatter->format((int) $result['sales'], $store->getCurrency()->getIsoCode(), $this->localeService->getLocaleCode()),
+ 'profitFormatted' => $this->moneyFormatter->format((int) $result['profit'], $store->getCurrency()->getIsoCode(), $this->localeService->getLocaleCode()),
];
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Report/CustomersReport.php b/src/CoreShop/Bundle/CoreBundle/Report/CustomersReport.php
index 484cd77e4f..a6ec7c79ea 100644
--- a/src/CoreShop/Bundle/CoreBundle/Report/CustomersReport.php
+++ b/src/CoreShop/Bundle/CoreBundle/Report/CustomersReport.php
@@ -1,17 +1,21 @@
db->fetchAllAssociative($query, [$from->getTimestamp(), $to->getTimestamp()]);
- $this->totalRecords = (int)$this->db->fetchOne('SELECT FOUND_ROWS()');
+ $this->totalRecords = (int) $this->db->fetchOne('SELECT FOUND_ROWS()');
foreach ($results as &$result) {
$result['salesFormatted'] = $this->moneyFormatter->format(
- (int)$result['sales'],
+ (int) $result['sales'],
'EUR',
- $this->localeContext->getLocaleCode()
+ $this->localeContext->getLocaleCode(),
);
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Report/ManufacturerReport.php b/src/CoreShop/Bundle/CoreBundle/Report/ManufacturerReport.php
index c55d71e707..9711797321 100644
--- a/src/CoreShop/Bundle/CoreBundle/Report/ManufacturerReport.php
+++ b/src/CoreShop/Bundle/CoreBundle/Report/ManufacturerReport.php
@@ -1,17 +1,21 @@
getFieldDefinition('name')) {
+ if (!$manufacturerClass->getFieldDefinition('name')) {
$localizedFields = $manufacturerClass->getFieldDefinition('localizedfields');
- if($localizedFields instanceof ClassDefinition\Data\Localizedfields && $localizedFields->getFieldDefinition('name')) {
+ if ($localizedFields instanceof ClassDefinition\Data\Localizedfields && $localizedFields->getFieldDefinition('name')) {
$nameIsLocalized = true;
}
}
- $query = "
+ $query = '
SELECT SQL_CALC_FOUND_ROWS
`manufacturers`.oo_id as manufacturerId,
`manufacturers`.name as manufacturerName,
@@ -86,12 +96,12 @@ public function getReportData(ParameterBag $parameterBag): array
SUM((orderItems.itemRetailPriceNet - orderItems.itemWholesalePrice) * orderItems.quantity) AS profit,
SUM(orderItems.quantity) AS `quantityCount`,
COUNT(orderItems.product__id) AS `orderCount`
- FROM ".($nameIsLocalized ? 'object_localized_'.$manufacturerClassId.'_'.$this->localeService->getLocaleCode() : 'object_'.$manufacturerClassId)." AS manufacturers
+ FROM ' . ($nameIsLocalized ? 'object_localized_' . $manufacturerClassId . '_' . $this->localeService->getLocaleCode() : 'object_' . $manufacturerClassId) . " AS manufacturers
INNER JOIN dependencies AS manProductDependencies ON manProductDependencies.targetId = manufacturers.oo_id AND manProductDependencies.targettype = \"object\"
INNER JOIN object_query_$orderItemClassId AS orderItems ON orderItems.product__id = manProductDependencies.sourceid
INNER JOIN object_relations_$orderClassId AS orderRelations ON orderRelations.dest_id = orderItems.oo_id AND orderRelations.fieldname = \"items\"
INNER JOIN object_query_$orderClassId AS `orders` ON `orders`.oo_id = orderRelations.src_id
- WHERE orders.store = $storeId".(($orderStateFilter !== null) ? " AND `orders`.orderState IN (".rtrim(str_repeat('?,', count($orderStateFilter)), ',').")" : "")." AND orders.orderDate > ? AND orders.orderDate < ? AND orderItems.product__id IS NOT NULL
+ WHERE orders.store = $storeId" . (($orderStateFilter !== null) ? ' AND `orders`.orderState IN (' . rtrim(str_repeat('?,', count($orderStateFilter)), ',') . ')' : '') . " AND orders.orderDate > ? AND orders.orderDate < ? AND orderItems.product__id IS NOT NULL
GROUP BY manufacturers.oo_id
ORDER BY quantityCount DESC
LIMIT $offset,$limit";
@@ -104,7 +114,7 @@ public function getReportData(ParameterBag $parameterBag): array
$queryParameters[] = $to->getTimestamp();
$results = $this->db->fetchAllAssociative($query, $queryParameters);
- $this->totalRecords = (int)$this->db->fetchOne('SELECT FOUND_ROWS()');
+ $this->totalRecords = (int) $this->db->fetchOne('SELECT FOUND_ROWS()');
$data = [];
foreach ($results as $result) {
@@ -116,8 +126,8 @@ public function getReportData(ParameterBag $parameterBag): array
'profit' => $result['profit'],
'quantityCount' => $result['quantityCount'],
'orderCount' => $result['orderCount'],
- 'salesFormatted' => $this->moneyFormatter->format((int)$result['sales'], $store->getCurrency()->getIsoCode(), $this->localeService->getLocaleCode()),
- 'profitFormatted' => $this->moneyFormatter->format((int)$result['profit'], $store->getCurrency()->getIsoCode(), $this->localeService->getLocaleCode()),
+ 'salesFormatted' => $this->moneyFormatter->format((int) $result['sales'], $store->getCurrency()->getIsoCode(), $this->localeService->getLocaleCode()),
+ 'profitFormatted' => $this->moneyFormatter->format((int) $result['profit'], $store->getCurrency()->getIsoCode(), $this->localeService->getLocaleCode()),
];
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Report/PaymentProvidersReport.php b/src/CoreShop/Bundle/CoreBundle/Report/PaymentProvidersReport.php
index 96118a06ca..c2dd2f24b3 100644
--- a/src/CoreShop/Bundle/CoreBundle/Report/PaymentProvidersReport.php
+++ b/src/CoreShop/Bundle/CoreBundle/Report/PaymentProvidersReport.php
@@ -1,17 +1,21 @@
$paymentProvider instanceof PaymentProviderInterface ? $paymentProvider->getTitle() : 'unkown',
- 'data' => (float)$result['percentage'],
+ 'data' => (float) $result['percentage'],
];
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Report/ProductsReport.php b/src/CoreShop/Bundle/CoreBundle/Report/ProductsReport.php
index 47eb978467..1356982981 100644
--- a/src/CoreShop/Bundle/CoreBundle/Report/ProductsReport.php
+++ b/src/CoreShop/Bundle/CoreBundle/Report/ProductsReport.php
@@ -1,17 +1,21 @@
get('to', strtotime(date('t-m-Y')));
$objectTypeFilter = $parameterBag->get('objectType', 'all');
$orderStateFilter = $parameterBag->get('orderState');
- if($orderStateFilter) {
+ if ($orderStateFilter) {
$orderStateFilter = \json_decode($orderStateFilter, true);
}
@@ -95,7 +104,7 @@ public function getReportData(ParameterBag $parameterBag): array
INNER JOIN object_query_$orderItemClassId AS orderItems ON products.o_id = orderItems.mainObjectId
INNER JOIN object_relations_$orderClassId AS orderRelations ON orderRelations.dest_id = orderItems.oo_id AND orderRelations.fieldname = \"items\"
INNER JOIN object_query_$orderClassId AS `order` ON `order`.oo_id = orderRelations.src_id
- WHERE products.o_type = 'object' AND `order`.store = $storeId".(($orderStateFilter !== null) ? " AND `order`.orderState IN (".rtrim(str_repeat('?,', count($orderStateFilter)), ',').")":"")." AND `order`.orderDate > ? AND `order`.orderDate < ?
+ WHERE products.o_type = 'object' AND `order`.store = $storeId" . (($orderStateFilter !== null) ? ' AND `order`.orderState IN (' . rtrim(str_repeat('?,', count($orderStateFilter)), ',') . ')' : '') . " AND `order`.orderDate > ? AND `order`.orderDate < ?
GROUP BY products.o_id
LIMIT $offset,$limit";
} else {
@@ -121,7 +130,7 @@ public function getReportData(ParameterBag $parameterBag): array
INNER JOIN object_relations_$orderClassId AS orderRelations ON orderRelations.src_id = orders.oo_id AND orderRelations.fieldname = \"items\"
INNER JOIN object_query_$orderItemClassId AS orderItems ON orderRelations.dest_id = orderItems.oo_id
INNER JOIN object_localized_query_" . $orderItemClassId . '_' . $locale . " AS orderItemsTranslated ON orderItems.oo_id = orderItemsTranslated.ooo_id
- WHERE `orders`.store = $storeId AND $productTypeCondition".(($orderStateFilter !== null) ? " AND `orders`.orderState IN (".rtrim(str_repeat('?,', count($orderStateFilter)),',').")" : "")." AND `orders`.orderDate > ? AND `orders`.orderDate < ?
+ WHERE `orders`.store = $storeId AND $productTypeCondition" . (($orderStateFilter !== null) ? ' AND `orders`.orderState IN (' . rtrim(str_repeat('?,', count($orderStateFilter)), ',') . ')' : '') . " AND `orders`.orderDate > ? AND `orders`.orderDate < ?
GROUP BY orderItems.objectId
ORDER BY orderCount DESC
LIMIT $offset,$limit";
@@ -132,15 +141,14 @@ public function getReportData(ParameterBag $parameterBag): array
$queryParameters[] = $from->getTimestamp();
$queryParameters[] = $to->getTimestamp();
-
$productSales = $this->db->fetchAllAssociative($query, $queryParameters);
- $this->totalRecords = (int)$this->db->fetchOne('SELECT FOUND_ROWS()');
+ $this->totalRecords = (int) $this->db->fetchOne('SELECT FOUND_ROWS()');
foreach ($productSales as &$sale) {
- $sale['salesPriceFormatted'] = $this->moneyFormatter->format((int)$sale['salesPrice'], $store->getCurrency()->getIsoCode(), $locale);
- $sale['salesFormatted'] = $this->moneyFormatter->format((int)$sale['sales'], $store->getCurrency()->getIsoCode(), $locale);
- $sale['profitFormatted'] = $this->moneyFormatter->format((int)$sale['profit'], $store->getCurrency()->getIsoCode(), $locale);
+ $sale['salesPriceFormatted'] = $this->moneyFormatter->format((int) $sale['salesPrice'], $store->getCurrency()->getIsoCode(), $locale);
+ $sale['salesFormatted'] = $this->moneyFormatter->format((int) $sale['sales'], $store->getCurrency()->getIsoCode(), $locale);
+ $sale['profitFormatted'] = $this->moneyFormatter->format((int) $sale['profit'], $store->getCurrency()->getIsoCode(), $locale);
$sale['name'] = $sale['productName'] . ' (Id: ' . $sale['productId'] . ')';
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Report/SalesReport.php b/src/CoreShop/Bundle/CoreBundle/Report/SalesReport.php
index e4f3e908cd..88bc0bd5a8 100644
--- a/src/CoreShop/Bundle/CoreBundle/Report/SalesReport.php
+++ b/src/CoreShop/Bundle/CoreBundle/Report/SalesReport.php
@@ -1,17 +1,21 @@
$date->getTimestamp(),
'datetext' => $date->format($dateFormatter),
'sales' => $result['total'],
- 'salesFormatted' => $this->moneyFormatter->format((int)$result['total'], $store->getCurrency()->getIsoCode(), $this->localeContext->getLocaleCode()),
+ 'salesFormatted' => $this->moneyFormatter->format((int) $result['total'], $store->getCurrency()->getIsoCode(), $this->localeContext->getLocaleCode()),
];
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Report/VouchersReport.php b/src/CoreShop/Bundle/CoreBundle/Report/VouchersReport.php
index 3fa9f974a3..4431e40e2d 100644
--- a/src/CoreShop/Bundle/CoreBundle/Report/VouchersReport.php
+++ b/src/CoreShop/Bundle/CoreBundle/Report/VouchersReport.php
@@ -1,17 +1,21 @@
db->fetchAllAssociative($sqlQuery, [$from->getTimestamp(), $to->getTimestamp()]);
- $this->totalRecords = (int)$this->db->fetchOne('SELECT FOUND_ROWS()');
+ $this->totalRecords = (int) $this->db->fetchOne('SELECT FOUND_ROWS()');
foreach ($results as $result) {
$date = Carbon::createFromTimestamp($result['orderDate']);
@@ -83,7 +92,7 @@ public function getReportData(ParameterBag $parameterBag): array
'usedDate' => $date->getTimestamp(),
'code' => $result['code'],
'rule' => !empty($result['rule']) ? $result['rule'] : '--',
- 'discount' => $this->moneyFormatter->format((int)$result['discount'], $store->getCurrency()->getIsoCode(), $this->localeContext->getLocaleCode()),
+ 'discount' => $this->moneyFormatter->format((int) $result['discount'], $store->getCurrency()->getIsoCode(), $this->localeContext->getLocaleCode()),
];
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Resources/public/pimcore/css/core.css b/src/CoreShop/Bundle/CoreBundle/Resources/public/pimcore/css/core.css
index 006178b5ac..2d29e8d243 100644
--- a/src/CoreShop/Bundle/CoreBundle/Resources/public/pimcore/css/core.css
+++ b/src/CoreShop/Bundle/CoreBundle/Resources/public/pimcore/css/core.css
@@ -1,13 +1,17 @@
-/**
- * CoreShop.
+/*
+ * CoreShop
*
- * This source file is subject to the GNU General Public License version 3 (GPLv3)
- * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
- * files that are distributed with this source code.
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
* @license https://www.coreshop.org/license GPLv3 and CCL
+ *
*/
+
.td-icon {
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Resources/public/pimcore/js/coreExtension/data/coreShopStoreValues.js b/src/CoreShop/Bundle/CoreBundle/Resources/public/pimcore/js/coreExtension/data/coreShopStoreValues.js
index d3ebfd4c8d..2f3c17f3b4 100755
--- a/src/CoreShop/Bundle/CoreBundle/Resources/public/pimcore/js/coreExtension/data/coreShopStoreValues.js
+++ b/src/CoreShop/Bundle/CoreBundle/Resources/public/pimcore/js/coreExtension/data/coreShopStoreValues.js
@@ -1,12 +1,15 @@
-/**
- * CoreShop.
+/*
+ * CoreShop
*
- * This source file is subject to the GNU General Public License version 3 (GPLv3)
- * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
- * files that are distributed with this source code.
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
* @license https://www.coreshop.org/license GPLv3 and CCL
+ *
*/
pimcore.registerNS('pimcore.object.classes.data.coreShopStoreValues');
diff --git a/src/CoreShop/Bundle/CoreBundle/Resources/public/pimcore/js/coreExtension/tags/coreShopStoreValues.js b/src/CoreShop/Bundle/CoreBundle/Resources/public/pimcore/js/coreExtension/tags/coreShopStoreValues.js
index 59f2eba21d..1e87a1ed33 100755
--- a/src/CoreShop/Bundle/CoreBundle/Resources/public/pimcore/js/coreExtension/tags/coreShopStoreValues.js
+++ b/src/CoreShop/Bundle/CoreBundle/Resources/public/pimcore/js/coreExtension/tags/coreShopStoreValues.js
@@ -1,12 +1,15 @@
-/**
- * CoreShop.
+/*
+ * CoreShop
*
- * This source file is subject to the GNU General Public License version 3 (GPLv3)
- * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
- * files that are distributed with this source code.
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
* @license https://www.coreshop.org/license GPLv3 and CCL
+ *
*/
pimcore.registerNS('pimcore.object.tags.coreShopStoreValues');
diff --git a/src/CoreShop/Bundle/CoreBundle/Resources/public/pimcore/js/product/storevalues/builder.js b/src/CoreShop/Bundle/CoreBundle/Resources/public/pimcore/js/product/storevalues/builder.js
index b6e6196d10..51ce40b782 100644
--- a/src/CoreShop/Bundle/CoreBundle/Resources/public/pimcore/js/product/storevalues/builder.js
+++ b/src/CoreShop/Bundle/CoreBundle/Resources/public/pimcore/js/product/storevalues/builder.js
@@ -1,12 +1,15 @@
-/**
- * CoreShop.
+/*
+ * CoreShop
*
- * This source file is subject to the GNU General Public License version 3 (GPLv3)
- * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
- * files that are distributed with this source code.
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
* @license https://www.coreshop.org/license GPLv3 and CCL
+ *
*/
pimcore.registerNS('coreshop.product.storeValues.builder');
diff --git a/src/CoreShop/Bundle/CoreBundle/Resources/public/pimcore/js/product/storevalues/items/price.js b/src/CoreShop/Bundle/CoreBundle/Resources/public/pimcore/js/product/storevalues/items/price.js
index 2bb70be0ee..cc0c73ed20 100644
--- a/src/CoreShop/Bundle/CoreBundle/Resources/public/pimcore/js/product/storevalues/items/price.js
+++ b/src/CoreShop/Bundle/CoreBundle/Resources/public/pimcore/js/product/storevalues/items/price.js
@@ -1,12 +1,15 @@
-/**
- * CoreShop.
+/*
+ * CoreShop
*
- * This source file is subject to the GNU General Public License version 3 (GPLv3)
- * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
- * files that are distributed with this source code.
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
* @license https://www.coreshop.org/license GPLv3 and CCL
+ *
*/
pimcore.registerNS('coreshop.product.storeValues.items.price');
diff --git a/src/CoreShop/Bundle/CoreBundle/Resources/public/pimcore/js/product/storevalues/items/unitPrice.js b/src/CoreShop/Bundle/CoreBundle/Resources/public/pimcore/js/product/storevalues/items/unitPrice.js
index 33f6c63897..494897f837 100644
--- a/src/CoreShop/Bundle/CoreBundle/Resources/public/pimcore/js/product/storevalues/items/unitPrice.js
+++ b/src/CoreShop/Bundle/CoreBundle/Resources/public/pimcore/js/product/storevalues/items/unitPrice.js
@@ -1,12 +1,15 @@
-/**
- * CoreShop.
+/*
+ * CoreShop
*
- * This source file is subject to the GNU General Public License version 3 (GPLv3)
- * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
- * files that are distributed with this source code.
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
* @license https://www.coreshop.org/license GPLv3 and CCL
+ *
*/
pimcore.registerNS('coreshop.product.storeValues.items.unitPrice');
diff --git a/src/CoreShop/Bundle/CoreBundle/Resources/public/pimcore/js/product/units/builder.js b/src/CoreShop/Bundle/CoreBundle/Resources/public/pimcore/js/product/units/builder.js
index 576d0f2f75..35a8b6e839 100644
--- a/src/CoreShop/Bundle/CoreBundle/Resources/public/pimcore/js/product/units/builder.js
+++ b/src/CoreShop/Bundle/CoreBundle/Resources/public/pimcore/js/product/units/builder.js
@@ -1,12 +1,15 @@
-/**
- * CoreShop.
+/*
+ * CoreShop
*
- * This source file is subject to the GNU General Public License version 3 (GPLv3)
- * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
- * files that are distributed with this source code.
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
* @license https://www.coreshop.org/license GPLv3 and CCL
+ *
*/
coreshop.product.unit.builder = Class.create(coreshop.product.unit.builder, {
diff --git a/src/CoreShop/Bundle/CoreBundle/Security/AccessVoter.php b/src/CoreShop/Bundle/CoreBundle/Security/AccessVoter.php
index c817c020f1..417c32d57c 100644
--- a/src/CoreShop/Bundle/CoreBundle/Security/AccessVoter.php
+++ b/src/CoreShop/Bundle/CoreBundle/Security/AccessVoter.php
@@ -1,17 +1,21 @@
getResponse();
foreach ($this->responseCookies as $name => $value) {
- $response->headers->setCookie(new Cookie($name, (string)$value));
+ $response->headers->setCookie(new Cookie($name, (string) $value));
}
$this->requestCookies = new ParameterBag();
diff --git a/src/CoreShop/Bundle/CoreBundle/Storage/SessionStorage.php b/src/CoreShop/Bundle/CoreBundle/Storage/SessionStorage.php
index fdffe48bd7..24b4c0fc98 100644
--- a/src/CoreShop/Bundle/CoreBundle/Storage/SessionStorage.php
+++ b/src/CoreShop/Bundle/CoreBundle/Storage/SessionStorage.php
@@ -1,17 +1,21 @@
attributes->get('stepIdentifier');
@@ -106,8 +110,8 @@ public function getStep(string $type = ''): ?string
sprintf(
'invalid identifier guess "%s", available guesses are: %s',
$type,
- implode(', ', $validGuesser)
- )
+ implode(', ', $validGuesser),
+ ),
);
}
@@ -121,6 +125,7 @@ public function getStep(string $type = ''): ?string
/**
* @var string|null $stepIdentifier
+ *
* @psalm-var string|null $stepIdentifier
*/
$stepIdentifier = $request->attributes->get('stepIdentifier');
@@ -131,11 +136,12 @@ public function getStep(string $type = ''): ?string
protected function getPreviousStepIdentifier(
OrderInterface $cart,
?string $stepIdentifier,
- CheckoutManagerInterface $checkoutManager
+ CheckoutManagerInterface $checkoutManager,
): ?string {
$request = $this->requestStack->getMainRequest();
/**
* @var string|null $previousIdentifier
+ *
* @psalm-var string|null $previousIdentifier
*/
$previousIdentifier = $request->attributes->get('stepIdentifier');
@@ -154,7 +160,7 @@ protected function getPreviousStepIdentifier(
protected function getCurrentStepIdentifier(
OrderInterface $cart,
?string $stepIdentifier,
- CheckoutManagerInterface $checkoutManager
+ CheckoutManagerInterface $checkoutManager,
): ?string {
return $stepIdentifier;
}
@@ -162,7 +168,7 @@ protected function getCurrentStepIdentifier(
protected function getFirstStepIdentifier(
OrderInterface $cart,
?string $stepIdentifier,
- CheckoutManagerInterface $checkoutManager
+ CheckoutManagerInterface $checkoutManager,
): string {
$steps = $checkoutManager->getSteps();
@@ -172,7 +178,7 @@ protected function getFirstStepIdentifier(
protected function getLastStepIdentifier(
OrderInterface $cart,
?string $stepIdentifier,
- CheckoutManagerInterface $checkoutManager
+ CheckoutManagerInterface $checkoutManager,
): string {
$steps = $checkoutManager->getSteps();
@@ -182,7 +188,7 @@ protected function getLastStepIdentifier(
protected function getNextStepIdentifier(
OrderInterface $cart,
?string $stepIdentifier,
- CheckoutManagerInterface $checkoutManager
+ CheckoutManagerInterface $checkoutManager,
): ?string {
$identifier = null;
diff --git a/src/CoreShop/Bundle/CoreBundle/Twig/ConfigurationExtension.php b/src/CoreShop/Bundle/CoreBundle/Twig/ConfigurationExtension.php
index 5262cbfdbb..f4201a4173 100644
--- a/src/CoreShop/Bundle/CoreBundle/Twig/ConfigurationExtension.php
+++ b/src/CoreShop/Bundle/CoreBundle/Twig/ConfigurationExtension.php
@@ -1,17 +1,21 @@
purchasableCalculator->getPrice($product, $context);
$price = $this->quantityReferenceDetector->detectRangePrice($product, $range, $realItemPrice, $context);
diff --git a/src/CoreShop/Bundle/CoreBundle/Twig/ProductTaxExtension.php b/src/CoreShop/Bundle/CoreBundle/Twig/ProductTaxExtension.php
index a2101dde51..774a30806b 100644
--- a/src/CoreShop/Bundle/CoreBundle/Twig/ProductTaxExtension.php
+++ b/src/CoreShop/Bundle/CoreBundle/Twig/ProductTaxExtension.php
@@ -1,17 +1,21 @@
availabilityChecker->isStockSufficient(
$purchasable,
- $cartItem->getDefaultUnitQuantity() + $this->getExistingCartItemQuantityFromCart($cart, $cartItem)
+ $cartItem->getDefaultUnitQuantity() + $this->getExistingCartItemQuantityFromCart($cart, $cartItem),
);
if (!$isStockSufficient) {
$this->context->addViolation(
$constraint->message,
- ['%stockable%' => $purchasable->getInventoryName()]
+ ['%stockable%' => $purchasable->getInventoryName()],
);
}
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/AddToCartMaximumQuantity.php b/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/AddToCartMaximumQuantity.php
index c750b75fad..6a6a63eae0 100644
--- a/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/AddToCartMaximumQuantity.php
+++ b/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/AddToCartMaximumQuantity.php
@@ -1,17 +1,21 @@
$purchasable->getInventoryName(),
'%limit%' => $maxLimit,
- ]
+ ],
);
}
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/AddToCartMinimumQuantity.php b/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/AddToCartMinimumQuantity.php
index 00d4da5b0b..2566bdd557 100644
--- a/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/AddToCartMinimumQuantity.php
+++ b/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/AddToCartMinimumQuantity.php
@@ -1,17 +1,21 @@
$purchasable->getInventoryName(),
'%limit%' => $minLimit,
- ]
+ ],
);
}
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/CartMaximumQuantity.php b/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/CartMaximumQuantity.php
index 0d3eb0745b..d1347f4d31 100644
--- a/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/CartMaximumQuantity.php
+++ b/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/CartMaximumQuantity.php
@@ -1,17 +1,21 @@
getMaximumQuantityToOrder();
$higherThenMaximum = $this->quantityValidatorService->isHigherThenMaxLimit(
$maxLimit,
- $this->getExistingCartItemQuantityFromCart($value, $cartItem)
+ $this->getExistingCartItemQuantityFromCart($value, $cartItem),
);
$productsChecked[] = $product->getId();
@@ -90,7 +94,7 @@ public function validate($value, Constraint $constraint): void
[
'%stockable%' => $invalidProduct->getInventoryName(),
'%limit%' => $maxLimit,
- ]
+ ],
);
}
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/CartMinimumQuantity.php b/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/CartMinimumQuantity.php
index de2e79450e..98d31fc05c 100644
--- a/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/CartMinimumQuantity.php
+++ b/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/CartMinimumQuantity.php
@@ -1,17 +1,21 @@
getMinimumQuantityToOrder();
$lowerThenMinimum = $this->quantityValidatorService->isLowerThenMinLimit(
$minLimit,
- $this->getExistingCartItemQuantityFromCart($value, $cartItem)
+ $this->getExistingCartItemQuantityFromCart($value, $cartItem),
);
if (!in_array($product->getId(), $productsChecked, true)) {
@@ -92,7 +96,7 @@ public function validate($value, Constraint $constraint): void
[
'%stockable%' => $invalidProduct->getInventoryName(),
'%limit%' => $minLimit,
- ]
+ ],
);
}
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/CartStockAvailability.php b/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/CartStockAvailability.php
index 24f5db3d9f..3a7ffbb7a1 100644
--- a/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/CartStockAvailability.php
+++ b/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/CartStockAvailability.php
@@ -1,17 +1,21 @@
availabilityChecker->isStockSufficient(
$product,
- $this->getExistingCartItemQuantityFromCart($value, $cartItem)
+ $this->getExistingCartItemQuantityFromCart($value, $cartItem),
);
$productsChecked[] = $product->getId();
@@ -72,7 +76,7 @@ public function validate($value, Constraint $constraint): void
if (!$isStockSufficient && $insufficientProduct instanceof StockableInterface) {
$this->context->addViolation(
$constraint->message,
- ['%stockable%' => $insufficientProduct->getInventoryName()]
+ ['%stockable%' => $insufficientProduct->getInventoryName()],
);
}
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/QuantityRangePriceCurrencyAware.php b/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/QuantityRangePriceCurrencyAware.php
index aae5910c0a..39f4778b03 100644
--- a/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/QuantityRangePriceCurrencyAware.php
+++ b/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/QuantityRangePriceCurrencyAware.php
@@ -1,17 +1,21 @@
getCurrency() instanceof CurrencyInterface) {
$this->context->buildViolation($constraint->message)
->setParameter('{{ rangeStartingFrom }}', sprintf('Range starting from %d', $value->getRangeStartingFrom()))
- ->addViolation();
+ ->addViolation()
+ ;
}
}
}
diff --git a/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/RegisteredUser.php b/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/RegisteredUser.php
index c6b26b90b2..1548cd01c4 100644
--- a/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/RegisteredUser.php
+++ b/src/CoreShop/Bundle/CoreBundle/Validator/Constraints/RegisteredUser.php
@@ -1,17 +1,21 @@
getCurrency()) {
- $currency = $this->getCurrencyById((int)$data->getCurrency()->getId());
+ $currency = $this->getCurrencyById((int) $data->getCurrency()->getId());
return new Money($data->getValue(), $currency);
}
@@ -177,7 +181,7 @@ public function getDataFromResource($data, $object = null, $params = [])
$currency = $this->getCurrencyById($data[$this->getName() . '__currency']);
if (null !== $currency) {
- return new \CoreShop\Component\Currency\Model\Money((int)($data[$this->getName() . '__value'] ?? 0), $currency);
+ return new \CoreShop\Component\Currency\Model\Money((int) ($data[$this->getName() . '__value'] ?? 0), $currency);
}
}
@@ -237,19 +241,19 @@ public function checkValidity($data, $omitMandatoryCheck = false, $params = [])
if (!$this->isEmpty($data) && !$omitMandatoryCheck) {
if ($data->getValue() >= \PHP_INT_MAX) {
throw new Model\Element\ValidationException(
- 'Value exceeds PHP_INT_MAX please use an input data type instead of numeric!'
+ 'Value exceeds PHP_INT_MAX please use an input data type instead of numeric!',
);
}
- if ((string)$this->getMinValue() !== '' && $this->getMinValue() > $data->getValue()) {
+ if ((string) $this->getMinValue() !== '' && $this->getMinValue() > $data->getValue()) {
throw new Model\Element\ValidationException(
- 'Value in field [ ' . $this->getName() . ' ] is not at least ' . $this->getMinValue()
+ 'Value in field [ ' . $this->getName() . ' ] is not at least ' . $this->getMinValue(),
);
}
- if ((string)$this->getMaxValue() !== '' && $data->getValue() > $this->getMaxValue()) {
+ if ((string) $this->getMaxValue() !== '' && $data->getValue() > $this->getMaxValue()) {
throw new Model\Element\ValidationException(
- 'Value in field [ ' . $this->getName() . ' ] is bigger than ' . $this->getMaxValue()
+ 'Value in field [ ' . $this->getName() . ' ] is bigger than ' . $this->getMaxValue(),
);
}
}
@@ -326,6 +330,6 @@ protected function getDecimalFactor()
*/
protected function toNumeric($value): float|int
{
- return (int)round($value * $this->getDecimalFactor());
+ return (int) round($value * $this->getDecimalFactor());
}
}
diff --git a/src/CoreShop/Bundle/CurrencyBundle/CoreShopCurrencyBundle.php b/src/CoreShop/Bundle/CurrencyBundle/CoreShopCurrencyBundle.php
index 54be747347..449cfe001d 100644
--- a/src/CoreShop/Bundle/CurrencyBundle/CoreShopCurrencyBundle.php
+++ b/src/CoreShop/Bundle/CurrencyBundle/CoreShopCurrencyBundle.php
@@ -1,17 +1,21 @@
doctrineProvider = $doctrineProvider;
@@ -47,7 +54,7 @@ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class
'type' => $this->getFieldType($fieldDefinition, $class, $container),
'resolve' => $this->getResolver($attribute, $fieldDefinition, $class),
],
- $container
+ $container,
);
}
diff --git a/src/CoreShop/Bundle/CurrencyBundle/DependencyInjection/Compiler/CompositeCurrencyContextPass.php b/src/CoreShop/Bundle/CurrencyBundle/DependencyInjection/Compiler/CompositeCurrencyContextPass.php
index 5fbbe6e34b..ac98d5bc3d 100644
--- a/src/CoreShop/Bundle/CurrencyBundle/DependencyInjection/Compiler/CompositeCurrencyContextPass.php
+++ b/src/CoreShop/Bundle/CurrencyBundle/DependencyInjection/Compiler/CompositeCurrencyContextPass.php
@@ -1,17 +1,21 @@
children()
->integerNode('money_decimal_factor')->defaultValue(100)->end()
->integerNode('money_decimal_precision')->defaultValue(2)->end()
- ->end();
+ ->end()
+ ;
$this->addModelsSection($rootNode);
$this->addPimcoreResourcesSection($rootNode);
@@ -93,7 +98,8 @@ private function addModelsSection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
@@ -124,6 +130,7 @@ private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/CurrencyBundle/DependencyInjection/CoreShopCurrencyExtension.php b/src/CoreShop/Bundle/CurrencyBundle/DependencyInjection/CoreShopCurrencyExtension.php
index f73e0f1caf..62b8b6566c 100644
--- a/src/CoreShop/Bundle/CurrencyBundle/DependencyInjection/CoreShopCurrencyExtension.php
+++ b/src/CoreShop/Bundle/CurrencyBundle/DependencyInjection/CoreShopCurrencyExtension.php
@@ -1,17 +1,21 @@
registerForAutoconfiguration(CurrencyContextInterface::class)
- ->addTag(CompositeCurrencyContextPass::CURRENCY_CONTEXT_SERVICE_TAG);
+ ->addTag(CompositeCurrencyContextPass::CURRENCY_CONTEXT_SERVICE_TAG)
+ ;
}
}
diff --git a/src/CoreShop/Bundle/CurrencyBundle/Doctrine/ORM/CurrencyRepository.php b/src/CoreShop/Bundle/CurrencyBundle/Doctrine/ORM/CurrencyRepository.php
index 56d47ca7fa..77dafb4f87 100644
--- a/src/CoreShop/Bundle/CurrencyBundle/Doctrine/ORM/CurrencyRepository.php
+++ b/src/CoreShop/Bundle/CurrencyBundle/Doctrine/ORM/CurrencyRepository.php
@@ -1,17 +1,21 @@
innerJoin('o.countries', 'c')
->andWhere('c.active = true')
->getQuery()
- ->getResult();
+ ->getResult()
+ ;
}
public function getByCode(string $currencyCode): ?CurrencyInterface
@@ -41,6 +46,7 @@ public function getByCode(string $currencyCode): ?CurrencyInterface
->andWhere('o.isoCode = :currencyCode')
->setParameter('currencyCode', $currencyCode)
->getQuery()
- ->getOneOrNullResult();
+ ->getOneOrNullResult()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/CurrencyBundle/Doctrine/ORM/ExchangeRateRepository.php b/src/CoreShop/Bundle/CurrencyBundle/Doctrine/ORM/ExchangeRateRepository.php
index 2f5bb746f3..63a3be94aa 100644
--- a/src/CoreShop/Bundle/CurrencyBundle/Doctrine/ORM/ExchangeRateRepository.php
+++ b/src/CoreShop/Bundle/CurrencyBundle/Doctrine/ORM/ExchangeRateRepository.php
@@ -1,17 +1,21 @@
createQueryBuilder('o')
->andWhere($expr->orX(
'o.fromCurrency = :firstCurrency AND o.toCurrency = :secondCurrency',
- 'o.toCurrency = :firstCurrency AND o.fromCurrency = :secondCurrency'
+ 'o.toCurrency = :firstCurrency AND o.fromCurrency = :secondCurrency',
))
->setParameter('firstCurrency', $fromCurrency)
->setParameter('secondCurrency', $toCurrency)
->getQuery()
- ->getOneOrNullResult();
+ ->getOneOrNullResult()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/CurrencyBundle/Form/Type/CurrencyChoiceType.php b/src/CoreShop/Bundle/CurrencyBundle/Form/Type/CurrencyChoiceType.php
index 1cbc42e514..cbea961efe 100644
--- a/src/CoreShop/Bundle/CurrencyBundle/Form/Type/CurrencyChoiceType.php
+++ b/src/CoreShop/Bundle/CurrencyBundle/Form/Type/CurrencyChoiceType.php
@@ -1,17 +1,21 @@
'id',
'choice_label' => 'name',
'choice_translation_domain' => false,
- ]);
+ ])
+ ;
}
public function getParent(): string
diff --git a/src/CoreShop/Bundle/CurrencyBundle/Form/Type/CurrencyType.php b/src/CoreShop/Bundle/CurrencyBundle/Form/Type/CurrencyType.php
index d5825c0010..1a84816ac6 100644
--- a/src/CoreShop/Bundle/CurrencyBundle/Form/Type/CurrencyType.php
+++ b/src/CoreShop/Bundle/CurrencyBundle/Form/Type/CurrencyType.php
@@ -1,17 +1,21 @@
add('name', TextType::class)
->add('isoCode', TextType::class)
->add('numericIsoCode', IntegerType::class)
- ->add('symbol', TextType::class);
+ ->add('symbol', TextType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/CurrencyBundle/Form/Type/ExchangeRateType.php b/src/CoreShop/Bundle/CurrencyBundle/Form/Type/ExchangeRateType.php
index 40e97ad9dc..a15bcecf85 100644
--- a/src/CoreShop/Bundle/CurrencyBundle/Form/Type/ExchangeRateType.php
+++ b/src/CoreShop/Bundle/CurrencyBundle/Form/Type/ExchangeRateType.php
@@ -1,17 +1,21 @@
add('toCurrency', CurrencyChoiceType::class, [
'required' => true,
'empty_data' => false,
- ]);
+ ])
+ ;
}
public function configureOptions(OptionsResolver $resolver): void
diff --git a/src/CoreShop/Bundle/CurrencyBundle/Resources/public/pimcore/css/currency.css b/src/CoreShop/Bundle/CurrencyBundle/Resources/public/pimcore/css/currency.css
index e73160d51b..4b17da3dfe 100644
--- a/src/CoreShop/Bundle/CurrencyBundle/Resources/public/pimcore/css/currency.css
+++ b/src/CoreShop/Bundle/CurrencyBundle/Resources/public/pimcore/css/currency.css
@@ -1,12 +1,15 @@
-/**
- * CoreShop.
+/*
+ * CoreShop
*
- * This source file is subject to the GNU General Public License version 3 (GPLv3)
- * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
- * files that are distributed with this source code.
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
* @license https://www.coreshop.org/license GPLv3 and CCL
+ *
*/
.coreshop_icon_currency, .pimcore_icon_coreShopCurrencyMultiselect, .pimcore_icon_coreShopCurrency, .pimcore_icon_coreShopMoneyCurrency {
diff --git a/src/CoreShop/Bundle/CurrencyBundle/Resources/public/pimcore/js/coreExtension/tags/coreShopMoneyCurrency.js b/src/CoreShop/Bundle/CurrencyBundle/Resources/public/pimcore/js/coreExtension/tags/coreShopMoneyCurrency.js
index 594e11ba8b..dab50d5098 100755
--- a/src/CoreShop/Bundle/CurrencyBundle/Resources/public/pimcore/js/coreExtension/tags/coreShopMoneyCurrency.js
+++ b/src/CoreShop/Bundle/CurrencyBundle/Resources/public/pimcore/js/coreExtension/tags/coreShopMoneyCurrency.js
@@ -1,12 +1,15 @@
-/**
- * CoreShop.
+/*
+ * CoreShop
*
- * This source file is subject to the GNU General Public License version 3 (GPLv3)
- * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
- * files that are distributed with this source code.
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
* @license https://www.coreshop.org/license GPLv3 and CCL
+ *
*/
pimcore.registerNS("pimcore.object.tags.coreShopMoneyCurrency");
diff --git a/src/CoreShop/Bundle/CurrencyBundle/Twig/ConvertCurrencyExtension.php b/src/CoreShop/Bundle/CurrencyBundle/Twig/ConvertCurrencyExtension.php
index 0bdc484c61..4ff6bf51e3 100644
--- a/src/CoreShop/Bundle/CurrencyBundle/Twig/ConvertCurrencyExtension.php
+++ b/src/CoreShop/Bundle/CurrencyBundle/Twig/ConvertCurrencyExtension.php
@@ -1,17 +1,21 @@
children()
->enumNode('login_identifier')->values(['email', 'username'])->defaultValue('email')->end()
- ->end();
+ ->end()
+ ;
$this->addStack($rootNode);
$this->addModelsSection($rootNode);
@@ -57,7 +62,8 @@ private function addStack(ArrayNodeDefinition $node): void
->scalarNode('company')->defaultValue(CompanyInterface::class)->cannotBeEmpty()->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
private function addModelsSection(ArrayNodeDefinition $node): void
@@ -130,7 +136,8 @@ private function addModelsSection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
@@ -174,6 +181,7 @@ private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/CustomerBundle/DependencyInjection/CoreShopCustomerExtension.php b/src/CoreShop/Bundle/CustomerBundle/DependencyInjection/CoreShopCustomerExtension.php
index 8ba1cef131..7937bb012d 100644
--- a/src/CoreShop/Bundle/CustomerBundle/DependencyInjection/CoreShopCustomerExtension.php
+++ b/src/CoreShop/Bundle/CustomerBundle/DependencyInjection/CoreShopCustomerExtension.php
@@ -1,17 +1,21 @@
registerForAutoconfiguration(CustomerContextInterface::class)
- ->addTag(CompositeCustomerContextPass::CUSTOMER_CONTEXT_SERVICE_TAG);
+ ->addTag(CompositeCustomerContextPass::CUSTOMER_CONTEXT_SERVICE_TAG)
+ ;
$container
->registerForAutoconfiguration(RequestResolverInterface::class)
- ->addTag(CompositeRequestResolverPass::CUSTOMER_REQUEST_RESOLVER_SERVICE_TAG);
+ ->addTag(CompositeRequestResolverPass::CUSTOMER_REQUEST_RESOLVER_SERVICE_TAG)
+ ;
}
}
diff --git a/src/CoreShop/Bundle/CustomerBundle/Form/Type/ChangePasswordType.php b/src/CoreShop/Bundle/CustomerBundle/Form/Type/ChangePasswordType.php
index 5f94e24fa9..bf005c4c01 100644
--- a/src/CoreShop/Bundle/CustomerBundle/Form/Type/ChangePasswordType.php
+++ b/src/CoreShop/Bundle/CustomerBundle/Form/Type/ChangePasswordType.php
@@ -1,17 +1,21 @@
'coreshop.form.customer.password.must_match',
'first_options' => ['label' => 'coreshop.form.customer.new_password'],
'second_options' => ['label' => 'coreshop.form.customer.new_password_repeat'],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/CustomerBundle/Form/Type/CustomerLoginType.php b/src/CoreShop/Bundle/CustomerBundle/Form/Type/CustomerLoginType.php
index 203969b279..43cb482947 100644
--- a/src/CoreShop/Bundle/CustomerBundle/Form/Type/CustomerLoginType.php
+++ b/src/CoreShop/Bundle/CustomerBundle/Form/Type/CustomerLoginType.php
@@ -1,17 +1,21 @@
add('_remember_me', CheckboxType::class, [
'label' => 'coreshop.form.login.remember_me',
'required' => false,
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/CustomerBundle/Form/Type/CustomerSelectionType.php b/src/CoreShop/Bundle/CustomerBundle/Form/Type/CustomerSelectionType.php
index 1d801442d7..82544b8c64 100644
--- a/src/CoreShop/Bundle/CustomerBundle/Form/Type/CustomerSelectionType.php
+++ b/src/CoreShop/Bundle/CustomerBundle/Form/Type/CustomerSelectionType.php
@@ -1,17 +1,21 @@
add('lastname', TextType::class, [
'label' => 'coreshop.form.customer.lastname',
- ]);
+ ])
+ ;
if ($options['allow_email']) {
$builder->add('email', EmailType::class, [
@@ -56,7 +64,8 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
->add('newsletterActive', CheckboxType::class, [
'label' => 'coreshop.form.customer.newsletter.subscribe',
'required' => false,
- ]);
+ ])
+ ;
}
public function configureOptions(OptionsResolver $resolver): void
diff --git a/src/CoreShop/Bundle/CustomerBundle/Pimcore/Repository/CompanyRepository.php b/src/CoreShop/Bundle/CustomerBundle/Pimcore/Repository/CompanyRepository.php
index 0eadbbd462..89726229d5 100644
--- a/src/CoreShop/Bundle/CustomerBundle/Pimcore/Repository/CompanyRepository.php
+++ b/src/CoreShop/Bundle/CustomerBundle/Pimcore/Repository/CompanyRepository.php
@@ -1,17 +1,21 @@
addOption('dry-run', null, InputOption::VALUE_NONE, 'Outputs list of fixtures without apply them')
->addOption(
'bundles',
null,
InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL,
- 'A list of bundle names to load data from'
+ 'A list of bundle names to load data from',
)
->addOption(
'exclude',
null,
InputOption::VALUE_IS_ARRAY | InputOption::VALUE_OPTIONAL,
- 'A list of bundle names which fixtures should be skipped'
- );
+ 'A list of bundle names which fixtures should be skipped',
+ )
+ ;
}
protected function execute(InputInterface $input, OutputInterface $output): int
@@ -138,8 +145,8 @@ protected function outputFixtures(InputInterface $input, OutputInterface $output
$output->writeln(
sprintf(
'List of "%s" data fixtures ...',
- $this->getTypeOfFixtures($input)
- )
+ $this->getTypeOfFixtures($input),
+ ),
);
foreach ($fixtures as $fixture) {
$output->writeln(sprintf(' > %s', $fixture::class));
@@ -156,21 +163,21 @@ protected function processFixtures(InputInterface $input, OutputInterface $outpu
$output->writeln(
sprintf(
'Loading "%s" data fixtures ...',
- $this->getTypeOfFixtures($input)
- )
+ $this->getTypeOfFixtures($input),
+ ),
);
$this->fixtureExecutor->setLogger(
function (string $message) use ($output) {
$output->writeln(sprintf(' > %s', $message));
- }
+ },
);
$this->fixtureExecutor->execute($fixtures, $this->getTypeOfFixtures($input));
}
protected function getTypeOfFixtures(InputInterface $input): string
{
- return (string)$input->getOption('fixtures-type');
+ return (string) $input->getOption('fixtures-type');
}
/**
diff --git a/src/CoreShop/Bundle/FixtureBundle/CoreShopFixtureBundle.php b/src/CoreShop/Bundle/FixtureBundle/CoreShopFixtureBundle.php
index 73042d9797..398e97ce8b 100644
--- a/src/CoreShop/Bundle/FixtureBundle/CoreShopFixtureBundle.php
+++ b/src/CoreShop/Bundle/FixtureBundle/CoreShopFixtureBundle.php
@@ -1,17 +1,21 @@
end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/FixtureBundle/DependencyInjection/CoreShopFixtureExtension.php b/src/CoreShop/Bundle/FixtureBundle/DependencyInjection/CoreShopFixtureExtension.php
index 883a1e40dc..a53c41e1da 100644
--- a/src/CoreShop/Bundle/FixtureBundle/DependencyInjection/CoreShopFixtureExtension.php
+++ b/src/CoreShop/Bundle/FixtureBundle/DependencyInjection/CoreShopFixtureExtension.php
@@ -1,17 +1,21 @@
createQueryBuilder('t')
->select('t.' . $idField)
->getQuery()
- ->getArrayResult();
+ ->getArrayResult()
+ ;
$ids = [];
foreach ($idsResult as $result) {
diff --git a/src/CoreShop/Bundle/FixtureBundle/Fixture/DataFixturesExecutor.php b/src/CoreShop/Bundle/FixtureBundle/Fixture/DataFixturesExecutor.php
index ec031d1c60..ba8ff76ebd 100644
--- a/src/CoreShop/Bundle/FixtureBundle/Fixture/DataFixturesExecutor.php
+++ b/src/CoreShop/Bundle/FixtureBundle/Fixture/DataFixturesExecutor.php
@@ -1,17 +1,21 @@
loadedFixtures[$fixtureObject::class])) {
$alreadyLoaded = true;
$loadedVersion = $this->loadedFixtures[$fixtureObject::class];
- if ($fixtureObject instanceof VersionedFixtureInterface
- && version_compare($loadedVersion, $fixtureObject->getVersion()) == -1
+ if ($fixtureObject instanceof VersionedFixtureInterface &&
+ version_compare($loadedVersion, $fixtureObject->getVersion()) == -1
) {
if ($fixtureObject instanceof LoadedFixtureVersionAwareInterface) {
$fixtureObject->setLoadedVersion($loadedVersion);
diff --git a/src/CoreShop/Bundle/FixtureBundle/Fixture/Sorter/DataFixturesSorter.php b/src/CoreShop/Bundle/FixtureBundle/Fixture/Sorter/DataFixturesSorter.php
index cd6dac8f8e..854da5a467 100644
--- a/src/CoreShop/Bundle/FixtureBundle/Fixture/Sorter/DataFixturesSorter.php
+++ b/src/CoreShop/Bundle/FixtureBundle/Fixture/Sorter/DataFixturesSorter.php
@@ -1,17 +1,21 @@
orderedFixtures,
function ($fixture) {
return $fixture instanceof OrderedFixtureInterface;
- }
+ },
);
}
@@ -141,8 +145,8 @@ function ($fixture) {
$count = 0;
$unsequencedClasses = [];
- while (($count = count($unsequencedClasses = $this->getUnsequencedClasses($sequenceForClasses))) > 0
- && $count !== $lastCount) {
+ while (($count = count($unsequencedClasses = $this->getUnsequencedClasses($sequenceForClasses))) > 0 &&
+ $count !== $lastCount) {
foreach ($unsequencedClasses as $class) {
$fixture = $this->fixtures[$class];
$dependencies = $fixture->getDependencies();
@@ -191,14 +195,14 @@ private function validateDependencies($fixtureClass, $dependenciesClasses)
'Method "%s" in class "%s" must return an array of classes which are'
. ' dependencies for the fixture, and it must be NOT empty.',
'getDependencies',
- $fixtureClass
- )
+ $fixtureClass,
+ ),
);
}
if (in_array($fixtureClass, $dependenciesClasses)) {
throw new \InvalidArgumentException(
- sprintf('Class "%s" can\'t have itself as a dependency', $fixtureClass)
+ sprintf('Class "%s" can\'t have itself as a dependency', $fixtureClass),
);
}
@@ -208,8 +212,8 @@ private function validateDependencies($fixtureClass, $dependenciesClasses)
throw new \RuntimeException(
sprintf(
'Fixture "%s" was declared as a dependency, but it should be added in fixture loader first.',
- $class
- )
+ $class,
+ ),
);
}
}
diff --git a/src/CoreShop/Bundle/FixtureBundle/Fixture/UpdateDataFixturesFixture.php b/src/CoreShop/Bundle/FixtureBundle/Fixture/UpdateDataFixturesFixture.php
index 4ac0652f55..c7a6d207d9 100644
--- a/src/CoreShop/Bundle/FixtureBundle/Fixture/UpdateDataFixturesFixture.php
+++ b/src/CoreShop/Bundle/FixtureBundle/Fixture/UpdateDataFixturesFixture.php
@@ -1,17 +1,21 @@
where($where)
->setMaxResults(1)
->getQuery()
- ->execute($parameters);
+ ->execute($parameters)
+ ;
return $entityId ? true : false;
}
@@ -40,7 +45,8 @@ public function updateDataFixtureHistory(array $updateFields, $where, array $par
$qb = $this->_em
->createQueryBuilder()
->update($this->getEntityName(), 'm')
- ->where($where);
+ ->where($where)
+ ;
foreach ($updateFields as $fieldName => $fieldValue) {
$qb->set($fieldName, $fieldValue);
diff --git a/src/CoreShop/Bundle/FixtureBundle/Repository/DataFixtureRepositoryInterface.php b/src/CoreShop/Bundle/FixtureBundle/Repository/DataFixtureRepositoryInterface.php
index 688aee0e65..ac12f9663c 100644
--- a/src/CoreShop/Bundle/FixtureBundle/Repository/DataFixtureRepositoryInterface.php
+++ b/src/CoreShop/Bundle/FixtureBundle/Repository/DataFixtureRepositoryInterface.php
@@ -1,17 +1,21 @@
getData();
$code = $form->get('cartRuleCoupon')->getData();
- if(method_exists($form, 'getClickedButton')) {
+ if (method_exists($form, 'getClickedButton')) {
$submit = $form->getClickedButton();
$validateVoucherCode = $submit && 'submit_voucher' === $submit->getName();
} else {
- $validateVoucherCode = (bool)$code;
+ $validateVoucherCode = (bool) $code;
}
if ($validateVoucherCode) {
@@ -92,7 +96,7 @@ public function summaryAction(Request $request): Response
if (!$voucherCode instanceof CartPriceRuleVoucherCodeInterface) {
$this->addFlash(
'error',
- $this->get('translator')->trans('coreshop.ui.error.voucher.not_found')
+ $this->get('translator')->trans('coreshop.ui.error.voucher.not_found'),
);
return $this->redirectToRoute('coreshop_cart_summary');
@@ -104,7 +108,7 @@ public function summaryAction(Request $request): Response
$this->getCartManager()->persistCart($cart);
$this->addFlash(
'success',
- $this->get('translator')->trans('coreshop.ui.success.voucher.stored')
+ $this->get('translator')->trans('coreshop.ui.success.voucher.stored'),
);
} else {
$this->addFlash('error', $this->get('translator')->trans('coreshop.ui.error.voucher.invalid'));
@@ -228,7 +232,7 @@ public function addItemAction(Request $request): Response
$this->get(TrackerInterface::class)->trackCartAdd(
$addToCart->getCart(),
$addToCart->getCartItem()->getProduct(),
- $addToCart->getCartItem()->getQuantity()
+ $addToCart->getCartItem()->getQuantity(),
);
$this->addFlash('success', $this->get('translator')->trans('coreshop.ui.item_added'));
@@ -269,7 +273,7 @@ public function addItemAction(Request $request): Response
[
'form' => $form->createView(),
'product' => $product,
- ]
+ ],
);
}
@@ -369,6 +373,7 @@ private function getCartItemErrors(OrderItemInterface $cartItem): ConstraintViol
{
return $this
->get('validator')
- ->validate($cartItem, null, $this->container->getParameter('coreshop.form.type.cart_item.validation_groups'));
+ ->validate($cartItem, null, $this->container->getParameter('coreshop.form.type.cart_item.validation_groups'))
+ ;
}
}
diff --git a/src/CoreShop/Bundle/FrontendBundle/Controller/CategoryController.php b/src/CoreShop/Bundle/FrontendBundle/Controller/CategoryController.php
index 17b4b3000d..cd9b633292 100644
--- a/src/CoreShop/Bundle/FrontendBundle/Controller/CategoryController.php
+++ b/src/CoreShop/Bundle/FrontendBundle/Controller/CategoryController.php
@@ -1,17 +1,21 @@
validSortProperties = $validSortProperties;
$this->defaultSortName = $defaultSortName;
@@ -94,7 +98,7 @@ public function indexAction(Request $request): Response
$category = $this->getRepository()->findOneBy([
$this->repositoryIdentifier => $id,
- 'pimcore_unpublished' => true
+ 'pimcore_unpublished' => true,
]);
if (!$category instanceof CategoryInterface) {
@@ -102,8 +106,8 @@ public function indexAction(Request $request): Response
sprintf(
'category with identifier "%s" (%s) not found',
$this->repositoryIdentifier,
- $this->getParameterFromRequest($request, $this->requestIdentifier)
- )
+ $this->getParameterFromRequest($request, $this->requestIdentifier),
+ ),
);
}
@@ -122,13 +126,13 @@ public function detail(Request $request, CategoryInterface $category): Response
$displaySubCategories = $this->getConfigurationService()->getForStore('system.category.list.include_subcategories');
$variantMode = $this->getConfigurationService()->getForStore('system.category.variant_mode');
- $page = (int)$this->getParameterFromRequest($request, 'page', 1) ?: 1;
+ $page = (int) $this->getParameterFromRequest($request, 'page', 1) ?: 1;
$type = $this->getParameterFromRequest($request, 'type', $listModeDefault);
$defaultPerPage = $type === 'list' ? $listPerPageDefault : $gridPerPageDefault;
$allowedPerPage = $type === 'list' ? $listPerPageAllowed : $gridPerPageAllowed;
- $perPage = (int)$this->getParameterFromRequest($request, 'perPage', $defaultPerPage) ?: 10;
+ $perPage = (int) $this->getParameterFromRequest($request, 'perPage', $defaultPerPage) ?: 10;
$this->validateCategory($request, $category);
@@ -139,7 +143,7 @@ public function detail(Request $request, CategoryInterface $category): Response
$filteredList->setLocale($request->getLocale());
$filteredList->setVariantMode($variantMode ? $variantMode : ListingInterface::VARIANT_MODE_HIDE);
$filteredList->addCondition(new LikeCondition('stores', 'both', sprintf('%1$s%2$s%1$s', ',', $this->getContext()->getStore()->getId())), 'stores');
- $filteredList->addCondition(new LikeCondition('parentCategoryIds', 'both', (string)$category->getId()), 'parentCategoryIds');
+ $filteredList->addCondition(new LikeCondition('parentCategoryIds', 'both', (string) $category->getId()), 'parentCategoryIds');
$orderDirection = $category->getFilter()->getOrderDirection();
$orderKey = $category->getFilter()->getOrderKey();
@@ -157,7 +161,7 @@ public function detail(Request $request, CategoryInterface $category): Response
$paginator = $this->getPaginator()->paginate(
$filteredList,
$page,
- $perPage
+ $perPage,
);
$viewParameters['list'] = $filteredList;
@@ -194,7 +198,7 @@ public function detail(Request $request, CategoryInterface $category): Response
$paginator = $this->getPaginator()->paginate(
$list,
$page,
- $perPage
+ $perPage,
);
$viewParameters['paginator'] = $paginator;
diff --git a/src/CoreShop/Bundle/FrontendBundle/Controller/CheckoutController.php b/src/CoreShop/Bundle/FrontendBundle/Controller/CheckoutController.php
index 9f6141f02c..b06d595a48 100644
--- a/src/CoreShop/Bundle/FrontendBundle/Controller/CheckoutController.php
+++ b/src/CoreShop/Bundle/FrontendBundle/Controller/CheckoutController.php
@@ -1,17 +1,21 @@
denyAccessUnlessGranted('CORESHOP_CUSTOMER_PROFILE_ADDRESS_EDIT');
- }
- else {
+ } else {
$this->denyAccessUnlessGranted('CORESHOP_CUSTOMER_PROFILE_ADDRESS_ADD');
}
@@ -180,7 +183,7 @@ public function addressAction(Request $request): Response
$this->addFlash('success', $this->get('translator')->trans(sprintf('coreshop.ui.customer.address_successfully_%s', $eventType === 'add' ? 'added' : 'updated')));
return $this->redirect(
- $this->getParameterFromRequest($request, '_redirect', $this->generateUrl('coreshop_customer_addresses'))
+ $this->getParameterFromRequest($request, '_redirect', $this->generateUrl('coreshop_customer_addresses')),
);
}
}
@@ -204,7 +207,7 @@ public function addressDeleteAction(Request $request): Response
}
$address = $this->get('coreshop.repository.address')->find(
- $this->getParameterFromRequest($request, 'address')
+ $this->getParameterFromRequest($request, 'address'),
);
if (!$address instanceof AddressInterface) {
diff --git a/src/CoreShop/Bundle/FrontendBundle/Controller/FrontendController.php b/src/CoreShop/Bundle/FrontendBundle/Controller/FrontendController.php
index d70b69861c..d2cbcb7f12 100644
--- a/src/CoreShop/Bundle/FrontendBundle/Controller/FrontendController.php
+++ b/src/CoreShop/Bundle/FrontendBundle/Controller/FrontendController.php
@@ -1,17 +1,21 @@
getParameterFromRequest($request,'token');
+ $token = $this->getParameterFromRequest($request, 'token');
$payment = null;
/** @var OrderInterface $order */
diff --git a/src/CoreShop/Bundle/FrontendBundle/Controller/ProductController.php b/src/CoreShop/Bundle/FrontendBundle/Controller/ProductController.php
index 7d4a8ecb41..02fba5103e 100644
--- a/src/CoreShop/Bundle/FrontendBundle/Controller/ProductController.php
+++ b/src/CoreShop/Bundle/FrontendBundle/Controller/ProductController.php
@@ -1,17 +1,21 @@
getPaginator()->paginate(
$list,
$page,
- $itemsPerPage
+ $itemsPerPage,
);
return $this->render($this->templateConfigurator->findTemplate('Search/search.html'), [
diff --git a/src/CoreShop/Bundle/FrontendBundle/Controller/SecurityController.php b/src/CoreShop/Bundle/FrontendBundle/Controller/SecurityController.php
index fb5baee8e5..d79ce2f17a 100644
--- a/src/CoreShop/Bundle/FrontendBundle/Controller/SecurityController.php
+++ b/src/CoreShop/Bundle/FrontendBundle/Controller/SecurityController.php
@@ -1,17 +1,21 @@
$value) {
$controllerKey = sprintf('coreshop.frontend.controller.%s', $key);
$serviceName = sprintf('CoreShop\\Bundle\\FrontendBundle\\Controller\\%sController', ucfirst($key));
- $controllerClass = (string)$container->getParameter($controllerKey);
+ $controllerClass = (string) $container->getParameter($controllerKey);
if ($container->hasDefinition($controllerClass)) {
$customController = $container->getDefinition($controllerClass);
@@ -96,7 +100,7 @@ public function process(ContainerBuilder $container): void
}
$controllerDefinition->addTag('controller.service_arguments');
-
+
$container->setDefinition($serviceName, $controllerDefinition)->setPublic(true);
$container->setAlias($controllerKey, $serviceName)->setPublic(true);
diff --git a/src/CoreShop/Bundle/FrontendBundle/DependencyInjection/Configuration.php b/src/CoreShop/Bundle/FrontendBundle/DependencyInjection/Configuration.php
index 5f88799f80..9099be5469 100644
--- a/src/CoreShop/Bundle/FrontendBundle/DependencyInjection/Configuration.php
+++ b/src/CoreShop/Bundle/FrontendBundle/DependencyInjection/Configuration.php
@@ -1,17 +1,21 @@
children()
->scalarNode('view_suffix')->defaultValue('twig')->end()
->scalarNode('view_bundle')->defaultValue('CoreShopFrontend')->end()
- ->end();
+ ->end()
+ ;
$this->addCategorySection($rootNode);
$this->addPimcoreResourcesSection($rootNode);
@@ -72,7 +77,8 @@ private function addCategorySection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
private function addControllerSection(ArrayNodeDefinition $node): void
@@ -96,7 +102,8 @@ private function addControllerSection(ArrayNodeDefinition $node): void
->scalarNode('payment')->defaultValue(PaymentController::class)->end()
->scalarNode('mail')->defaultValue(MailController::class)->end()
->end()
- ->end();
+ ->end()
+ ;
}
private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
@@ -127,6 +134,7 @@ private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/FrontendBundle/DependencyInjection/CoreShopFrontendExtension.php b/src/CoreShop/Bundle/FrontendBundle/DependencyInjection/CoreShopFrontendExtension.php
index 5377bc63ae..42c2a5903a 100644
--- a/src/CoreShop/Bundle/FrontendBundle/DependencyInjection/CoreShopFrontendExtension.php
+++ b/src/CoreShop/Bundle/FrontendBundle/DependencyInjection/CoreShopFrontendExtension.php
@@ -1,17 +1,21 @@
add('text', \Symfony\Component\Form\Extension\Core\Type\SearchType::class, [
'label' => 'coreshop.form.search.text',
- ]);
+ ])
+ ;
}
public function configureOptions(OptionsResolver $resolver): void
diff --git a/src/CoreShop/Bundle/FrontendBundle/Resources/public/static/css/mail.css b/src/CoreShop/Bundle/FrontendBundle/Resources/public/static/css/mail.css
index 191ab04661..11d86f1b3d 100644
--- a/src/CoreShop/Bundle/FrontendBundle/Resources/public/static/css/mail.css
+++ b/src/CoreShop/Bundle/FrontendBundle/Resources/public/static/css/mail.css
@@ -1,13 +1,17 @@
-/**
- * CoreShop.
+/*
+ * CoreShop
*
- * This source file is subject to the GNU General Public License version 3 (GPLv3)
- * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
- * files that are distributed with this source code.
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
* @license https://www.coreshop.org/license GPLv3 and CCL
+ *
*/
+
.body-drip {
border-top: 8px solid #cd1017;
}
diff --git a/src/CoreShop/Bundle/FrontendBundle/Resources/public/static/css/shop.css b/src/CoreShop/Bundle/FrontendBundle/Resources/public/static/css/shop.css
index aaf91c1a78..1c4c23e94d 100644
--- a/src/CoreShop/Bundle/FrontendBundle/Resources/public/static/css/shop.css
+++ b/src/CoreShop/Bundle/FrontendBundle/Resources/public/static/css/shop.css
@@ -1,13 +1,16 @@
@charset "UTF-8";
-/**
- * CoreShop.
+/*
+ * CoreShop
*
- * This source file is subject to the GNU General Public License version 3 (GPLv3)
- * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
- * files that are distributed with this source code.
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
* @license https://www.coreshop.org/license GPLv3 and CCL
+ *
*/
/*!
diff --git a/src/CoreShop/Bundle/FrontendBundle/TemplateConfigurator/TemplateConfigurator.php b/src/CoreShop/Bundle/FrontendBundle/TemplateConfigurator/TemplateConfigurator.php
index efd386b21f..ea302f4ca2 100644
--- a/src/CoreShop/Bundle/FrontendBundle/TemplateConfigurator/TemplateConfigurator.php
+++ b/src/CoreShop/Bundle/FrontendBundle/TemplateConfigurator/TemplateConfigurator.php
@@ -1,23 +1,29 @@
environment, 'test')) {
- return ['attr' => ['data-test-' . $name => (string)$value]];
+ return ['attr' => ['data-test-' . $name => (string) $value]];
}
return [];
},
- ['is_safe' => ['html']]
+ ['is_safe' => ['html']],
),
];
}
diff --git a/src/CoreShop/Bundle/FrontendBundle/Twig/TestHtmlAttributeExtension.php b/src/CoreShop/Bundle/FrontendBundle/Twig/TestHtmlAttributeExtension.php
index c9244f3aa4..a8644252cc 100644
--- a/src/CoreShop/Bundle/FrontendBundle/Twig/TestHtmlAttributeExtension.php
+++ b/src/CoreShop/Bundle/FrontendBundle/Twig/TestHtmlAttributeExtension.php
@@ -1,17 +1,21 @@
env, 'test')) {
- return sprintf('data-test-%s="%s"', $name, (string)$value);
+ return sprintf('data-test-%s="%s"', $name, (string) $value);
}
return '';
},
- ['is_safe' => ['html']]
+ ['is_safe' => ['html']],
),
];
}
diff --git a/src/CoreShop/Bundle/IndexBundle/Command/IndexCommand.php b/src/CoreShop/Bundle/IndexBundle/Command/IndexCommand.php
index 99ec7a61bc..85ddf2f968 100644
--- a/src/CoreShop/Bundle/IndexBundle/Command/IndexCommand.php
+++ b/src/CoreShop/Bundle/IndexBundle/Command/IndexCommand.php
@@ -1,17 +1,21 @@
dispatchInfo('status', 'No Indices available, you have to first create an Index.');
} else {
$output->writeln(
- sprintf('No Indices found for %s', implode(', ', $indexIds))
+ sprintf('No Indices found for %s', implode(', ', $indexIds)),
);
$this->dispatchInfo(
'status',
- sprintf('No Indices found for %s', implode(', ', $indexIds))
+ sprintf('No Indices found for %s', implode(', ', $indexIds)),
);
}
@@ -115,6 +120,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$list = '\Pimcore\Model\DataObject\\' . $class . '\Listing';
/**
* @var Listing $list
+ *
* @psalm-suppress UndefinedClass
*/
$list = new $list();
@@ -149,7 +155,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$output->writeln(sprintf('Processing %s Objects of class "%s"', $total, $class));
$progress = new ProgressBar($output, $total);
$progress->setFormat(
- '%current%/%max% [%bar%] %percent:3s%% (%elapsed:6s%/%estimated:-6s%) %memory:6s%: %message%'
+ '%current%/%max% [%bar%] %percent:3s%% (%elapsed:6s%/%estimated:-6s%) %memory:6s%: %message%',
);
$progress->start();
diff --git a/src/CoreShop/Bundle/IndexBundle/Condition/Mysql/AbstractMysqlDynamicRenderer.php b/src/CoreShop/Bundle/IndexBundle/Condition/Mysql/AbstractMysqlDynamicRenderer.php
index 0d08ec42a0..56942ff42e 100644
--- a/src/CoreShop/Bundle/IndexBundle/Condition/Mysql/AbstractMysqlDynamicRenderer.php
+++ b/src/CoreShop/Bundle/IndexBundle/Condition/Mysql/AbstractMysqlDynamicRenderer.php
@@ -1,17 +1,21 @@
getValues() as $value) {
- $inValues[] = $this->quote((string)$value);
+ $inValues[] = $this->quote((string) $value);
}
if (count($inValues) > 0) {
@@ -47,7 +51,7 @@ public function render(WorkerInterface $worker, ConditionInterface $condition, s
'%s %s (%s)',
$this->quoteFieldName($condition->getFieldName(), $prefix),
$operator,
- implode(',', $inValues)
+ implode(',', $inValues),
);
}
diff --git a/src/CoreShop/Bundle/IndexBundle/Condition/Mysql/IsNullRenderer.php b/src/CoreShop/Bundle/IndexBundle/Condition/Mysql/IsNullRenderer.php
index 6a3296b8b1..d50b6369f6 100644
--- a/src/CoreShop/Bundle/IndexBundle/Condition/Mysql/IsNullRenderer.php
+++ b/src/CoreShop/Bundle/IndexBundle/Condition/Mysql/IsNullRenderer.php
@@ -1,17 +1,21 @@
quoteFieldName($condition->getFieldName(), $prefix),
$operator,
- $this->quote($patternValue)
+ $this->quote($patternValue),
);
}
diff --git a/src/CoreShop/Bundle/IndexBundle/Condition/Mysql/RangeRenderer.php b/src/CoreShop/Bundle/IndexBundle/Condition/Mysql/RangeRenderer.php
index 2ee3a076ad..134e3c7a1b 100644
--- a/src/CoreShop/Bundle/IndexBundle/Condition/Mysql/RangeRenderer.php
+++ b/src/CoreShop/Bundle/IndexBundle/Condition/Mysql/RangeRenderer.php
@@ -1,17 +1,21 @@
true,
'pre_conditions' => array_keys($this->getPreConditionTypes()),
'user_conditions' => array_keys($this->getUserConditionTypes()),
- ]
+ ],
);
}
diff --git a/src/CoreShop/Bundle/IndexBundle/Controller/IndexController.php b/src/CoreShop/Bundle/IndexBundle/Controller/IndexController.php
index de0da41368..cac6162251 100644
--- a/src/CoreShop/Bundle/IndexBundle/Controller/IndexController.php
+++ b/src/CoreShop/Bundle/IndexBundle/Controller/IndexController.php
@@ -1,17 +1,21 @@
$gettersResult,
'fieldTypes' => $fieldTypesResult,
'classes' => $availableClasses,
- ]
+ ],
);
}
@@ -332,7 +336,7 @@ protected function getClassificationStoreFields(DataObject\ClassDefinition\Data\
}
protected function getClassificationStoreGroupConfiguration(
- DataObject\Classificationstore\GroupConfig $config
+ DataObject\Classificationstore\GroupConfig $config,
): array {
$result = [];
$result['nodeLabel'] = $config->getName();
@@ -372,7 +376,7 @@ protected function getFieldConfiguration(DataObject\ClassDefinition\Data $field)
protected function getClassificationStoreFieldConfiguration(
DataObject\Classificationstore\KeyConfig $field,
- DataObject\Classificationstore\GroupConfig $groupConfig
+ DataObject\Classificationstore\GroupConfig $groupConfig,
): array {
$definition = [
'name' => $field->getName(),
diff --git a/src/CoreShop/Bundle/IndexBundle/CoreExtension/Filter.php b/src/CoreShop/Bundle/IndexBundle/CoreExtension/Filter.php
index 8e485baf7b..227970b5ef 100644
--- a/src/CoreShop/Bundle/IndexBundle/CoreExtension/Filter.php
+++ b/src/CoreShop/Bundle/IndexBundle/CoreExtension/Filter.php
@@ -1,17 +1,21 @@
addTag('coreshop.filter.user_condition_type', $tag);
$definition->addTag('coreshop.filter.pre_condition_type', $tag);
}
diff --git a/src/CoreShop/Bundle/IndexBundle/DependencyInjection/Compiler/RegisterFilterPreConditionTypesPass.php b/src/CoreShop/Bundle/IndexBundle/DependencyInjection/Compiler/RegisterFilterPreConditionTypesPass.php
index 2c559aec50..90dfabb284 100644
--- a/src/CoreShop/Bundle/IndexBundle/DependencyInjection/Compiler/RegisterFilterPreConditionTypesPass.php
+++ b/src/CoreShop/Bundle/IndexBundle/DependencyInjection/Compiler/RegisterFilterPreConditionTypesPass.php
@@ -1,17 +1,21 @@
end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
@@ -156,7 +161,8 @@ private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
public function addIndexColumnsTypeSection(ArrayNodeDefinition $node): void
@@ -167,6 +173,7 @@ public function addIndexColumnsTypeSection(ArrayNodeDefinition $node): void
->useAttributeAsKey('name')
->prototype('scalar')->end()
->end()
- ->end();
+ ->end()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/IndexBundle/DependencyInjection/CoreShopIndexExtension.php b/src/CoreShop/Bundle/IndexBundle/DependencyInjection/CoreShopIndexExtension.php
index abfff2aac1..4df944e1a4 100644
--- a/src/CoreShop/Bundle/IndexBundle/DependencyInjection/CoreShopIndexExtension.php
+++ b/src/CoreShop/Bundle/IndexBundle/DependencyInjection/CoreShopIndexExtension.php
@@ -1,17 +1,21 @@
registerForAutoconfiguration(DynamicRendererInterface::class)
- ->addTag(RegisterConditionRendererTypesPass::INDEX_CONDITION_RENDERER_TAG);
+ ->addTag(RegisterConditionRendererTypesPass::INDEX_CONDITION_RENDERER_TAG)
+ ;
$container
->registerForAutoconfiguration(DynamicOrderRendererInterface::class)
- ->addTag(RegisterOrderRendererTypesPass::INDEX_ORDER_RENDERER_TAG);
+ ->addTag(RegisterOrderRendererTypesPass::INDEX_ORDER_RENDERER_TAG)
+ ;
$container
->registerForAutoconfiguration(IndexExtensionInterface::class)
- ->addTag(RegisterExtensionsPass::INDEX_EXTENSION_TAG);
+ ->addTag(RegisterExtensionsPass::INDEX_EXTENSION_TAG)
+ ;
$container
->registerForAutoconfiguration(FilterConditionProcessorInterface::class)
- ->addTag(RegisterFilterConditionTypesPass::INDEX_FILTER_CONDITION_TAG);
+ ->addTag(RegisterFilterConditionTypesPass::INDEX_FILTER_CONDITION_TAG)
+ ;
$container
->registerForAutoconfiguration(FilterPreConditionProcessorInterface::class)
- ->addTag(RegisterFilterPreConditionTypesPass::INDEX_FILTER_PRE_CONDITION_TAG);
+ ->addTag(RegisterFilterPreConditionTypesPass::INDEX_FILTER_PRE_CONDITION_TAG)
+ ;
$container
->registerForAutoconfiguration(FilterUserConditionProcessorInterface::class)
- ->addTag(RegisterFilterUserConditionTypesPass::INDEX_FILTER_USER_CONDITION_TAG);
+ ->addTag(RegisterFilterUserConditionTypesPass::INDEX_FILTER_USER_CONDITION_TAG)
+ ;
$container
->registerForAutoconfiguration(GetterInterface::class)
- ->addTag(RegisterGetterPass::INDEX_GETTER_TAG);
+ ->addTag(RegisterGetterPass::INDEX_GETTER_TAG)
+ ;
$container
->registerForAutoconfiguration(WorkerInterface::class)
- ->addTag(RegisterIndexWorkerPass::INDEX_WORKER_TAG);
+ ->addTag(RegisterIndexWorkerPass::INDEX_WORKER_TAG)
+ ;
$container
->registerForAutoconfiguration(InterpreterInterface::class)
- ->addTag(RegisterInterpreterPass::INDEX_INTERPRETER_TAG);
+ ->addTag(RegisterInterpreterPass::INDEX_INTERPRETER_TAG)
+ ;
}
}
diff --git a/src/CoreShop/Bundle/IndexBundle/EventListener/AdminJavascriptListener.php b/src/CoreShop/Bundle/IndexBundle/EventListener/AdminJavascriptListener.php
index d54e0b8e7d..01b6405be3 100644
--- a/src/CoreShop/Bundle/IndexBundle/EventListener/AdminJavascriptListener.php
+++ b/src/CoreShop/Bundle/IndexBundle/EventListener/AdminJavascriptListener.php
@@ -1,17 +1,21 @@
addConfigurationFields($event->getForm(), $this->formTypeRegistry->get($data['objectType'], 'default'));
- });
+ })
+ ;
}
public function configureOptions(OptionsResolver $resolver): void
@@ -75,7 +83,8 @@ public function configureOptions(OptionsResolver $resolver): void
$resolver
->setDefault('configuration_type', null)
- ->setAllowedTypes('configuration_type', ['string', 'null']);
+ ->setAllowedTypes('configuration_type', ['string', 'null'])
+ ;
}
protected function addConfigurationFields(FormInterface $form, string $configurationType): void
diff --git a/src/CoreShop/Bundle/IndexBundle/Form/Type/Column/IndexColumnTypeClassificationStoreType.php b/src/CoreShop/Bundle/IndexBundle/Form/Type/Column/IndexColumnTypeClassificationStoreType.php
index 3bdfbf5ac6..da5fce3db7 100644
--- a/src/CoreShop/Bundle/IndexBundle/Form/Type/Column/IndexColumnTypeClassificationStoreType.php
+++ b/src/CoreShop/Bundle/IndexBundle/Form/Type/Column/IndexColumnTypeClassificationStoreType.php
@@ -1,17 +1,21 @@
['coreshop']]),
new Type(['type' => 'numeric', 'groups' => ['coreshop']]),
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/IndexBundle/Form/Type/Column/IndexColumnTypeFieldCollectionType.php b/src/CoreShop/Bundle/IndexBundle/Form/Type/Column/IndexColumnTypeFieldCollectionType.php
index 0388cee15d..ebad9a008a 100644
--- a/src/CoreShop/Bundle/IndexBundle/Form/Type/Column/IndexColumnTypeFieldCollectionType.php
+++ b/src/CoreShop/Bundle/IndexBundle/Form/Type/Column/IndexColumnTypeFieldCollectionType.php
@@ -1,17 +1,21 @@
[
new NotBlank(['groups' => ['coreshop']]),
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/IndexBundle/Form/Type/Column/IndexColumnTypeLocalizedFieldsType.php b/src/CoreShop/Bundle/IndexBundle/Form/Type/Column/IndexColumnTypeLocalizedFieldsType.php
index cf432bc574..e176dbb82d 100644
--- a/src/CoreShop/Bundle/IndexBundle/Form/Type/Column/IndexColumnTypeLocalizedFieldsType.php
+++ b/src/CoreShop/Bundle/IndexBundle/Form/Type/Column/IndexColumnTypeLocalizedFieldsType.php
@@ -1,17 +1,21 @@
[
new NotBlank(['groups' => ['coreshop']]),
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/IndexBundle/Form/Type/Column/IndexColumnTypeObjectType.php b/src/CoreShop/Bundle/IndexBundle/Form/Type/Column/IndexColumnTypeObjectType.php
index 633d4a45bf..a542a96827 100644
--- a/src/CoreShop/Bundle/IndexBundle/Form/Type/Column/IndexColumnTypeObjectType.php
+++ b/src/CoreShop/Bundle/IndexBundle/Form/Type/Column/IndexColumnTypeObjectType.php
@@ -1,17 +1,21 @@
$type]
- )
+ ['configuration_type' => $type],
+ ),
);
$prototypes[$type] = $formBuilder->getForm();
diff --git a/src/CoreShop/Bundle/IndexBundle/Form/Type/EmptyConfigurationFormType.php b/src/CoreShop/Bundle/IndexBundle/Form/Type/EmptyConfigurationFormType.php
index 5de50c7a58..110c352aed 100644
--- a/src/CoreShop/Bundle/IndexBundle/Form/Type/EmptyConfigurationFormType.php
+++ b/src/CoreShop/Bundle/IndexBundle/Form/Type/EmptyConfigurationFormType.php
@@ -1,17 +1,21 @@
add('field', TextType::class)
- ->add('preSelect', TextType::class);
+ ->add('preSelect', TextType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterConditionCategoryMultiSelectType.php b/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterConditionCategoryMultiSelectType.php
index 5515ef11d3..40095c8eca 100644
--- a/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterConditionCategoryMultiSelectType.php
+++ b/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterConditionCategoryMultiSelectType.php
@@ -1,17 +1,21 @@
TextType::class,
])
->add('includeSubCategories', CheckboxType::class)
- ->add('concatenator', TextType::class);
+ ->add('concatenator', TextType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterConditionCategorySelectType.php b/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterConditionCategorySelectType.php
index 784d365f13..92027c698e 100644
--- a/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterConditionCategorySelectType.php
+++ b/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterConditionCategorySelectType.php
@@ -1,17 +1,21 @@
add('field', TextType::class)
->add('preSelect', TextType::class)
- ->add('includeSubCategories', CheckboxType::class);
+ ->add('includeSubCategories', CheckboxType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterConditionMultiselectType.php b/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterConditionMultiselectType.php
index 882cff6345..236e53426f 100644
--- a/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterConditionMultiselectType.php
+++ b/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterConditionMultiselectType.php
@@ -1,17 +1,21 @@
true,
'allow_delete' => true,
'entry_type' => TextType::class,
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterConditionRangeType.php b/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterConditionRangeType.php
index 89ee71972c..88d731cad7 100644
--- a/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterConditionRangeType.php
+++ b/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterConditionRangeType.php
@@ -1,17 +1,21 @@
[
new Type(['type' => 'numeric', 'groups' => $this->validationGroups]),
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterConditionSearchType.php b/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterConditionSearchType.php
index e39e13b518..01c31ed9fd 100644
--- a/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterConditionSearchType.php
+++ b/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterConditionSearchType.php
@@ -1,12 +1,27 @@
add('searchTerm', TextType::class)
->add('concatenator', TextType::class)
- ->add('pattern', TextType::class);
+ ->add('pattern', TextType::class)
+ ;
}
public function getBlockPrefix(): string
@@ -36,4 +52,3 @@ public function getBlockPrefix(): string
return 'coreshop_filter_condition_type_search';
}
}
-
diff --git a/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterConditionSelectType.php b/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterConditionSelectType.php
index c1c42febde..b10c29a55b 100644
--- a/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterConditionSelectType.php
+++ b/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterConditionSelectType.php
@@ -1,17 +1,21 @@
add('field', TextType::class)
- ->add('preSelect', TextType::class);
+ ->add('preSelect', TextType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterPreConditionNestedType.php b/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterPreConditionNestedType.php
index 52b6e2c25a..342eb8b5f2 100644
--- a/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterPreConditionNestedType.php
+++ b/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterPreConditionNestedType.php
@@ -1,17 +1,21 @@
add('conditions', FilterPreConditionCollectionType::class, [
'constraints' => [new Valid(['groups' => $this->validationGroups])],
'nested' => true,
- ]);
+ ])
+ ;
$builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
$data = $event->getData();
diff --git a/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterUserConditionNestedType.php b/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterUserConditionNestedType.php
index b33e5ecd3f..60c4e748e3 100644
--- a/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterUserConditionNestedType.php
+++ b/src/CoreShop/Bundle/IndexBundle/Form/Type/Filter/FilterUserConditionNestedType.php
@@ -1,17 +1,21 @@
add('conditions', FilterUserConditionCollectionType::class, [
'constraints' => [new Valid(['groups' => $this->validationGroups])],
'nested' => true,
- ]);
+ ])
+ ;
$builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
$data = $event->getData();
diff --git a/src/CoreShop/Bundle/IndexBundle/Form/Type/FilterConditionChoiceType.php b/src/CoreShop/Bundle/IndexBundle/Form/Type/FilterConditionChoiceType.php
index 43227fdca8..f5ce75d35f 100644
--- a/src/CoreShop/Bundle/IndexBundle/Form/Type/FilterConditionChoiceType.php
+++ b/src/CoreShop/Bundle/IndexBundle/Form/Type/FilterConditionChoiceType.php
@@ -1,17 +1,21 @@
add('type', FilterConditionChoiceType::class)
->add('label', TextType::class)
->add('sort', IntegerType::class)
- ->add('quantityUnit', TextType::class);
+ ->add('quantityUnit', TextType::class)
+ ;
$builder
->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
@@ -76,7 +83,8 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
}
$this->addConfigurationFields($event->getForm(), $this->formTypeRegistry->get($data['type'], 'default'));
- });
+ })
+ ;
}
public function configureOptions(OptionsResolver $resolver): void
@@ -85,7 +93,8 @@ public function configureOptions(OptionsResolver $resolver): void
$resolver
->setDefault('configuration_type', null)
- ->setAllowedTypes('configuration_type', ['string', 'null']);
+ ->setAllowedTypes('configuration_type', ['string', 'null'])
+ ;
}
protected function addConfigurationFields(FormInterface $form, string $configurationType): void
diff --git a/src/CoreShop/Bundle/IndexBundle/Form/Type/FilterPreConditionChoiceType.php b/src/CoreShop/Bundle/IndexBundle/Form/Type/FilterPreConditionChoiceType.php
index fb768e2a21..b011fc88e0 100644
--- a/src/CoreShop/Bundle/IndexBundle/Form/Type/FilterPreConditionChoiceType.php
+++ b/src/CoreShop/Bundle/IndexBundle/Form/Type/FilterPreConditionChoiceType.php
@@ -1,17 +1,21 @@
add('type', FilterPreConditionChoiceType::class);
+ ->add('type', FilterPreConditionChoiceType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/IndexBundle/Form/Type/FilterType.php b/src/CoreShop/Bundle/IndexBundle/Form/Type/FilterType.php
index 4a62962b18..07b92a2a3a 100644
--- a/src/CoreShop/Bundle/IndexBundle/Form/Type/FilterType.php
+++ b/src/CoreShop/Bundle/IndexBundle/Form/Type/FilterType.php
@@ -1,17 +1,21 @@
true,
'constraints' => [
- new NotBlank(['groups' => $this->validationGroups])
- ]
+ new NotBlank(['groups' => $this->validationGroups]),
+ ],
])
->add('preConditions', FilterPreConditionCollectionType::class)
->add('conditions', FilterUserConditionCollectionType::class)
->add('resultsPerPage', IntegerType::class)
- ->add('index', IndexChoiceType::class);
+ ->add('index', IndexChoiceType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/IndexBundle/Form/Type/FilterUserConditionChoiceType.php b/src/CoreShop/Bundle/IndexBundle/Form/Type/FilterUserConditionChoiceType.php
index f9e08541e7..6dcb8ecd1f 100644
--- a/src/CoreShop/Bundle/IndexBundle/Form/Type/FilterUserConditionChoiceType.php
+++ b/src/CoreShop/Bundle/IndexBundle/Form/Type/FilterUserConditionChoiceType.php
@@ -1,17 +1,21 @@
add('type', FilterPreConditionChoiceType::class);
+ ->add('type', FilterPreConditionChoiceType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/IndexBundle/Form/Type/Getter/BrickGetterFormType.php b/src/CoreShop/Bundle/IndexBundle/Form/Type/Getter/BrickGetterFormType.php
index e2856e61fa..5abb46895c 100644
--- a/src/CoreShop/Bundle/IndexBundle/Form/Type/Getter/BrickGetterFormType.php
+++ b/src/CoreShop/Bundle/IndexBundle/Form/Type/Getter/BrickGetterFormType.php
@@ -1,17 +1,21 @@
[
new NotBlank(['groups' => $this->validationGroups]),
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/IndexBundle/Form/Type/Getter/ClassificationStoreGetterFormType.php b/src/CoreShop/Bundle/IndexBundle/Form/Type/Getter/ClassificationStoreGetterFormType.php
index 942fe4baee..2d9cddbe0a 100644
--- a/src/CoreShop/Bundle/IndexBundle/Form/Type/Getter/ClassificationStoreGetterFormType.php
+++ b/src/CoreShop/Bundle/IndexBundle/Form/Type/Getter/ClassificationStoreGetterFormType.php
@@ -1,17 +1,21 @@
[
new NotBlank(['groups' => $this->validationGroups]),
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/IndexBundle/Form/Type/Getter/FieldCollectionGetterFormType.php b/src/CoreShop/Bundle/IndexBundle/Form/Type/Getter/FieldCollectionGetterFormType.php
index 203dbca920..a8c88a218d 100644
--- a/src/CoreShop/Bundle/IndexBundle/Form/Type/Getter/FieldCollectionGetterFormType.php
+++ b/src/CoreShop/Bundle/IndexBundle/Form/Type/Getter/FieldCollectionGetterFormType.php
@@ -1,17 +1,21 @@
[
new NotBlank(['groups' => $this->validationGroups]),
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/IndexBundle/Form/Type/IndexChoiceType.php b/src/CoreShop/Bundle/IndexBundle/Form/Type/IndexChoiceType.php
index 0a1577ba98..ad9bdf2f49 100644
--- a/src/CoreShop/Bundle/IndexBundle/Form/Type/IndexChoiceType.php
+++ b/src/CoreShop/Bundle/IndexBundle/Form/Type/IndexChoiceType.php
@@ -1,17 +1,21 @@
'id',
'choice_label' => 'name',
'choice_translation_domain' => false,
- ]);
+ ])
+ ;
}
public function getParent(): string
diff --git a/src/CoreShop/Bundle/IndexBundle/Form/Type/IndexColumnChoiceType.php b/src/CoreShop/Bundle/IndexBundle/Form/Type/IndexColumnChoiceType.php
index 8c46c51661..2a3b86d561 100644
--- a/src/CoreShop/Bundle/IndexBundle/Form/Type/IndexColumnChoiceType.php
+++ b/src/CoreShop/Bundle/IndexBundle/Form/Type/IndexColumnChoiceType.php
@@ -1,17 +1,21 @@
add('getter', IndexColumnGetterChoiceType::class)
- ->add('interpreter', IndexColumnInterpreterChoiceType::class);
+ ->add('interpreter', IndexColumnInterpreterChoiceType::class)
+ ;
/*
* Getter Configurations
@@ -74,7 +84,8 @@ public function buildForm(FormBuilderInterface $builder, array $options = []): v
}
$this->addGetterConfigurationFields($event->getForm(), $this->getterTypeRegistry->get($data['getter'], 'default'));
- });
+ })
+ ;
/*
* Interpreter Configurations
@@ -104,7 +115,8 @@ public function buildForm(FormBuilderInterface $builder, array $options = []): v
}
$this->addInterpreterConfigurationFields($event->getForm(), $this->interpreterTypeRegistry->get($data['interpreter'], 'default'));
- });
+ })
+ ;
}
/**
diff --git a/src/CoreShop/Bundle/IndexBundle/Form/Type/IndexType.php b/src/CoreShop/Bundle/IndexBundle/Form/Type/IndexType.php
index f93809de2c..0c6e2ba040 100644
--- a/src/CoreShop/Bundle/IndexBundle/Form/Type/IndexType.php
+++ b/src/CoreShop/Bundle/IndexBundle/Form/Type/IndexType.php
@@ -1,17 +1,21 @@
add('worker', IndexWorkerChoiceType::class)
->add('class', PimcoreClassChoiceType::class)
->add('columns', IndexColumnCollectionType::class)
- ->add('indexLastVersion', CheckboxType::class);
+ ->add('indexLastVersion', CheckboxType::class)
+ ;
$builder
->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
@@ -74,7 +82,8 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
}
$this->addConfigurationFields($event->getForm(), $this->formTypeRegistry->get($data['worker'], 'default'));
- });
+ })
+ ;
}
/**
diff --git a/src/CoreShop/Bundle/IndexBundle/Form/Type/IndexWorkerChoiceType.php b/src/CoreShop/Bundle/IndexBundle/Form/Type/IndexWorkerChoiceType.php
index c2f9c95b0f..5ec5dccd44 100644
--- a/src/CoreShop/Bundle/IndexBundle/Form/Type/IndexWorkerChoiceType.php
+++ b/src/CoreShop/Bundle/IndexBundle/Form/Type/IndexWorkerChoiceType.php
@@ -1,17 +1,21 @@
[
new NotBlank(['groups' => $this->validationGroups]),
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/IndexBundle/Form/Type/Interpreter/InterpreterCollectionType.php b/src/CoreShop/Bundle/IndexBundle/Form/Type/Interpreter/InterpreterCollectionType.php
index d5b327bfba..3e312fedf2 100644
--- a/src/CoreShop/Bundle/IndexBundle/Form/Type/Interpreter/InterpreterCollectionType.php
+++ b/src/CoreShop/Bundle/IndexBundle/Form/Type/Interpreter/InterpreterCollectionType.php
@@ -1,17 +1,21 @@
$type]
- )
+ ['configuration_type' => $type],
+ ),
);
$prototypes[$type] = $formBuilder->getForm();
diff --git a/src/CoreShop/Bundle/IndexBundle/Form/Type/Interpreter/InterpreterType.php b/src/CoreShop/Bundle/IndexBundle/Form/Type/Interpreter/InterpreterType.php
index 52fd8fe5a0..98f19075d5 100644
--- a/src/CoreShop/Bundle/IndexBundle/Form/Type/Interpreter/InterpreterType.php
+++ b/src/CoreShop/Bundle/IndexBundle/Form/Type/Interpreter/InterpreterType.php
@@ -1,17 +1,21 @@
add('type', IndexColumnInterpreterChoiceType::class);
+ ->add('type', IndexColumnInterpreterChoiceType::class)
+ ;
$builder
->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
@@ -70,7 +75,8 @@ public function buildForm(FormBuilderInterface $builder, array $options): void
}
$this->addConfigurationFields($event->getForm(), $this->formTypeRegistry->get($data['type'], 'default'));
- });
+ })
+ ;
}
public function configureOptions(OptionsResolver $resolver): void
@@ -79,7 +85,8 @@ public function configureOptions(OptionsResolver $resolver): void
$resolver
->setDefault('configuration_type', null)
- ->setAllowedTypes('configuration_type', ['string', 'null']);
+ ->setAllowedTypes('configuration_type', ['string', 'null'])
+ ;
}
/**
diff --git a/src/CoreShop/Bundle/IndexBundle/Form/Type/Interpreter/IteratorInterpreterType.php b/src/CoreShop/Bundle/IndexBundle/Form/Type/Interpreter/IteratorInterpreterType.php
index b1973a3bad..db816f0fa7 100644
--- a/src/CoreShop/Bundle/IndexBundle/Form/Type/Interpreter/IteratorInterpreterType.php
+++ b/src/CoreShop/Bundle/IndexBundle/Form/Type/Interpreter/IteratorInterpreterType.php
@@ -1,17 +1,21 @@
[
new Valid(['groups' => $this->validationGroups]),
],
- ]);
+ ])
+ ;
}
}
diff --git a/src/CoreShop/Bundle/IndexBundle/Form/Type/Interpreter/NestedInterpreterType.php b/src/CoreShop/Bundle/IndexBundle/Form/Type/Interpreter/NestedInterpreterType.php
index 1e1ad38ab9..1235e71303 100644
--- a/src/CoreShop/Bundle/IndexBundle/Form/Type/Interpreter/NestedInterpreterType.php
+++ b/src/CoreShop/Bundle/IndexBundle/Form/Type/Interpreter/NestedInterpreterType.php
@@ -1,17 +1,21 @@
[
new Valid(['groups' => $this->validationGroups]),
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/IndexBundle/Form/Type/Interpreter/ObjectPropertyInterpreterFormType.php b/src/CoreShop/Bundle/IndexBundle/Form/Type/Interpreter/ObjectPropertyInterpreterFormType.php
index be8e39fa3c..242d12e8c2 100644
--- a/src/CoreShop/Bundle/IndexBundle/Form/Type/Interpreter/ObjectPropertyInterpreterFormType.php
+++ b/src/CoreShop/Bundle/IndexBundle/Form/Type/Interpreter/ObjectPropertyInterpreterFormType.php
@@ -1,17 +1,21 @@
[
new NotBlank(['groups' => $this->validationGroups]),
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/IndexBundle/Form/Type/Worker/MysqlWorkerTableIndexType.php b/src/CoreShop/Bundle/IndexBundle/Form/Type/Worker/MysqlWorkerTableIndexType.php
index cace59b9af..d8a60f9959 100644
--- a/src/CoreShop/Bundle/IndexBundle/Form/Type/Worker/MysqlWorkerTableIndexType.php
+++ b/src/CoreShop/Bundle/IndexBundle/Form/Type/Worker/MysqlWorkerTableIndexType.php
@@ -1,17 +1,21 @@
add('columns', CollectionType::class, [
'allow_delete' => true,
'allow_add' => true,
- ]);
+ ])
+ ;
}
public function configureOptions(OptionsResolver $resolver): void
diff --git a/src/CoreShop/Bundle/IndexBundle/Form/Type/Worker/MysqlWorkerType.php b/src/CoreShop/Bundle/IndexBundle/Form/Type/Worker/MysqlWorkerType.php
index b29db6b5c5..05019cf45f 100644
--- a/src/CoreShop/Bundle/IndexBundle/Form/Type/Worker/MysqlWorkerType.php
+++ b/src/CoreShop/Bundle/IndexBundle/Form/Type/Worker/MysqlWorkerType.php
@@ -1,17 +1,21 @@
true,
'allow_delete' => true,
'by_reference' => false,
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/IndexBundle/Installer.php b/src/CoreShop/Bundle/IndexBundle/Installer.php
index 874708c574..179614b79c 100644
--- a/src/CoreShop/Bundle/IndexBundle/Installer.php
+++ b/src/CoreShop/Bundle/IndexBundle/Installer.php
@@ -1,17 +1,21 @@
'coreshop:resources:install'];
$options = array_merge(
$options,
- ['--no-interaction' => true, '--application-name object_index']
+ ['--no-interaction' => true, '--application-name object_index'],
);
$application->run(new ArrayInput($options));
$options = ['command' => 'coreshop:resources:create-tables'];
$options = array_merge(
$options,
- ['application-name' => 'coreshop', '--no-interaction' => true, '--force' => true]
+ ['application-name' => 'coreshop', '--no-interaction' => true, '--force' => true],
);
$application->run(new ArrayInput($options));
diff --git a/src/CoreShop/Bundle/IndexBundle/Menu/IndexMenuBuilder.php b/src/CoreShop/Bundle/IndexBundle/Menu/IndexMenuBuilder.php
index a9fb4378af..caf171e745 100644
--- a/src/CoreShop/Bundle/IndexBundle/Menu/IndexMenuBuilder.php
+++ b/src/CoreShop/Bundle/IndexBundle/Menu/IndexMenuBuilder.php
@@ -1,17 +1,21 @@
setAttribute('permission', 'coreshop_permission_index')
->setAttribute('iconCls', 'coreshop_nav_icon_indexes')
->setAttribute('resource', 'coreshop.index')
- ->setAttribute('function', 'index');
+ ->setAttribute('function', 'index')
+ ;
$menuItem
->addChild('coreshop_filters')
@@ -49,6 +54,7 @@ public function buildMenu(ItemInterface $menuItem, FactoryInterface $factory, st
->setAttribute('permission', 'coreshop_permission_filter')
->setAttribute('iconCls', 'coreshop_nav_icon_filters')
->setAttribute('resource', 'coreshop.index')
- ->setAttribute('function', 'filter');
+ ->setAttribute('function', 'filter')
+ ;
}
}
diff --git a/src/CoreShop/Bundle/IndexBundle/Migrations/Version20200224161101.php b/src/CoreShop/Bundle/IndexBundle/Migrations/Version20200224161101.php
index 122c1a0468..709f45ccb5 100644
--- a/src/CoreShop/Bundle/IndexBundle/Migrations/Version20200224161101.php
+++ b/src/CoreShop/Bundle/IndexBundle/Migrations/Version20200224161101.php
@@ -1,17 +1,21 @@
process = $this->processFactory->createProcess(
sprintf(
'CoreShop Index: %s',
- $date->formatLocalized('%A %d %B %Y')
+ $date->formatLocalized('%A %d %B %Y'),
),
'coreshop_index',
'Indexing',
-1,
- 0
+ 0,
);
$this->process->save();
diff --git a/src/CoreShop/Bundle/IndexBundle/ProcessManager/IndexProcess.php b/src/CoreShop/Bundle/IndexBundle/ProcessManager/IndexProcess.php
index be4d49c2b2..184d3147db 100644
--- a/src/CoreShop/Bundle/IndexBundle/ProcessManager/IndexProcess.php
+++ b/src/CoreShop/Bundle/IndexBundle/ProcessManager/IndexProcess.php
@@ -1,17 +1,21 @@
getInterpreter(), InterpreterInterface::class, $interpreter)
+ sprintf('%s needs to implement "%s", "%s" given.', $column->getInterpreter(), InterpreterInterface::class, $interpreter),
);
}
diff --git a/src/CoreShop/Bundle/IndexBundle/Worker/MysqlWorker.php b/src/CoreShop/Bundle/IndexBundle/Worker/MysqlWorker.php
index f40199a0d7..6a36929782 100644
--- a/src/CoreShop/Bundle/IndexBundle/Worker/MysqlWorker.php
+++ b/src/CoreShop/Bundle/IndexBundle/Worker/MysqlWorker.php
@@ -1,17 +1,21 @@
database->executeQuery('DROP TABLE IF EXISTS `' . $this->getLocalizedTablename($index->getName()) . '`');
$this->database->executeQuery('DROP TABLE IF EXISTS `' . $this->getRelationTablename($index->getName()) . '`');
} catch (\Exception $e) {
- $this->logger->error((string)$e);
+ $this->logger->error((string) $e);
}
}
@@ -307,13 +311,13 @@ public function renameIndexStructures(IndexInterface $index, string $oldName, st
sprintf(
'RENAME TABLE `%s` TO `%s`',
$oldTable,
- $newTable
- )
+ $newTable,
+ ),
);
}
}
} catch (\Exception $e) {
- $this->logger->error((string)$e);
+ $this->logger->error((string) $e);
}
}
diff --git a/src/CoreShop/Bundle/IndexBundle/Worker/MysqlWorker/Listing.php b/src/CoreShop/Bundle/IndexBundle/Worker/MysqlWorker/Listing.php
index 4ce56da685..994f628ea6 100644
--- a/src/CoreShop/Bundle/IndexBundle/Worker/MysqlWorker/Listing.php
+++ b/src/CoreShop/Bundle/IndexBundle/Worker/MysqlWorker/Listing.php
@@ -1,17 +1,21 @@
worker instanceof MysqlWorker) {
@@ -316,7 +321,7 @@ public function getGroupByRelationValuesAndType(
$fieldName,
$type,
$countValues = false,
- $fieldNameShouldBeExcluded = true
+ $fieldNameShouldBeExcluded = true,
) {
$excludedFieldName = $fieldName;
if (!$fieldNameShouldBeExcluded) {
diff --git a/src/CoreShop/Bundle/IndexBundle/Worker/MysqlWorker/Listing/Dao.php b/src/CoreShop/Bundle/IndexBundle/Worker/MysqlWorker/Listing/Dao.php
index a6b7a16ab2..00b467d456 100644
--- a/src/CoreShop/Bundle/IndexBundle/Worker/MysqlWorker/Listing/Dao.php
+++ b/src/CoreShop/Bundle/IndexBundle/Worker/MysqlWorker/Listing/Dao.php
@@ -1,17 +1,21 @@
database->executeQuery($queryBuilder->getSQL());
- return (int)$stmt->fetchOne();
+ return (int) $stmt->fetchOne();
}
/**
diff --git a/src/CoreShop/Bundle/IndexBundle/Worker/MysqlWorker/TableIndex.php b/src/CoreShop/Bundle/IndexBundle/Worker/MysqlWorker/TableIndex.php
index 1559a87222..e3d4e49786 100644
--- a/src/CoreShop/Bundle/IndexBundle/Worker/MysqlWorker/TableIndex.php
+++ b/src/CoreShop/Bundle/IndexBundle/Worker/MysqlWorker/TableIndex.php
@@ -1,17 +1,21 @@
addDefaultsIfNotSet()
->children()
->scalarNode('checker')->defaultValue(AvailabilityChecker::class)->cannotBeEmpty()->end()
- ->end();
+ ->end()
+ ;
return $treeBuilder;
}
diff --git a/src/CoreShop/Bundle/InventoryBundle/DependencyInjection/CoreShopInventoryExtension.php b/src/CoreShop/Bundle/InventoryBundle/DependencyInjection/CoreShopInventoryExtension.php
index 1bacda4a75..941c5cbbd6 100644
--- a/src/CoreShop/Bundle/InventoryBundle/DependencyInjection/CoreShopInventoryExtension.php
+++ b/src/CoreShop/Bundle/InventoryBundle/DependencyInjection/CoreShopInventoryExtension.php
@@ -1,17 +1,21 @@
availabilityChecker->isStockSufficient($stockable, $quantity)) {
$this->context->addViolation(
$constraint->message,
- ['%stockable%' => $stockable->getInventoryName()]
+ ['%stockable%' => $stockable->getInventoryName()],
);
}
}
diff --git a/src/CoreShop/Bundle/LocaleBundle/CoreShopLocaleBundle.php b/src/CoreShop/Bundle/LocaleBundle/CoreShopLocaleBundle.php
index cb363833bb..8981e5a2db 100644
--- a/src/CoreShop/Bundle/LocaleBundle/CoreShopLocaleBundle.php
+++ b/src/CoreShop/Bundle/LocaleBundle/CoreShopLocaleBundle.php
@@ -1,17 +1,21 @@
registerForAutoconfiguration(LocaleContextInterface::class)
- ->addTag(CompositeLocaleContextPass::LOCALE_CONTEXT_SERVICE_TAG);
+ ->addTag(CompositeLocaleContextPass::LOCALE_CONTEXT_SERVICE_TAG)
+ ;
}
}
diff --git a/src/CoreShop/Bundle/LocaleBundle/Form/Type/LocaleChoiceType.php b/src/CoreShop/Bundle/LocaleBundle/Form/Type/LocaleChoiceType.php
index 89af807c1b..feacb78685 100644
--- a/src/CoreShop/Bundle/LocaleBundle/Form/Type/LocaleChoiceType.php
+++ b/src/CoreShop/Bundle/LocaleBundle/Form/Type/LocaleChoiceType.php
@@ -1,17 +1,21 @@
false,
- ]);
+ ])
+ ;
}
public function getParent(): string
diff --git a/src/CoreShop/Bundle/MenuBundle/Builder.php b/src/CoreShop/Bundle/MenuBundle/Builder.php
index e03a1f0de2..8907c3f667 100644
--- a/src/CoreShop/Bundle/MenuBundle/Builder.php
+++ b/src/CoreShop/Bundle/MenuBundle/Builder.php
@@ -1,17 +1,21 @@
setDefinition('coreshop.menu.builder.' . $type, $builderService);
diff --git a/src/CoreShop/Bundle/MenuBundle/DependencyInjection/CoreShopMenuExtension.php b/src/CoreShop/Bundle/MenuBundle/DependencyInjection/CoreShopMenuExtension.php
index 79c8d1dd8b..2e9ebc569f 100644
--- a/src/CoreShop/Bundle/MenuBundle/DependencyInjection/CoreShopMenuExtension.php
+++ b/src/CoreShop/Bundle/MenuBundle/DependencyInjection/CoreShopMenuExtension.php
@@ -1,17 +1,21 @@
registerForAutoconfiguration(MenuBuilderInterface::class)
- ->addTag(MenuBuilderPass::MENU_BUILDER_TAG);
+ ->addTag(MenuBuilderPass::MENU_BUILDER_TAG)
+ ;
}
}
diff --git a/src/CoreShop/Bundle/MenuBundle/EventListener/PimcoreAdminListener.php b/src/CoreShop/Bundle/MenuBundle/EventListener/PimcoreAdminListener.php
index ae795a3f03..188b8ff096 100644
--- a/src/CoreShop/Bundle/MenuBundle/EventListener/PimcoreAdminListener.php
+++ b/src/CoreShop/Bundle/MenuBundle/EventListener/PimcoreAdminListener.php
@@ -1,17 +1,21 @@
'addJsFiles'
+ BundleManagerEvents::JS_PATHS => 'addJsFiles',
];
}
@@ -33,9 +37,9 @@ public function addJSFiles(PathsEvent $event)
array_merge(
$event->getPaths(),
[
- '/bundles/coreshopmenu/pimcore/js/events.js'
- ]
- )
+ '/bundles/coreshopmenu/pimcore/js/events.js',
+ ],
+ ),
);
}
-}
\ No newline at end of file
+}
diff --git a/src/CoreShop/Bundle/MenuBundle/Guard/PimcoreGuard.php b/src/CoreShop/Bundle/MenuBundle/Guard/PimcoreGuard.php
index 41ec24c35c..44f1568b0d 100644
--- a/src/CoreShop/Bundle/MenuBundle/Guard/PimcoreGuard.php
+++ b/src/CoreShop/Bundle/MenuBundle/Guard/PimcoreGuard.php
@@ -1,17 +1,21 @@
tokenStorageUserResolver->getUser();
if ($user instanceof User) {
- return $user->isAllowed((string)$item->getAttribute('permission'));
+ return $user->isAllowed((string) $item->getAttribute('permission'));
}
return false;
diff --git a/src/CoreShop/Bundle/MenuBundle/Renderer/JsonRenderer.php b/src/CoreShop/Bundle/MenuBundle/Renderer/JsonRenderer.php
index f511634533..129e82a8dc 100644
--- a/src/CoreShop/Bundle/MenuBundle/Renderer/JsonRenderer.php
+++ b/src/CoreShop/Bundle/MenuBundle/Renderer/JsonRenderer.php
@@ -1,17 +1,21 @@
defaultOptions = array_merge([
'depth' => null,
@@ -52,7 +56,7 @@ public function render(ItemInterface $item, array $options = []): string
'item' => $this->renderItem($item),
'items' => $items,
'options' => $options,
- ]
+ ],
);
}
@@ -130,7 +134,7 @@ public function reorderMenuItems(ItemInterface $menu): void
$menuOrderArray = array_merge(
array_slice($menuOrderArray, 0, $position),
[$value],
- array_slice($menuOrderArray, $position)
+ array_slice($menuOrderArray, $position),
);
}
}
diff --git a/src/CoreShop/Bundle/MoneyBundle/CoreExtension/Money.php b/src/CoreShop/Bundle/MoneyBundle/CoreExtension/Money.php
index 9b1ab033e5..facab8681a 100644
--- a/src/CoreShop/Bundle/MoneyBundle/CoreExtension/Money.php
+++ b/src/CoreShop/Bundle/MoneyBundle/CoreExtension/Money.php
@@ -1,17 +1,21 @@
0) {
+ if (strlen((string) $defaultValue) > 0) {
$this->defaultValue = $defaultValue;
}
@@ -165,17 +169,11 @@ public function getMinValue()
return $this->minValue;
}
- /**
- * @return bool
- */
public function getNullable(): bool
{
return $this->nullable;
}
- /**
- * @param bool $nullable
- */
public function setNullable(bool $nullable): void
{
$this->nullable = $nullable;
@@ -218,7 +216,7 @@ public function unmarshalRecycleData($object, $data)
public function getDataForResource($data, $object = null, $params = [])
{
if (is_numeric($data) && !is_int($data)) {
- $data = (int)$data;
+ $data = (int) $data;
}
if (is_int($data)) {
@@ -255,7 +253,7 @@ public function getGetterCode($class)
$code .= '* Get ' . str_replace(['/**', '*/', '//'], '', $this->getName()) . ' - ' . str_replace(['/**', '*/', '//'], '', $this->getTitle()) . "\n";
$code .= '* @return ' . $this->getPhpdocReturnType() . "\n";
$code .= '*/' . "\n";
- $code .= 'public function get' . ucfirst($key) . " (): ".($this->nullable ? '?' : '')."int {\n";
+ $code .= 'public function get' . ucfirst($key) . ' (): ' . ($this->nullable ? '?' : '') . "int {\n";
$code .= $this->getPreGetValueHookCode($key);
@@ -313,7 +311,7 @@ public function getSetterCode($class)
$code .= '* @param ' . $this->getPhpdocReturnType() . ' $' . $key . "\n";
$code .= '* @return ' . $returnType . "\n";
$code .= '*/' . "\n";
- $code .= 'public function set' . ucfirst($key) . ' ('.($this->nullable ? '?' : '').'int ' . '$' . $key . ") {\n";
+ $code .= 'public function set' . ucfirst($key) . ' (' . ($this->nullable ? '?' : '') . 'int ' . '$' . $key . ") {\n";
$code .= "\t" . '$fd = $this->getClass()->getFieldDefinition("' . $key . '");' . "\n";
if ($this instanceof DataObject\ClassDefinition\Data\EncryptedField) {
@@ -354,7 +352,7 @@ public function getGetterCodeObjectbrick($brickClass)
$code .= '* Get ' . str_replace(['/**', '*/', '//'], '', $this->getName()) . ' - ' . str_replace(['/**', '*/', '//'], '', $this->getTitle()) . "\n";
$code .= '* @return ' . $this->getPhpdocReturnType() . "\n";
$code .= '*/' . "\n";
- $code .= 'public function get' . ucfirst($key) . " (): ".($this->nullable ? '?' : '')." {\n";
+ $code .= 'public function get' . ucfirst($key) . ' (): ' . ($this->nullable ? '?' : '') . " {\n";
if (method_exists($this, 'preGetData')) {
$code .= "\t" . '$data = $this->getDefinition()->getFieldDefinition("' . $key . '")->preGetData($this);' . "\n";
@@ -392,7 +390,7 @@ public function getSetterCodeObjectbrick($brickClass)
$code .= '* @param ' . $this->getPhpdocReturnType() . ' $' . $key . "\n";
$code .= '* @return \\Pimcore\\Model\\DataObject\\Objectbrick\\Data\\' . ucfirst($brickClass->getKey()) . "\n";
$code .= '*/' . "\n";
- $code .= 'public function set' . ucfirst($key) . ' ('.($this->nullable ? '?' : '').'int ' . '$' . $key . ") {\n";
+ $code .= 'public function set' . ucfirst($key) . ' (' . ($this->nullable ? '?' : '') . 'int ' . '$' . $key . ") {\n";
$code .= "\t" . '$fd = $this->getDefinition()->getFieldDefinition("' . $key . '");' . "\n";
if ($this instanceof DataObject\ClassDefinition\Data\EncryptedField) {
@@ -434,7 +432,7 @@ public function getGetterCodeFieldcollection($fieldcollectionDefinition)
$code .= '* Get ' . str_replace(['/**', '*/', '//'], '', $this->getName()) . ' - ' . str_replace(['/**', '*/', '//'], '', $this->getTitle()) . "\n";
$code .= '* @return ' . $this->getPhpdocReturnType() . "\n";
$code .= '*/' . "\n";
- $code .= 'public function get' . ucfirst($key) . " (): ".($this->nullable ? '?' : '')."int {\n";
+ $code .= 'public function get' . ucfirst($key) . ' (): ' . ($this->nullable ? '?' : '') . "int {\n";
if (method_exists($this, 'preGetData')) {
$code .= "\t" . '$container = $this;' . "\n";
@@ -464,7 +462,7 @@ public function getSetterCodeFieldcollection($fieldcollectionDefinition)
$code .= '* @param ' . $this->getPhpdocReturnType() . ' $' . $key . "\n";
$code .= '* @return \\Pimcore\\Model\\DataObject\\Fieldcollection\\Data\\' . ucfirst($fieldcollectionDefinition->getKey()) . "\n";
$code .= '*/' . "\n";
- $code .= 'public function set' . ucfirst($key) . ' ('.($this->nullable ? '?' : '').'int ' . '$' . $key . ") {\n";
+ $code .= 'public function set' . ucfirst($key) . ' (' . ($this->nullable ? '?' : '') . 'int ' . '$' . $key . ") {\n";
$code .= "\t" . '$fd = $this->getDefinition()->getFieldDefinition("' . $key . '");' . "\n";
if ($this instanceof DataObject\ClassDefinition\Data\EncryptedField) {
@@ -504,7 +502,7 @@ public function getGetterCodeLocalizedfields($class)
$code .= '* Get ' . str_replace(['/**', '*/', '//'], '', $this->getName()) . ' - ' . str_replace(['/**', '*/', '//'], '', $this->getTitle()) . "\n";
$code .= '* @return ' . $this->getPhpdocReturnType() . "\n";
$code .= '*/' . "\n";
- $code .= 'public function get' . ucfirst($key) . ' ($language = null): '.($this->nullable ? '?' : '').'int {' . "\n";
+ $code .= 'public function get' . ucfirst($key) . ' ($language = null): ' . ($this->nullable ? '?' : '') . 'int {' . "\n";
$code .= "\t" . '$data = $this->getLocalizedfields()->getLocalizedValue("' . $key . '", $language);' . "\n";
@@ -544,7 +542,7 @@ public function getSetterCodeLocalizedfields($class)
$code .= '* @param ' . $this->getPhpdocReturnType() . ' $' . $key . "\n";
$code .= '* @return \\Pimcore\\Model\\DataObject\\' . ucfirst($classname) . "\n";
$code .= '*/' . "\n";
- $code .= 'public function set' . ucfirst($key) . ' ('.($this->nullable ? '?' : '').'int ' . '$' . $key . ', $language = null) {' . "\n";
+ $code .= 'public function set' . ucfirst($key) . ' (' . ($this->nullable ? '?' : '') . 'int ' . '$' . $key . ', $language = null) {' . "\n";
if ($this->supportsDirtyDetection()) {
$code .= "\t" . '$fd = $this->' . $containerGetter . '()->getFieldDefinition("localizedfields")->getFieldDefinition("' . $key . '");' . "\n";
}
@@ -604,7 +602,7 @@ public function getDataForEditmode($data, $object = null, $params = [])
public function getDataFromEditmode($data, $object = null, $params = [])
{
if (is_numeric($data)) {
- return (int)round((round((float)$data, $this->getDecimalPrecision()) * $this->getDecimalFactor()), 0);
+ return (int) round((round((float) $data, $this->getDecimalPrecision()) * $this->getDecimalFactor()), 0);
}
return $data;
@@ -646,7 +644,7 @@ public function getForCsvExport($object, $params = [])
{
$data = $this->getDataFromObjectParam($object, $params);
- return (string)$data;
+ return (string) $data;
}
public function getFromCsvImport($importValue, $object = null, $params = [])
@@ -695,10 +693,10 @@ protected function getDecimalPrecision()
*/
protected function toNumeric($value): float|int
{
- if (!str_contains((string)$value, '.')) {
- return (int)$value;
+ if (!str_contains((string) $value, '.')) {
+ return (int) $value;
}
- return (float)$value;
+ return (float) $value;
}
}
diff --git a/src/CoreShop/Bundle/MoneyBundle/CoreShopMoneyBundle.php b/src/CoreShop/Bundle/MoneyBundle/CoreShopMoneyBundle.php
index 24b1badc33..11e2635e92 100644
--- a/src/CoreShop/Bundle/MoneyBundle/CoreShopMoneyBundle.php
+++ b/src/CoreShop/Bundle/MoneyBundle/CoreShopMoneyBundle.php
@@ -1,17 +1,21 @@
$fieldDefinition->getName(),
'type' => $this->getFieldType($fieldDefinition, $class, $container),
],
- $container
+ $container,
);
}
diff --git a/src/CoreShop/Bundle/MoneyBundle/DependencyInjection/Configuration.php b/src/CoreShop/Bundle/MoneyBundle/DependencyInjection/Configuration.php
index 7ecb3ae586..06600ec16e 100644
--- a/src/CoreShop/Bundle/MoneyBundle/DependencyInjection/Configuration.php
+++ b/src/CoreShop/Bundle/MoneyBundle/DependencyInjection/Configuration.php
@@ -1,17 +1,21 @@
end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/MoneyBundle/DependencyInjection/CoreShopMoneyExtension.php b/src/CoreShop/Bundle/MoneyBundle/DependencyInjection/CoreShopMoneyExtension.php
index 934786f073..1e5d2c7539 100644
--- a/src/CoreShop/Bundle/MoneyBundle/DependencyInjection/CoreShopMoneyExtension.php
+++ b/src/CoreShop/Bundle/MoneyBundle/DependencyInjection/CoreShopMoneyExtension.php
@@ -1,17 +1,21 @@
decimalFactor);
+ return (int) round($value * $this->decimalFactor);
}
}
diff --git a/src/CoreShop/Bundle/MoneyBundle/Form/Type/MoneyType.php b/src/CoreShop/Bundle/MoneyBundle/Form/Type/MoneyType.php
index a93b38e632..d16ddc5c1a 100644
--- a/src/CoreShop/Bundle/MoneyBundle/Form/Type/MoneyType.php
+++ b/src/CoreShop/Bundle/MoneyBundle/Form/Type/MoneyType.php
@@ -1,17 +1,21 @@
addModelTransformer(
- new MoneyToIntegerTransformer($this->decimalFactor)
+ new MoneyToIntegerTransformer($this->decimalFactor),
);
}
diff --git a/src/CoreShop/Bundle/MoneyBundle/Formatter/MoneyFormatter.php b/src/CoreShop/Bundle/MoneyBundle/Formatter/MoneyFormatter.php
index 3b87a0ca96..011a9a15a3 100644
--- a/src/CoreShop/Bundle/MoneyBundle/Formatter/MoneyFormatter.php
+++ b/src/CoreShop/Bundle/MoneyBundle/Formatter/MoneyFormatter.php
@@ -1,17 +1,21 @@
= 0 ? $result : '-' . $result;
diff --git a/src/CoreShop/Bundle/MoneyBundle/Resources/public/pimcore/css/money.css b/src/CoreShop/Bundle/MoneyBundle/Resources/public/pimcore/css/money.css
index 6de12c5374..27f51494e8 100644
--- a/src/CoreShop/Bundle/MoneyBundle/Resources/public/pimcore/css/money.css
+++ b/src/CoreShop/Bundle/MoneyBundle/Resources/public/pimcore/css/money.css
@@ -1,12 +1,15 @@
-/**
- * CoreShop.
+/*
+ * CoreShop
*
- * This source file is subject to the GNU General Public License version 3 (GPLv3)
- * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
- * files that are distributed with this source code.
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
* @license https://www.coreshop.org/license GPLv3 and CCL
+ *
*/
.coreshop_icon_money, .pimcore_icon_coreShopMoney{
diff --git a/src/CoreShop/Bundle/MoneyBundle/Resources/public/pimcore/js/coreExtension/data/coreShopMoney.js b/src/CoreShop/Bundle/MoneyBundle/Resources/public/pimcore/js/coreExtension/data/coreShopMoney.js
index 4cfd7f2da8..ba23d69b61 100755
--- a/src/CoreShop/Bundle/MoneyBundle/Resources/public/pimcore/js/coreExtension/data/coreShopMoney.js
+++ b/src/CoreShop/Bundle/MoneyBundle/Resources/public/pimcore/js/coreExtension/data/coreShopMoney.js
@@ -1,12 +1,15 @@
-/**
- * CoreShop.
+/*
+ * CoreShop
*
- * This source file is subject to the GNU General Public License version 3 (GPLv3)
- * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
- * files that are distributed with this source code.
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
* @license https://www.coreshop.org/license GPLv3 and CCL
+ *
*/
pimcore.registerNS("pimcore.object.classes.data.coreShopMoney");
diff --git a/src/CoreShop/Bundle/MoneyBundle/Resources/public/pimcore/js/coreExtension/tags/coreShopMoney.js b/src/CoreShop/Bundle/MoneyBundle/Resources/public/pimcore/js/coreExtension/tags/coreShopMoney.js
index 396257f50c..b9a52a7b2e 100755
--- a/src/CoreShop/Bundle/MoneyBundle/Resources/public/pimcore/js/coreExtension/tags/coreShopMoney.js
+++ b/src/CoreShop/Bundle/MoneyBundle/Resources/public/pimcore/js/coreExtension/tags/coreShopMoney.js
@@ -1,12 +1,15 @@
-/**
- * CoreShop.
+/*
+ * CoreShop
*
- * This source file is subject to the GNU General Public License version 3 (GPLv3)
- * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
- * files that are distributed with this source code.
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
* @license https://www.coreshop.org/license GPLv3 and CCL
+ *
*/
pimcore.registerNS("pimcore.object.tags.coreShopMoney");
diff --git a/src/CoreShop/Bundle/MoneyBundle/Twig/FormatMoneyExtension.php b/src/CoreShop/Bundle/MoneyBundle/Twig/FormatMoneyExtension.php
index a6ea9c712d..a219a3017a 100644
--- a/src/CoreShop/Bundle/MoneyBundle/Twig/FormatMoneyExtension.php
+++ b/src/CoreShop/Bundle/MoneyBundle/Twig/FormatMoneyExtension.php
@@ -1,17 +1,21 @@
type . '-' . $type]
+ [ConditionCheckerInterface::class, 'notification-rule-' . $this->type . '-' . $type],
);
$formRegistries[$type] = new Definition(
- FormTypeRegistry::class
+ FormTypeRegistry::class,
);
$types[] = $type;
diff --git a/src/CoreShop/Bundle/NotificationBundle/DependencyInjection/Compiler/NotificationRuleActionPass.php b/src/CoreShop/Bundle/NotificationBundle/DependencyInjection/Compiler/NotificationRuleActionPass.php
index 9877b7f0fe..8f2921aa96 100644
--- a/src/CoreShop/Bundle/NotificationBundle/DependencyInjection/Compiler/NotificationRuleActionPass.php
+++ b/src/CoreShop/Bundle/NotificationBundle/DependencyInjection/Compiler/NotificationRuleActionPass.php
@@ -1,17 +1,21 @@
end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
@@ -96,6 +101,7 @@ private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/NotificationBundle/DependencyInjection/CoreShopNotificationExtension.php b/src/CoreShop/Bundle/NotificationBundle/DependencyInjection/CoreShopNotificationExtension.php
index 2ddecbf65e..76f0653051 100644
--- a/src/CoreShop/Bundle/NotificationBundle/DependencyInjection/CoreShopNotificationExtension.php
+++ b/src/CoreShop/Bundle/NotificationBundle/DependencyInjection/CoreShopNotificationExtension.php
@@ -1,17 +1,21 @@
setParameter('type', $type)
->setParameter('active', true)
->getQuery()
- ->getResult();
+ ->getResult()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/NotificationBundle/EventListener/NotificationRuleEventListener.php b/src/CoreShop/Bundle/NotificationBundle/EventListener/NotificationRuleEventListener.php
index 599ec790bc..8645d615de 100644
--- a/src/CoreShop/Bundle/NotificationBundle/EventListener/NotificationRuleEventListener.php
+++ b/src/CoreShop/Bundle/NotificationBundle/EventListener/NotificationRuleEventListener.php
@@ -1,17 +1,21 @@
[
'data-form-collection' => 'update',
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/NotificationBundle/Form/Type/NotificationRuleConditionChoiceType.php b/src/CoreShop/Bundle/NotificationBundle/Form/Type/NotificationRuleConditionChoiceType.php
index 183b8337d3..a6b972d45d 100644
--- a/src/CoreShop/Bundle/NotificationBundle/Form/Type/NotificationRuleConditionChoiceType.php
+++ b/src/CoreShop/Bundle/NotificationBundle/Form/Type/NotificationRuleConditionChoiceType.php
@@ -1,17 +1,21 @@
[
'data-form-collection' => 'update',
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/NotificationBundle/Form/Type/NotificationRuleType.php b/src/CoreShop/Bundle/NotificationBundle/Form/Type/NotificationRuleType.php
index 212c005a0e..a17a449601 100644
--- a/src/CoreShop/Bundle/NotificationBundle/Form/Type/NotificationRuleType.php
+++ b/src/CoreShop/Bundle/NotificationBundle/Form/Type/NotificationRuleType.php
@@ -1,17 +1,21 @@
add('active', CheckboxType::class)
->add('type', NotificationRuleTypeChoiceType::class)
->add('conditions', NotificationRuleConditionCollectionType::class)
- ->add('actions', NotificationRuleActionCollectionType::class);
+ ->add('actions', NotificationRuleActionCollectionType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/NotificationBundle/Form/Type/NotificationRuleTypeChoiceType.php b/src/CoreShop/Bundle/NotificationBundle/Form/Type/NotificationRuleTypeChoiceType.php
index fdef8ca1f3..3b151eaf7e 100644
--- a/src/CoreShop/Bundle/NotificationBundle/Form/Type/NotificationRuleTypeChoiceType.php
+++ b/src/CoreShop/Bundle/NotificationBundle/Form/Type/NotificationRuleTypeChoiceType.php
@@ -1,17 +1,21 @@
true,
'allow_delete' => true,
])
- ->add('doNotSendToDesignatedRecipient', CheckboxType::class);
+ ->add('doNotSendToDesignatedRecipient', CheckboxType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/NotificationBundle/Processor/EventedRuleProcessor.php b/src/CoreShop/Bundle/NotificationBundle/Processor/EventedRuleProcessor.php
index cdec262665..c3b1626362 100644
--- a/src/CoreShop/Bundle/NotificationBundle/Processor/EventedRuleProcessor.php
+++ b/src/CoreShop/Bundle/NotificationBundle/Processor/EventedRuleProcessor.php
@@ -1,17 +1,21 @@
setParameter('id', $object->getId())
;
- $currentVersion = (int)$this->connection->fetchOne($queryBuilder->getSQL(), $queryBuilder->getParameters());
+ $currentVersion = (int) $this->connection->fetchOne($queryBuilder->getSQL(), $queryBuilder->getParameters());
if ($currentVersion === $object->getOptimisticLockVersion()) {
return;
@@ -119,7 +125,7 @@ private function ensureVersionMatch(Concrete $object): void
throw OptimisticLockException::lockFailedVersionMismatch(
$object,
$object->getOptimisticLockVersion(),
- $currentVersion
+ $currentVersion,
);
}
}
diff --git a/src/CoreShop/Bundle/OptimisticEntityLockBundle/Exception/OptimisticLockException.php b/src/CoreShop/Bundle/OptimisticEntityLockBundle/Exception/OptimisticLockException.php
index facfa0b8c0..2563898bb8 100644
--- a/src/CoreShop/Bundle/OptimisticEntityLockBundle/Exception/OptimisticLockException.php
+++ b/src/CoreShop/Bundle/OptimisticEntityLockBundle/Exception/OptimisticLockException.php
@@ -1,25 +1,31 @@
data = [
'cart' => null,
diff --git a/src/CoreShop/Bundle/OrderBundle/Command/CartExpireCommand.php b/src/CoreShop/Bundle/OrderBundle/Command/CartExpireCommand.php
index 222706a9a6..cb9071f1e0 100644
--- a/src/CoreShop/Bundle/OrderBundle/Command/CartExpireCommand.php
+++ b/src/CoreShop/Bundle/OrderBundle/Command/CartExpireCommand.php
@@ -1,17 +1,21 @@
addOption(
'anonymous',
'a',
InputOption::VALUE_NONE,
- 'Delete only anonymous carts'
+ 'Delete only anonymous carts',
)
->addOption(
'user',
'u',
InputOption::VALUE_NONE,
- 'Delete only user carts'
- );
+ 'Delete only user carts',
+ )
+ ;
}
protected function execute(InputInterface $input, OutputInterface $output): int
@@ -58,7 +66,7 @@ protected function execute(InputInterface $input, OutputInterface $output): int
$params = $this->params;
if ($input->getOption('days')) {
- $days = (int)$input->getOption('days');
+ $days = (int) $input->getOption('days');
}
if ($input->getOption('anonymous')) {
diff --git a/src/CoreShop/Bundle/OrderBundle/Command/OrderExpireCommand.php b/src/CoreShop/Bundle/OrderBundle/Command/OrderExpireCommand.php
index a0d18119cd..9b084104c1 100644
--- a/src/CoreShop/Bundle/OrderBundle/Command/OrderExpireCommand.php
+++ b/src/CoreShop/Bundle/OrderBundle/Command/OrderExpireCommand.php
@@ -1,17 +1,21 @@
days;
if ($input->getOption('days')) {
- $days = (int)$input->getOption('days');
+ $days = (int) $input->getOption('days');
}
$output->writeln('Running order expire job, this could take some time.');
diff --git a/src/CoreShop/Bundle/OrderBundle/Controller/AddressCreationController.php b/src/CoreShop/Bundle/OrderBundle/Controller/AddressCreationController.php
index 8bfab1f173..84bfc98831 100644
--- a/src/CoreShop/Bundle/OrderBundle/Controller/AddressCreationController.php
+++ b/src/CoreShop/Bundle/OrderBundle/Controller/AddressCreationController.php
@@ -1,17 +1,21 @@
get('form.factory')->createNamed('', AdminAddressCreationType::class);
@@ -56,7 +60,7 @@ public function createAddressAction(
$address->setParent($objectService->createFolderByPath(sprintf(
'/%s/%s',
$customer->getFullPath(),
- (string)$this->container->getParameter('coreshop.folder.address')
+ (string) $this->container->getParameter('coreshop.folder.address'),
)));
$address->save();
@@ -78,7 +82,7 @@ public function createAddressAction(
[
'success' => false,
'message' => $errorSerializer->serializeErrorFromHandledForm($form),
- ]
+ ],
);
}
diff --git a/src/CoreShop/Bundle/OrderBundle/Controller/CartPriceRuleController.php b/src/CoreShop/Bundle/OrderBundle/Controller/CartPriceRuleController.php
index efcdd56f94..dc1f41de7a 100644
--- a/src/CoreShop/Bundle/OrderBundle/Controller/CartPriceRuleController.php
+++ b/src/CoreShop/Bundle/OrderBundle/Controller/CartPriceRuleController.php
@@ -1,17 +1,21 @@
getVoucherCodeRepository()->findAllPaginator(
$cartPriceRule,
- (int)$this->getParameterFromRequest($request, 'start', 0),
- (int)$this->getParameterFromRequest($request, 'limit', 50)
+ (int) $this->getParameterFromRequest($request, 'start', 0),
+ (int) $this->getParameterFromRequest($request, 'limit', 50),
);
return $this->viewHandler->handle(
@@ -79,7 +83,7 @@ public function getVoucherCodesAction(Request $request): JsonResponse
],
[
'group' => 'Detailed',
- ]
+ ],
);
}
@@ -158,8 +162,8 @@ public function exportVoucherCodesAction(Request $request): void
$codes = $this->getVoucherCodeRepository()->findAllPaginator(
$priceRule,
- (int)$this->getParameterFromRequest($request, 'start', 0),
- (int)$this->getParameterFromRequest($request, 'limit', 50)
+ (int) $this->getParameterFromRequest($request, 'start', 0),
+ (int) $this->getParameterFromRequest($request, 'limit', 50),
);
foreach ($codes as $code) {
diff --git a/src/CoreShop/Bundle/OrderBundle/Controller/CustomerCreationController.php b/src/CoreShop/Bundle/OrderBundle/Controller/CustomerCreationController.php
index 9227be7b1e..772ebdcb4e 100644
--- a/src/CoreShop/Bundle/OrderBundle/Controller/CustomerCreationController.php
+++ b/src/CoreShop/Bundle/OrderBundle/Controller/CustomerCreationController.php
@@ -1,17 +1,21 @@
get('form.factory')->createNamed('', AdminCustomerCreationType::class);
@@ -60,8 +64,8 @@ public function createCustomerAction(
[
'path' => 'guest',
'suffix' => mb_strtoupper(mb_substr($customer->getLastname(), 0, 1)),
- ]
- )
+ ],
+ ),
);
$customer->setPublished(true);
@@ -76,8 +80,8 @@ public function createCustomerAction(
$address->setParent(
$folderCreationService->createFolderForResource(
$address,
- ['prefix' => $customer->getFullPath()]
- )
+ ['prefix' => $customer->getFullPath()],
+ ),
);
$address->save();
@@ -103,7 +107,7 @@ public function createCustomerAction(
[
'success' => false,
'message' => $errorSerializer->serializeErrorFromHandledForm($form),
- ]
+ ],
);
}
diff --git a/src/CoreShop/Bundle/OrderBundle/Controller/OrderCommentController.php b/src/CoreShop/Bundle/OrderBundle/Controller/OrderCommentController.php
index b787206124..e7e833e676 100644
--- a/src/CoreShop/Bundle/OrderBundle/Controller/OrderCommentController.php
+++ b/src/CoreShop/Bundle/OrderBundle/Controller/OrderCommentController.php
@@ -1,17 +1,21 @@
getParameterFromRequest($request,'id');
+ $commentId = $this->getParameterFromRequest($request, 'id');
$objectNoteService = $this->get(NoteServiceInterface::class);
$commentEntity = $objectNoteService->getNoteById($commentId);
diff --git a/src/CoreShop/Bundle/OrderBundle/Controller/OrderController.php b/src/CoreShop/Bundle/OrderBundle/Controller/OrderController.php
index fa7eab84de..9b78299c47 100644
--- a/src/CoreShop/Bundle/OrderBundle/Controller/OrderController.php
+++ b/src/CoreShop/Bundle/OrderBundle/Controller/OrderController.php
@@ -1,17 +1,21 @@
getName()]['froms'] =
array_merge(
$transitions[$identifier][$transition->getName()]['froms'],
- $transition->getFroms()
+ $transition->getFroms(),
);
$transitions[$identifier][$transition->getName()]['tos'] =
array_merge(
$transitions[$identifier][$transition->getName()]['tos'],
- $transition->getFroms()
+ $transition->getFroms(),
);
}
@@ -132,10 +136,10 @@ public function getStatesAction(Request $request): Response
public function updateOrderStateAction(
Request $request,
OrderRepositoryInterface $orderRepository,
- StateMachineManagerInterface $stateMachineManager
+ StateMachineManagerInterface $stateMachineManager,
): Response {
$orderId = $this->getParameterFromRequest($request, 'o_id');
- $transition = $this->getParameterFromRequest($request,'transition');
+ $transition = $this->getParameterFromRequest($request, 'transition');
$order = $orderRepository->find($orderId);
if (!$order instanceof OrderInterface) {
@@ -153,7 +157,7 @@ public function updateOrderStateAction(
if ($order instanceof DataObject\Concrete && $transition === OrderTransitions::TRANSITION_CANCEL) {
$this->get(HistoryLogger::class)->log(
$order,
- 'Admin Order Cancellation'
+ 'Admin Order Cancellation',
);
}
@@ -167,10 +171,10 @@ public function getFolderConfigurationAction(Request $request): Response
$name = null;
$folderId = null;
- $type = $this->getParameterFromRequest($request,'saleType', 'order');
+ $type = $this->getParameterFromRequest($request, 'saleType', 'order');
- $orderClassId = (string)$this->container->getParameter('coreshop.model.order.pimcore_class_name');
- $folderPath = (string)$this->container->getParameter('coreshop.folder.' . $type);
+ $orderClassId = (string) $this->container->getParameter('coreshop.model.order.pimcore_class_name');
+ $folderPath = (string) $this->container->getParameter('coreshop.folder.' . $type);
$orderClassDefinition = DataObject\ClassDefinition::getByName($orderClassId);
$folder = DataObject::getByPath('/' . $folderPath);
@@ -201,8 +205,8 @@ public function listAction(Request $request, OrderRepositoryInterface $orderRepo
$conditionFilters = [];
/** @psalm-suppress InternalMethod */
$conditionFilters[] = $gridHelper->getFilterCondition(
- $this->getParameterFromRequest($request,'filter'),
- DataObject\ClassDefinition::getByName((string)$this->container->getParameter('coreshop.model.order.pimcore_class_name'))
+ $this->getParameterFromRequest($request, 'filter'),
+ DataObject\ClassDefinition::getByName((string) $this->container->getParameter('coreshop.model.order.pimcore_class_name')),
);
if (count($conditionFilters) > 0 && $conditionFilters[0] !== '(())') {
$list->setCondition(implode(' AND ', $conditionFilters));
@@ -247,7 +251,7 @@ public function detailAction(Request $request, OrderRepositoryInterface $orderRe
{
$this->isGrantedOr403();
- $orderId = $this->getParameterFromRequest($request,'id');
+ $orderId = $this->getParameterFromRequest($request, 'id');
$order = $orderRepository->find($orderId);
if (!$order instanceof OrderInterface) {
@@ -263,7 +267,7 @@ public function findOrderAction(Request $request, OrderRepositoryInterface $orde
{
$this->isGrantedOr403();
- $number = $this->getParameterFromRequest($request,'number');
+ $number = $this->getParameterFromRequest($request, 'number');
if ($number) {
$list = $orderRepository->getList();
@@ -310,7 +314,7 @@ protected function prepareSale(OrderInterface $order): array
return array_merge(
$element,
$this->prepareAddress($order->getShippingAddress(), 'shipping'),
- $this->prepareAddress($order->getInvoiceAddress(), 'invoice')
+ $this->prepareAddress($order->getInvoiceAddress(), 'invoice'),
);
}
@@ -319,7 +323,7 @@ protected function prepareAddress(AddressInterface $address, string $type): arra
$prefix = 'address' . ucfirst($type);
$values = [];
$fullAddress = [];
- $classDefinition = DataObject\ClassDefinition::getByName((string)$this->container->getParameter('coreshop.model.address.pimcore_class_name'));
+ $classDefinition = DataObject\ClassDefinition::getByName((string) $this->container->getParameter('coreshop.model.address.pimcore_class_name'));
foreach ($classDefinition->getFieldDefinitions() as $fieldDefinition) {
$value = '';
@@ -636,7 +640,7 @@ protected function getPayments(OrderInterface $order): array
}
if (false === is_string($detailValue)) {
- $detailValue = (string)$detailValue;
+ $detailValue = (string) $detailValue;
}
$details[] = [$detailName, $detailValue ? htmlentities($detailValue) : ''];
diff --git a/src/CoreShop/Bundle/OrderBundle/Controller/OrderCreationController.php b/src/CoreShop/Bundle/OrderBundle/Controller/OrderCreationController.php
index 75fa4c1f56..8ba3833aee 100644
--- a/src/CoreShop/Bundle/OrderBundle/Controller/OrderCreationController.php
+++ b/src/CoreShop/Bundle/OrderBundle/Controller/OrderCreationController.php
@@ -1,17 +1,21 @@
isGrantedOr403();
@@ -66,7 +70,7 @@ public function salePreviewAction(
Request $request,
FactoryInterface $orderFactory,
FormFactoryInterface $formFactory,
- CartProcessorInterface $cartProcessor
+ CartProcessorInterface $cartProcessor,
): Response {
$cart = $orderFactory->createNew();
$form = $formFactory->createNamed('', CartCreationType::class, $cart, [
@@ -96,11 +100,11 @@ public function saleCreationAction(
FormFactoryInterface $formFactory,
CartManagerInterface $cartManager,
ErrorSerializer $errorSerializer,
- StateMachineManagerInterface $manager
+ StateMachineManagerInterface $manager,
): Response {
$this->isGrantedOr403();
- $type = $this->getParameterFromRequest($request,'saleType', OrderSaleTransitions::TRANSITION_CART);
+ $type = $this->getParameterFromRequest($request, 'saleType', OrderSaleTransitions::TRANSITION_CART);
$cart = $orderFactory->createNew();
$form = $formFactory->createNamed('', CartCreationType::class, $cart, [
@@ -115,7 +119,7 @@ public function saleCreationAction(
[
'success' => false,
'message' => $errorSerializer->serializeErrorFromHandledForm($form),
- ]
+ ],
);
}
diff --git a/src/CoreShop/Bundle/OrderBundle/Controller/OrderDocumentPrintController.php b/src/CoreShop/Bundle/OrderBundle/Controller/OrderDocumentPrintController.php
index 2d4ac15978..14d84a58e5 100644
--- a/src/CoreShop/Bundle/OrderBundle/Controller/OrderDocumentPrintController.php
+++ b/src/CoreShop/Bundle/OrderBundle/Controller/OrderDocumentPrintController.php
@@ -1,17 +1,21 @@
isGrantedOr403();
@@ -52,7 +56,7 @@ public function editItemsAction(
if (!$cart instanceof OrderInterface) {
return $this->viewHandler->handle(
- ['success' => false, 'message' => "Order with ID '$cartId' not found"]
+ ['success' => false, 'message' => "Order with ID '$cartId' not found"],
);
}
@@ -88,7 +92,7 @@ public function addItemsAction(
FormFactoryInterface $formFactory,
ErrorSerializer $errorSerializer,
CartManagerInterface $cartManager,
- CartModifier $cartModifier
+ CartModifier $cartModifier,
): JsonResponse {
$this->isGrantedOr403();
@@ -97,13 +101,13 @@ public function addItemsAction(
if (!$cart instanceof OrderInterface) {
return $this->viewHandler->handle(
- ['success' => false, 'message' => "Order with ID '$cartId' not found"]
+ ['success' => false, 'message' => "Order with ID '$cartId' not found"],
);
}
$commands = [];
- foreach ($this->getParameterFromRequest($request,'items', []) as $product) {
+ foreach ($this->getParameterFromRequest($request, 'items', []) as $product) {
$productId = $product['cartItem']['purchasable'];
$product = $purchasableStackRepository->find($productId);
@@ -133,7 +137,7 @@ public function addItemsAction(
foreach ($addsToCart->getItems() as $addToCart) {
$cartModifier->addToList(
$addToCart->getCart(),
- $addToCart->getCartItem()
+ $addToCart->getCartItem(),
);
}
@@ -156,7 +160,7 @@ public function removeItemAction(
OrderRepositoryInterface $orderRepository,
OrderItemRepositoryInterface $orderItemRepository,
CartManagerInterface $cartManager,
- CartModifier $cartModifier
+ CartModifier $cartModifier,
): JsonResponse {
$this->isGrantedOr403();
@@ -165,22 +169,22 @@ public function removeItemAction(
if (!$cart instanceof OrderInterface) {
return $this->viewHandler->handle(
- ['success' => false, 'message' => "Order with ID '$cartId' not found"]
+ ['success' => false, 'message' => "Order with ID '$cartId' not found"],
);
}
- $cartItemId = $this->getParameterFromRequest($request,'cartItem');
+ $cartItemId = $this->getParameterFromRequest($request, 'cartItem');
$cartItem = $orderItemRepository->find($cartItemId);
if (!$cartItem instanceof OrderItemInterface) {
return $this->viewHandler->handle(
- ['success' => false, 'message' => "Order Item with ID '$cartItemId' not found"]
+ ['success' => false, 'message' => "Order Item with ID '$cartItemId' not found"],
);
}
if ($cartItem->getOrder()->getId() !== $cart->getId()) {
return $this->viewHandler->handle(
- ['success' => false, 'message' => 'Not allowed']
+ ['success' => false, 'message' => 'Not allowed'],
);
}
@@ -192,7 +196,7 @@ public function removeItemAction(
protected function createMultipleAddToCart(
AddMultipleToCartFactoryInterface $addMultipleToCartFactory,
- array $addToCarts
+ array $addToCarts,
): AddMultipleToCartInterface {
return $addMultipleToCartFactory->createWithMultipleAddToCarts($addToCarts);
}
@@ -200,7 +204,7 @@ protected function createMultipleAddToCart(
protected function createAddToCart(
AddToCartFactoryInterface $addToCartFactory,
OrderInterface $cart,
- OrderItemInterface $item
+ OrderItemInterface $item,
): AddToCartInterface {
return $addToCartFactory->createWithCartAndCartItem($cart, $item);
}
diff --git a/src/CoreShop/Bundle/OrderBundle/Controller/OrderInvoiceController.php b/src/CoreShop/Bundle/OrderBundle/Controller/OrderInvoiceController.php
index 03fef47734..1c523c9a7a 100644
--- a/src/CoreShop/Bundle/OrderBundle/Controller/OrderInvoiceController.php
+++ b/src/CoreShop/Bundle/OrderBundle/Controller/OrderInvoiceController.php
@@ -1,17 +1,21 @@
getParameterFromRequest($request,'id');
+ $orderId = $this->getParameterFromRequest($request, 'id');
$form = $this->get('form.factory')->createNamed('', OrderInvoiceCreationType::class);
@@ -98,7 +102,7 @@ public function createInvoiceAction(Request $request): JsonResponse
[
'success' => false,
'message' => $this->get(ErrorSerializer::class)->serializeErrorFromHandledForm($form),
- ]
+ ],
);
}
diff --git a/src/CoreShop/Bundle/OrderBundle/Controller/OrderPaymentController.php b/src/CoreShop/Bundle/OrderBundle/Controller/OrderPaymentController.php
index abd48634ea..ebb99003f3 100644
--- a/src/CoreShop/Bundle/OrderBundle/Controller/OrderPaymentController.php
+++ b/src/CoreShop/Bundle/OrderBundle/Controller/OrderPaymentController.php
@@ -1,17 +1,21 @@
getParameterFromRequest($request, 'o_id');
$order = $this->getSaleRepository()->find($orderId);
- $amount = (int)round($this->getParameterFromRequest($request, 'amount', 0) * $this->container->getParameter('coreshop.currency.decimal_factor'));
+ $amount = (int) round($this->getParameterFromRequest($request, 'amount', 0) * $this->container->getParameter('coreshop.currency.decimal_factor'));
$paymentProviderId = $this->getParameterFromRequest($request, 'paymentProvider');
@@ -129,7 +133,7 @@ public function addPaymentAction(Request $request): JsonResponse
[
'success' => false,
'message' => sprintf('Payment Provider %s not found', $this->getParameterFromRequest($request, 'paymentProvider')),
- ]
+ ],
);
}
diff --git a/src/CoreShop/Bundle/OrderBundle/Controller/OrderShipmentController.php b/src/CoreShop/Bundle/OrderBundle/Controller/OrderShipmentController.php
index a1623db229..443b48911e 100644
--- a/src/CoreShop/Bundle/OrderBundle/Controller/OrderShipmentController.php
+++ b/src/CoreShop/Bundle/OrderBundle/Controller/OrderShipmentController.php
@@ -1,17 +1,21 @@
false,
'message' => $this->get(ErrorSerializer::class)->serializeErrorFromHandledForm($form),
- ]
+ ],
);
}
@@ -163,7 +167,7 @@ public function updateStateAction(Request $request): JsonResponse
public function renderAction(Request $request): Response
{
- $shipmentId = (int)$this->getParameterFromRequest($request, 'id');
+ $shipmentId = (int) $this->getParameterFromRequest($request, 'id');
$shipment = $this->getOrderShipmentRepository()->find($shipmentId);
if ($shipment instanceof OrderShipmentInterface) {
diff --git a/src/CoreShop/Bundle/OrderBundle/CoreExtension/CartPriceRule.php b/src/CoreShop/Bundle/OrderBundle/CoreExtension/CartPriceRule.php
index 7a7ac6f4df..15cea439dd 100644
--- a/src/CoreShop/Bundle/OrderBundle/CoreExtension/CartPriceRule.php
+++ b/src/CoreShop/Bundle/OrderBundle/CoreExtension/CartPriceRule.php
@@ -1,17 +1,21 @@
getDefinition($tag['manager']);
- $priority = isset($tag['priority']) ? (int)$tag['priority'] : 0;
+ $priority = isset($tag['priority']) ? (int) $tag['priority'] : 0;
$manager->addMethodCall('addValidator', [new Reference($id), $tag['type'], $priority]);
}
diff --git a/src/CoreShop/Bundle/OrderBundle/DependencyInjection/Configuration.php b/src/CoreShop/Bundle/OrderBundle/DependencyInjection/Configuration.php
index c6a008b36e..881d515513 100644
--- a/src/CoreShop/Bundle/OrderBundle/DependencyInjection/Configuration.php
+++ b/src/CoreShop/Bundle/OrderBundle/DependencyInjection/Configuration.php
@@ -1,17 +1,21 @@
children()
->booleanNode('legacy_serialization')->defaultTrue()->end()
- ->end();
+ ->end()
+ ;
$this->addModelsSection($rootNode);
$this->addPimcoreResourcesSection($rootNode);
$this->addCartCleanupSection($rootNode);
@@ -97,7 +102,8 @@ private function addCartCleanupSection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
private function addStack(ArrayNodeDefinition $node): void
@@ -115,7 +121,8 @@ private function addStack(ArrayNodeDefinition $node): void
->scalarNode('order_shipment_item')->defaultValue(OrderShipmentItemInterface::class)->cannotBeEmpty()->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
private function addModelsSection(ArrayNodeDefinition $node): void
@@ -362,7 +369,8 @@ private function addModelsSection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
@@ -414,6 +422,7 @@ private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/OrderBundle/DependencyInjection/CoreShopOrderExtension.php b/src/CoreShop/Bundle/OrderBundle/DependencyInjection/CoreShopOrderExtension.php
index af9cb94870..3b09da3ad4 100644
--- a/src/CoreShop/Bundle/OrderBundle/DependencyInjection/CoreShopOrderExtension.php
+++ b/src/CoreShop/Bundle/OrderBundle/DependencyInjection/CoreShopOrderExtension.php
@@ -1,17 +1,21 @@
registerForAutoconfiguration(CartPriceRuleActionProcessorInterface::class)
- ->addTag(CartPriceRuleActionPass::CART_PRICE_RULE_ACTION_TAG);
+ ->addTag(CartPriceRuleActionPass::CART_PRICE_RULE_ACTION_TAG)
+ ;
$container
->registerForAutoconfiguration(CartRuleConditionCheckerInterface::class)
- ->addTag(CartPriceRuleConditionPass::CART_PRICE_RULE_CONDITION_TAG);
+ ->addTag(CartPriceRuleConditionPass::CART_PRICE_RULE_CONDITION_TAG)
+ ;
$container
->registerForAutoconfiguration(PurchasableDiscountCalculatorInterface::class)
- ->addTag(PurchasableDiscountCalculatorsPass::PURCHASABLE_DISCOUNT_CALCULATOR_TAG);
+ ->addTag(PurchasableDiscountCalculatorsPass::PURCHASABLE_DISCOUNT_CALCULATOR_TAG)
+ ;
$container
->registerForAutoconfiguration(PurchasableDiscountPriceCalculatorInterface::class)
- ->addTag(PurchasableDiscountPriceCalculatorsPass::PURCHASABLE_DISCOUNT_PRICE_CALCULATOR_TAG);
+ ->addTag(PurchasableDiscountPriceCalculatorsPass::PURCHASABLE_DISCOUNT_PRICE_CALCULATOR_TAG)
+ ;
$container
->registerForAutoconfiguration(PurchasablePriceCalculatorInterface::class)
- ->addTag(PurchasablePriceCalculatorsPass::PURCHASABLE_PRICE_CALCULATOR_TAG);
+ ->addTag(PurchasablePriceCalculatorsPass::PURCHASABLE_PRICE_CALCULATOR_TAG)
+ ;
$container
->registerForAutoconfiguration(PurchasableRetailPriceCalculatorInterface::class)
- ->addTag(PurchasableRetailPriceCalculatorsPass::PURCHASABLE_RETAIL_PRICE_CALCULATOR_TAG);
+ ->addTag(PurchasableRetailPriceCalculatorsPass::PURCHASABLE_RETAIL_PRICE_CALCULATOR_TAG)
+ ;
$container
->registerForAutoconfiguration(PurchasableWholesalePriceCalculatorInterface::class)
- ->addTag(PurchasableWholesalePriceCalculatorsPass::PURCHASABLE_WHOLESALE_PRICE_CALCULATOR_TAG);
+ ->addTag(PurchasableWholesalePriceCalculatorsPass::PURCHASABLE_WHOLESALE_PRICE_CALCULATOR_TAG)
+ ;
}
}
diff --git a/src/CoreShop/Bundle/OrderBundle/Doctrine/ORM/CartPriceRuleRepository.php b/src/CoreShop/Bundle/OrderBundle/Doctrine/ORM/CartPriceRuleRepository.php
index 9d1073600d..e14cfa3be4 100644
--- a/src/CoreShop/Bundle/OrderBundle/Doctrine/ORM/CartPriceRuleRepository.php
+++ b/src/CoreShop/Bundle/OrderBundle/Doctrine/ORM/CartPriceRuleRepository.php
@@ -1,17 +1,21 @@
andWhere('o.isVoucherRule = :isVoucherRule')
->setParameter('isVoucherRule', false)
->getQuery()
- ->getResult();
+ ->getResult()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/OrderBundle/Doctrine/ORM/CartPriceRuleVoucherRepository.php b/src/CoreShop/Bundle/OrderBundle/Doctrine/ORM/CartPriceRuleVoucherRepository.php
index 181e23ae8b..90f1e57012 100644
--- a/src/CoreShop/Bundle/OrderBundle/Doctrine/ORM/CartPriceRuleVoucherRepository.php
+++ b/src/CoreShop/Bundle/OrderBundle/Doctrine/ORM/CartPriceRuleVoucherRepository.php
@@ -1,17 +1,21 @@
where('o.cartPriceRule = :cartPriceRule')
->setParameter('cartPriceRule', $cartPriceRule)
->setMaxResults($limit)
- ->setFirstResult($offset)
+ ->setFirstResult($offset),
);
}
@@ -39,7 +43,8 @@ public function findByCode(string $code): ?CartPriceRuleVoucherCodeInterface
->andWhere('o.code = :code')
->setParameter('code', $code)
->getQuery()
- ->getOneOrNullResult();
+ ->getOneOrNullResult()
+ ;
}
public function countCodes(int $length, ?string $prefix = null, ?string $suffix = null): int
@@ -54,7 +59,7 @@ public function countCodes(int $length, ?string $prefix = null, ?string $suffix
$code = $prefix . '%' . $suffix;
- return (int)$this->createQueryBuilder('o')
+ return (int) $this->createQueryBuilder('o')
->select('COUNT(o.id)')
->andWhere('LENGTH(o.code) = :length')
->andWhere('o.code LIKE :code')
diff --git a/src/CoreShop/Bundle/OrderBundle/Event/AdminAddressCreationEvent.php b/src/CoreShop/Bundle/OrderBundle/Event/AdminAddressCreationEvent.php
index 6a395dd4b4..aa7ac8c32f 100644
--- a/src/CoreShop/Bundle/OrderBundle/Event/AdminAddressCreationEvent.php
+++ b/src/CoreShop/Bundle/OrderBundle/Event/AdminAddressCreationEvent.php
@@ -1,17 +1,21 @@
data = $data;
}
diff --git a/src/CoreShop/Bundle/OrderBundle/Event/AdminCustomerCreationEvent.php b/src/CoreShop/Bundle/OrderBundle/Event/AdminCustomerCreationEvent.php
index 7646b019bb..5d966663ee 100644
--- a/src/CoreShop/Bundle/OrderBundle/Event/AdminCustomerCreationEvent.php
+++ b/src/CoreShop/Bundle/OrderBundle/Event/AdminCustomerCreationEvent.php
@@ -1,17 +1,21 @@
data = $data;
}
diff --git a/src/CoreShop/Bundle/OrderBundle/Event/WkhtmlOptionsEvent.php b/src/CoreShop/Bundle/OrderBundle/Event/WkhtmlOptionsEvent.php
index 37b1bf63b4..46731f4b89 100644
--- a/src/CoreShop/Bundle/OrderBundle/Event/WkhtmlOptionsEvent.php
+++ b/src/CoreShop/Bundle/OrderBundle/Event/WkhtmlOptionsEvent.php
@@ -1,17 +1,21 @@
set(
sprintf('%s.%s', $this->sessionKeyName, $cart->getStore()->getId()),
- $cart->getId()
+ $cart->getId(),
);
}
}
diff --git a/src/CoreShop/Bundle/OrderBundle/Events.php b/src/CoreShop/Bundle/OrderBundle/Events.php
index e59bbcf81e..05e1e8aa38 100644
--- a/src/CoreShop/Bundle/OrderBundle/Events.php
+++ b/src/CoreShop/Bundle/OrderBundle/Events.php
@@ -1,17 +1,21 @@
stateMachineApplier->apply(
$order,
OrderTransitions::IDENTIFIER,
- OrderTransitions::TRANSITION_CANCEL
+ OrderTransitions::TRANSITION_CANCEL,
);
if ($order instanceof Concrete) {
$this->historyLogger->log(
$order,
- 'Automatic Expiration Order Cancellation'
+ 'Automatic Expiration Order Cancellation',
);
}
}
diff --git a/src/CoreShop/Bundle/OrderBundle/Expiration/OrderExpirationInterface.php b/src/CoreShop/Bundle/OrderBundle/Expiration/OrderExpirationInterface.php
index e83ee68b36..c84356b627 100644
--- a/src/CoreShop/Bundle/OrderBundle/Expiration/OrderExpirationInterface.php
+++ b/src/CoreShop/Bundle/OrderBundle/Expiration/OrderExpirationInterface.php
@@ -1,17 +1,21 @@
getData();
- $this->cartItemQuantityModifier->modify($viewData, (float)$targetQuantity);
+ $this->cartItemQuantityModifier->modify($viewData, (float) $targetQuantity);
continue;
}
@@ -56,7 +62,7 @@ public function mapFormsToData($forms, &$viewData): void
if (null !== $quantityForm) {
$targetQuantity = $quantityForm->getData();
- $this->cartItemQuantityModifier->modify($viewData, (float)$targetQuantity);
+ $this->cartItemQuantityModifier->modify($viewData, (float) $targetQuantity);
}
}
}
diff --git a/src/CoreShop/Bundle/OrderBundle/Form/Type/AddMultipleToCartType.php b/src/CoreShop/Bundle/OrderBundle/Form/Type/AddMultipleToCartType.php
index fe2b3ef541..b0d45720c8 100644
--- a/src/CoreShop/Bundle/OrderBundle/Form/Type/AddMultipleToCartType.php
+++ b/src/CoreShop/Bundle/OrderBundle/Form/Type/AddMultipleToCartType.php
@@ -1,17 +1,21 @@
[
new Valid(['groups' => ['coreshop']]),
],
- ]);
+ ])
+ ;
}
public function configureOptions(OptionsResolver $resolver): void
diff --git a/src/CoreShop/Bundle/OrderBundle/Form/Type/AdminCustomerCreationType.php b/src/CoreShop/Bundle/OrderBundle/Form/Type/AdminCustomerCreationType.php
index 97a5b86899..9cd7803682 100644
--- a/src/CoreShop/Bundle/OrderBundle/Form/Type/AdminCustomerCreationType.php
+++ b/src/CoreShop/Bundle/OrderBundle/Form/Type/AdminCustomerCreationType.php
@@ -1,17 +1,21 @@
add('product', PurchasableSelectionType::class);
+ ->add('product', PurchasableSelectionType::class)
+ ;
}
$builder
diff --git a/src/CoreShop/Bundle/OrderBundle/Form/Type/CartCreationType.php b/src/CoreShop/Bundle/OrderBundle/Form/Type/CartCreationType.php
index 989b8778db..7795c3b33c 100644
--- a/src/CoreShop/Bundle/OrderBundle/Form/Type/CartCreationType.php
+++ b/src/CoreShop/Bundle/OrderBundle/Form/Type/CartCreationType.php
@@ -1,17 +1,21 @@
true,
])
->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
- });
+ })
+ ;
}
public function configureOptions(OptionsResolver $resolver): void
diff --git a/src/CoreShop/Bundle/OrderBundle/Form/Type/CartItemPriceRuleActionChoiceType.php b/src/CoreShop/Bundle/OrderBundle/Form/Type/CartItemPriceRuleActionChoiceType.php
index 2d9f4c1857..932bb5ebc6 100644
--- a/src/CoreShop/Bundle/OrderBundle/Form/Type/CartItemPriceRuleActionChoiceType.php
+++ b/src/CoreShop/Bundle/OrderBundle/Form/Type/CartItemPriceRuleActionChoiceType.php
@@ -1,17 +1,21 @@
[
'data-form-collection' => 'update',
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/OrderBundle/Form/Type/CartItemPriceRuleConditionChoiceType.php b/src/CoreShop/Bundle/OrderBundle/Form/Type/CartItemPriceRuleConditionChoiceType.php
index 1d82cbf0b9..eaad4afcd0 100644
--- a/src/CoreShop/Bundle/OrderBundle/Form/Type/CartItemPriceRuleConditionChoiceType.php
+++ b/src/CoreShop/Bundle/OrderBundle/Form/Type/CartItemPriceRuleConditionChoiceType.php
@@ -1,17 +1,21 @@
[
'data-form-collection' => 'update',
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/OrderBundle/Form/Type/CartItemType.php b/src/CoreShop/Bundle/OrderBundle/Form/Type/CartItemType.php
index 8bdb2a6036..f6183efb5c 100644
--- a/src/CoreShop/Bundle/OrderBundle/Form/Type/CartItemType.php
+++ b/src/CoreShop/Bundle/OrderBundle/Form/Type/CartItemType.php
@@ -1,17 +1,21 @@
getForm()->add('quantity', QuantityType::class, [
'html5' => true,
'label' => 'coreshop.ui.quantity',
- 'disabled' => (bool)$data->getIsGiftItem(),
+ 'disabled' => (bool) $data->getIsGiftItem(),
]);
});
diff --git a/src/CoreShop/Bundle/OrderBundle/Form/Type/CartPriceRuleActionChoiceType.php b/src/CoreShop/Bundle/OrderBundle/Form/Type/CartPriceRuleActionChoiceType.php
index be65f847bb..900468bb67 100644
--- a/src/CoreShop/Bundle/OrderBundle/Form/Type/CartPriceRuleActionChoiceType.php
+++ b/src/CoreShop/Bundle/OrderBundle/Form/Type/CartPriceRuleActionChoiceType.php
@@ -1,17 +1,21 @@
[
'data-form-collection' => 'update',
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/OrderBundle/Form/Type/CartPriceRuleChoiceType.php b/src/CoreShop/Bundle/OrderBundle/Form/Type/CartPriceRuleChoiceType.php
index f7f2b6dd57..0566d40189 100644
--- a/src/CoreShop/Bundle/OrderBundle/Form/Type/CartPriceRuleChoiceType.php
+++ b/src/CoreShop/Bundle/OrderBundle/Form/Type/CartPriceRuleChoiceType.php
@@ -1,17 +1,21 @@
'name',
'choice_translation_domain' => false,
'active' => true,
- ]);
+ ])
+ ;
}
public function getParent(): string
diff --git a/src/CoreShop/Bundle/OrderBundle/Form/Type/CartPriceRuleConditionChoiceType.php b/src/CoreShop/Bundle/OrderBundle/Form/Type/CartPriceRuleConditionChoiceType.php
index 1376eff4d0..e5c0596505 100644
--- a/src/CoreShop/Bundle/OrderBundle/Form/Type/CartPriceRuleConditionChoiceType.php
+++ b/src/CoreShop/Bundle/OrderBundle/Form/Type/CartPriceRuleConditionChoiceType.php
@@ -1,17 +1,21 @@
[
'data-form-collection' => 'update',
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/OrderBundle/Form/Type/CartPriceRuleTranslationType.php b/src/CoreShop/Bundle/OrderBundle/Form/Type/CartPriceRuleTranslationType.php
index 6d1fbabf29..3b80af8b27 100644
--- a/src/CoreShop/Bundle/OrderBundle/Form/Type/CartPriceRuleTranslationType.php
+++ b/src/CoreShop/Bundle/OrderBundle/Form/Type/CartPriceRuleTranslationType.php
@@ -1,17 +1,21 @@
add('label', TextType::class);
+ ->add('label', TextType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/OrderBundle/Form/Type/CartPriceRuleType.php b/src/CoreShop/Bundle/OrderBundle/Form/Type/CartPriceRuleType.php
index 53d4c061b9..f709b906c3 100644
--- a/src/CoreShop/Bundle/OrderBundle/Form/Type/CartPriceRuleType.php
+++ b/src/CoreShop/Bundle/OrderBundle/Form/Type/CartPriceRuleType.php
@@ -1,17 +1,21 @@
add('active', CheckboxType::class)
->add('description', TextareaType::class)
->add('conditions', CartPriceRuleConditionCollectionType::class)
- ->add('actions', CartPriceRuleActionCollectionType::class);
+ ->add('actions', CartPriceRuleActionCollectionType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/OrderBundle/Form/Type/CartType.php b/src/CoreShop/Bundle/OrderBundle/Form/Type/CartType.php
index 458c0b4453..b5c6466629 100644
--- a/src/CoreShop/Bundle/OrderBundle/Form/Type/CartType.php
+++ b/src/CoreShop/Bundle/OrderBundle/Form/Type/CartType.php
@@ -1,17 +1,21 @@
false,
'label' => 'coreshop.form.cart.items',
])
- ->add('submit', SubmitType::class);;
+ ->add('submit', SubmitType::class)
+ ;
}
public function configureOptions(OptionsResolver $resolver): void
diff --git a/src/CoreShop/Bundle/OrderBundle/Form/Type/EditCartItemsCollectionType.php b/src/CoreShop/Bundle/OrderBundle/Form/Type/EditCartItemsCollectionType.php
index 167a2ea392..d2437ed312 100644
--- a/src/CoreShop/Bundle/OrderBundle/Form/Type/EditCartItemsCollectionType.php
+++ b/src/CoreShop/Bundle/OrderBundle/Form/Type/EditCartItemsCollectionType.php
@@ -1,17 +1,21 @@
add('items', EditCartItemsCollectionType::class);
+ ->add('items', EditCartItemsCollectionType::class)
+ ;
}
}
diff --git a/src/CoreShop/Bundle/OrderBundle/Form/Type/OrderInvoiceCreationItemsType.php b/src/CoreShop/Bundle/OrderBundle/Form/Type/OrderInvoiceCreationItemsType.php
index 3b4f02095b..23799e957c 100644
--- a/src/CoreShop/Bundle/OrderBundle/Form/Type/OrderInvoiceCreationItemsType.php
+++ b/src/CoreShop/Bundle/OrderBundle/Form/Type/OrderInvoiceCreationItemsType.php
@@ -1,17 +1,21 @@
add('orderItemId', NumberType::class)
- ->add('quantity', NumberType::class);
+ ->add('quantity', NumberType::class)
+ ;
}
}
diff --git a/src/CoreShop/Bundle/OrderBundle/Form/Type/OrderInvoiceCreationType.php b/src/CoreShop/Bundle/OrderBundle/Form/Type/OrderInvoiceCreationType.php
index 3f33bdf32a..e33beb4b15 100644
--- a/src/CoreShop/Bundle/OrderBundle/Form/Type/OrderInvoiceCreationType.php
+++ b/src/CoreShop/Bundle/OrderBundle/Form/Type/OrderInvoiceCreationType.php
@@ -1,17 +1,21 @@
true,
'by_reference' => false,
'error_bubbling' => false,
- ]);
+ ])
+ ;
}
public function configureOptions(OptionsResolver $resolver): void
diff --git a/src/CoreShop/Bundle/OrderBundle/Form/Type/OrderShipmentCreationItemsType.php b/src/CoreShop/Bundle/OrderBundle/Form/Type/OrderShipmentCreationItemsType.php
index 7940930275..c4b0f1658c 100644
--- a/src/CoreShop/Bundle/OrderBundle/Form/Type/OrderShipmentCreationItemsType.php
+++ b/src/CoreShop/Bundle/OrderBundle/Form/Type/OrderShipmentCreationItemsType.php
@@ -1,17 +1,21 @@
add('orderItemId', NumberType::class)
- ->add('quantity', NumberType::class);
+ ->add('quantity', NumberType::class)
+ ;
}
}
diff --git a/src/CoreShop/Bundle/OrderBundle/Form/Type/OrderShipmentCreationType.php b/src/CoreShop/Bundle/OrderBundle/Form/Type/OrderShipmentCreationType.php
index ed12a54542..ec900a151f 100644
--- a/src/CoreShop/Bundle/OrderBundle/Form/Type/OrderShipmentCreationType.php
+++ b/src/CoreShop/Bundle/OrderBundle/Form/Type/OrderShipmentCreationType.php
@@ -1,17 +1,21 @@
true,
'by_reference' => false,
'error_bubbling' => false,
- ]);
+ ])
+ ;
}
public function configureOptions(OptionsResolver $resolver): void
diff --git a/src/CoreShop/Bundle/OrderBundle/Form/Type/PurchasableSelectionType.php b/src/CoreShop/Bundle/OrderBundle/Form/Type/PurchasableSelectionType.php
index c866541c1d..99df56b260 100644
--- a/src/CoreShop/Bundle/OrderBundle/Form/Type/PurchasableSelectionType.php
+++ b/src/CoreShop/Bundle/OrderBundle/Form/Type/PurchasableSelectionType.php
@@ -1,17 +1,21 @@
add('conditions', CartItemPriceRuleConditionCollectionType::class, [
'constraints' => new Valid(['groups' => $this->conditionsValidationGroups]),
'nested' => true,
- ]);
+ ])
+ ;
$builder
->add('actions', CartItemPriceRuleActionCollectionType::class, [
'constraints' => new Valid(['groups' => $this->actionsValidationGroups]),
'nested' => true,
- ]);
+ ])
+ ;
$builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
$data = $event->getData();
diff --git a/src/CoreShop/Bundle/OrderBundle/Form/Type/Rule/Action/DiscountAmountConfigurationType.php b/src/CoreShop/Bundle/OrderBundle/Form/Type/Rule/Action/DiscountAmountConfigurationType.php
index cebad93084..26b98c3790 100644
--- a/src/CoreShop/Bundle/OrderBundle/Form/Type/Rule/Action/DiscountAmountConfigurationType.php
+++ b/src/CoreShop/Bundle/OrderBundle/Form/Type/Rule/Action/DiscountAmountConfigurationType.php
@@ -1,17 +1,21 @@
[
new NotBlank(['groups' => $this->validationGroups]),
],
- ]);
+ ])
+ ;
$builder->get('currency')->addModelTransformer(new CallbackTransformer(
function (mixed $currency) {
@@ -73,7 +78,7 @@ function (mixed $currency) {
}
return null;
- }
+ },
));
}
diff --git a/src/CoreShop/Bundle/OrderBundle/Form/Type/Rule/Action/DiscountPercentConfigurationType.php b/src/CoreShop/Bundle/OrderBundle/Form/Type/Rule/Action/DiscountPercentConfigurationType.php
index fe5128e2cc..9f08861a33 100644
--- a/src/CoreShop/Bundle/OrderBundle/Form/Type/Rule/Action/DiscountPercentConfigurationType.php
+++ b/src/CoreShop/Bundle/OrderBundle/Form/Type/Rule/Action/DiscountPercentConfigurationType.php
@@ -1,17 +1,21 @@
'numeric', 'groups' => $this->validationGroups]),
new Range(['min' => 0, 'max' => 100, 'groups' => $this->validationGroups]),
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/OrderBundle/Form/Type/Rule/Action/SurchargeAmountConfigurationType.php b/src/CoreShop/Bundle/OrderBundle/Form/Type/Rule/Action/SurchargeAmountConfigurationType.php
index 07c90f01d6..7d2a232b0b 100644
--- a/src/CoreShop/Bundle/OrderBundle/Form/Type/Rule/Action/SurchargeAmountConfigurationType.php
+++ b/src/CoreShop/Bundle/OrderBundle/Form/Type/Rule/Action/SurchargeAmountConfigurationType.php
@@ -1,17 +1,21 @@
[
new NotBlank(['groups' => $this->validationGroups]),
],
- ]);
+ ])
+ ;
$builder->get('currency')->addModelTransformer(new CallbackTransformer(
function (mixed $currency) {
@@ -66,7 +71,7 @@ function (mixed $currency) {
}
return null;
- }
+ },
));
}
diff --git a/src/CoreShop/Bundle/OrderBundle/Form/Type/Rule/Action/SurchargePercentConfigurationType.php b/src/CoreShop/Bundle/OrderBundle/Form/Type/Rule/Action/SurchargePercentConfigurationType.php
index 676af7a941..eab99aec12 100644
--- a/src/CoreShop/Bundle/OrderBundle/Form/Type/Rule/Action/SurchargePercentConfigurationType.php
+++ b/src/CoreShop/Bundle/OrderBundle/Form/Type/Rule/Action/SurchargePercentConfigurationType.php
@@ -1,17 +1,21 @@
'numeric', 'groups' => $this->validationGroups]),
new Range(['min' => 0, 'max' => 100, 'groups' => $this->validationGroups]),
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/OrderBundle/Form/Type/Rule/Condition/AmountConfigurationType.php b/src/CoreShop/Bundle/OrderBundle/Form/Type/Rule/Condition/AmountConfigurationType.php
index bc35057304..e8944816df 100644
--- a/src/CoreShop/Bundle/OrderBundle/Form/Type/Rule/Condition/AmountConfigurationType.php
+++ b/src/CoreShop/Bundle/OrderBundle/Form/Type/Rule/Condition/AmountConfigurationType.php
@@ -1,17 +1,21 @@
$this->validationGroups]),
new Type(['type' => 'numeric', 'groups' => $this->validationGroups]),
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/OrderBundle/Form/Type/Rule/Condition/NestedConfigurationType.php b/src/CoreShop/Bundle/OrderBundle/Form/Type/Rule/Condition/NestedConfigurationType.php
index fed8f7518d..fd19bac5d9 100644
--- a/src/CoreShop/Bundle/OrderBundle/Form/Type/Rule/Condition/NestedConfigurationType.php
+++ b/src/CoreShop/Bundle/OrderBundle/Form/Type/Rule/Condition/NestedConfigurationType.php
@@ -1,17 +1,21 @@
add('conditions', CartPriceRuleConditionCollectionType::class, [
'constraints' => new Valid(['groups' => $this->validationGroups]),
'nested' => true,
- ]);
+ ])
+ ;
$builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
$data = $event->getData();
diff --git a/src/CoreShop/Bundle/OrderBundle/Form/Type/Rule/Condition/TimespanConfigurationType.php b/src/CoreShop/Bundle/OrderBundle/Form/Type/Rule/Condition/TimespanConfigurationType.php
index e93307732d..f69bb893b4 100644
--- a/src/CoreShop/Bundle/OrderBundle/Form/Type/Rule/Condition/TimespanConfigurationType.php
+++ b/src/CoreShop/Bundle/OrderBundle/Form/Type/Rule/Condition/TimespanConfigurationType.php
@@ -1,17 +1,21 @@
add('maxUsagePerCode', NumberType::class)
- ->add('onlyOnePerCart', CheckboxType::class);
+ ->add('onlyOnePerCart', CheckboxType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/OrderBundle/Form/Type/ShippingCalculatorType.php b/src/CoreShop/Bundle/OrderBundle/Form/Type/ShippingCalculatorType.php
index 37a1562b67..f4436660e0 100644
--- a/src/CoreShop/Bundle/OrderBundle/Form/Type/ShippingCalculatorType.php
+++ b/src/CoreShop/Bundle/OrderBundle/Form/Type/ShippingCalculatorType.php
@@ -1,17 +1,21 @@
add('submit', SubmitType::class, [
'label' => 'coreshop.form.cart.carrier.submit',
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/OrderBundle/Form/Type/VoucherGeneratorType.php b/src/CoreShop/Bundle/OrderBundle/Form/Type/VoucherGeneratorType.php
index d518e21973..aa6f5a1fa6 100644
--- a/src/CoreShop/Bundle/OrderBundle/Form/Type/VoucherGeneratorType.php
+++ b/src/CoreShop/Bundle/OrderBundle/Form/Type/VoucherGeneratorType.php
@@ -1,17 +1,21 @@
add('prefix', TextType::class)
->add('suffix', TextType::class)
->add('hyphensOn', IntegerType::class)
- ->add('cartPriceRule', CartPriceRuleChoiceType::class);
+ ->add('cartPriceRule', CartPriceRuleChoiceType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/OrderBundle/Form/Type/VoucherType.php b/src/CoreShop/Bundle/OrderBundle/Form/Type/VoucherType.php
index 0ae86f5ad8..a3e8560557 100644
--- a/src/CoreShop/Bundle/OrderBundle/Form/Type/VoucherType.php
+++ b/src/CoreShop/Bundle/OrderBundle/Form/Type/VoucherType.php
@@ -1,17 +1,21 @@
add('code', TextType::class)
- ->add('cartPriceRule', CartPriceRuleChoiceType::class);
+ ->add('cartPriceRule', CartPriceRuleChoiceType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/OrderBundle/Manager/CartManager.php b/src/CoreShop/Bundle/OrderBundle/Manager/CartManager.php
index 10fff786f1..f898ee51b5 100644
--- a/src/CoreShop/Bundle/OrderBundle/Manager/CartManager.php
+++ b/src/CoreShop/Bundle/OrderBundle/Manager/CartManager.php
@@ -1,17 +1,21 @@
setParent(
$this->folderCreationService->createFolderForResource(
$item,
- ['prefix' => $cart->getFullPath()]
- )
+ ['prefix' => $cart->getFullPath()],
+ ),
);
$item->setPublished(true);
$item->setKey($index + 1);
diff --git a/src/CoreShop/Bundle/OrderBundle/Pimcore/GridColumnConfig/Operator/Factory/OrderStateFactory.php b/src/CoreShop/Bundle/OrderBundle/Pimcore/GridColumnConfig/Operator/Factory/OrderStateFactory.php
index 56ba348e54..4b8529aa1c 100644
--- a/src/CoreShop/Bundle/OrderBundle/Pimcore/GridColumnConfig/Operator/Factory/OrderStateFactory.php
+++ b/src/CoreShop/Bundle/OrderBundle/Pimcore/GridColumnConfig/Operator/Factory/OrderStateFactory.php
@@ -1,17 +1,21 @@
highlightLabel = $config->highlightLabel;
}
@@ -114,9 +121,9 @@ private function getContrastColor(int $r, int $g, int $b): string
0.0722 * ((0 / 255) ** 2.2);
if ($l1 > $l2) {
- $contrastRatio = (int)(($l1 + 0.05) / ($l2 + 0.05));
+ $contrastRatio = (int) (($l1 + 0.05) / ($l2 + 0.05));
} else {
- $contrastRatio = (int)(($l2 + 0.05) / ($l1 + 0.05));
+ $contrastRatio = (int) (($l2 + 0.05) / ($l1 + 0.05));
}
if ($contrastRatio > 7) {
diff --git a/src/CoreShop/Bundle/OrderBundle/Pimcore/GridColumnConfig/Operator/PriceFormatter.php b/src/CoreShop/Bundle/OrderBundle/Pimcore/GridColumnConfig/Operator/PriceFormatter.php
index 1c37f24c4a..0c736b9d00 100644
--- a/src/CoreShop/Bundle/OrderBundle/Pimcore/GridColumnConfig/Operator/PriceFormatter.php
+++ b/src/CoreShop/Bundle/OrderBundle/Pimcore/GridColumnConfig/Operator/PriceFormatter.php
@@ -1,17 +1,21 @@
findLatestCartByStoreAndCustomer($store, $customer);
}
diff --git a/src/CoreShop/Bundle/OrderBundle/Pimcore/Repository/OrderShipmentRepository.php b/src/CoreShop/Bundle/OrderBundle/Pimcore/Repository/OrderShipmentRepository.php
index 7e759f3ddb..2a47551519 100644
--- a/src/CoreShop/Bundle/OrderBundle/Pimcore/Repository/OrderShipmentRepository.php
+++ b/src/CoreShop/Bundle/OrderBundle/Pimcore/Repository/OrderShipmentRepository.php
@@ -1,17 +1,21 @@
$orderDocument->getId(),
'order' => $orderDocument->getOrder(),
'document' => $orderDocument,
- 'language' => (string)$orderDocument->getOrder()->getLocaleCode(),
+ 'language' => (string) $orderDocument->getOrder()->getLocaleCode(),
'type' => $orderDocument::getDocumentType(),
$orderDocument::getDocumentType() => $orderDocument,
];
@@ -64,14 +72,14 @@ public function renderDocumentPdf(OrderDocumentInterface $orderDocument): string
$this->eventDispatcher->dispatch(
$event,
- sprintf('coreshop.order.%s.wkhtml.options', $orderDocument::getDocumentType())
+ sprintf('coreshop.order.%s.wkhtml.options', $orderDocument::getDocumentType()),
);
return $this->renderer->fromString(
$content ?: '',
$contentHeader ?: '',
$contentFooter ?: '',
- ['options' => [$event->getOptions()]]
+ ['options' => [$event->getOptions()]],
);
});
}
diff --git a/src/CoreShop/Bundle/OrderBundle/Renderer/Pdf/PdfRendererInterface.php b/src/CoreShop/Bundle/OrderBundle/Renderer/Pdf/PdfRendererInterface.php
index d32fef52e2..fbd01279c7 100644
--- a/src/CoreShop/Bundle/OrderBundle/Renderer/Pdf/PdfRendererInterface.php
+++ b/src/CoreShop/Bundle/OrderBundle/Renderer/Pdf/PdfRendererInterface.php
@@ -1,17 +1,21 @@
countOrderInvoicesInState($order, $invoiceState);
$invoiceAmount = count($this->orderInvoiceRepository->getDocumentsNotInState($order, OrderInvoiceStates::STATE_CANCELLED));
diff --git a/src/CoreShop/Bundle/OrderBundle/StateResolver/OrderPaymentStateResolver.php b/src/CoreShop/Bundle/OrderBundle/StateResolver/OrderPaymentStateResolver.php
index 140d2dfb4d..6a6f9b4d94 100644
--- a/src/CoreShop/Bundle/OrderBundle/StateResolver/OrderPaymentStateResolver.php
+++ b/src/CoreShop/Bundle/OrderBundle/StateResolver/OrderPaymentStateResolver.php
@@ -1,17 +1,21 @@
countOrderShipmentsInState($order, $shipmentState);
$shipmentAmount = count($this->orderShipmentRepository->getDocumentsNotInState($order, OrderShipmentStates::STATE_CANCELLED));
diff --git a/src/CoreShop/Bundle/OrderBundle/StateResolver/OrderStateResolver.php b/src/CoreShop/Bundle/OrderBundle/StateResolver/OrderStateResolver.php
index 20f261ff3c..4f76a1c5e0 100644
--- a/src/CoreShop/Bundle/OrderBundle/StateResolver/OrderStateResolver.php
+++ b/src/CoreShop/Bundle/OrderBundle/StateResolver/OrderStateResolver.php
@@ -1,17 +1,21 @@
ruleValidationProcessor->isValidCartRule($value, $cartRule, $voucherCode)) {
$this->context->addViolation(
$constraint->message,
- ['%rule%' => $cartRule->getName()]
+ ['%rule%' => $cartRule->getName()],
);
}
}
diff --git a/src/CoreShop/Bundle/OrderBundle/Validator/Constraints/VoucherAmount.php b/src/CoreShop/Bundle/OrderBundle/Validator/Constraints/VoucherAmount.php
index c8e616388c..c87a070473 100644
--- a/src/CoreShop/Bundle/OrderBundle/Validator/Constraints/VoucherAmount.php
+++ b/src/CoreShop/Bundle/OrderBundle/Validator/Constraints/VoucherAmount.php
@@ -1,17 +1,21 @@
$value->getAmount(),
'%codeLength%' => $value->getLength(),
'%possibleAmount%' => $this->checker->getPossibleGenerationAmount($value),
- ]
+ ],
);
}
}
diff --git a/src/CoreShop/Bundle/PaymentBundle/CoreExtension/PaymentProvider.php b/src/CoreShop/Bundle/PaymentBundle/CoreExtension/PaymentProvider.php
index 43c502a232..5d36d306e5 100644
--- a/src/CoreShop/Bundle/PaymentBundle/CoreExtension/PaymentProvider.php
+++ b/src/CoreShop/Bundle/PaymentBundle/CoreExtension/PaymentProvider.php
@@ -1,17 +1,21 @@
children()
->scalarNode('driver')->defaultValue(CoreShopResourceBundle::DRIVER_DOCTRINE_ORM)->end()
- ->end();
+ ->end()
+ ;
$this->addModelsSection($rootNode);
$this->addPimcoreResourcesSection($rootNode);
@@ -109,7 +114,8 @@ private function addModelsSection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
@@ -140,6 +146,7 @@ private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/PaymentBundle/DependencyInjection/CoreShopPaymentExtension.php b/src/CoreShop/Bundle/PaymentBundle/DependencyInjection/CoreShopPaymentExtension.php
index 03c7d468ee..5bcb75dde6 100644
--- a/src/CoreShop/Bundle/PaymentBundle/DependencyInjection/CoreShopPaymentExtension.php
+++ b/src/CoreShop/Bundle/PaymentBundle/DependencyInjection/CoreShopPaymentExtension.php
@@ -1,17 +1,21 @@
setParameter('locale', $locale)
->addOrderBy('o.position')
->getQuery()
- ->getResult();
+ ->getResult()
+ ;
}
public function findActive(): array
@@ -38,6 +43,7 @@ public function findActive(): array
->andWhere('o.active = true')
->addOrderBy('o.position')
->getQuery()
- ->getResult();
+ ->getResult()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/PaymentBundle/Doctrine/ORM/PaymentRepository.php b/src/CoreShop/Bundle/PaymentBundle/Doctrine/ORM/PaymentRepository.php
index fa9e959bfd..15d1bc2fe4 100644
--- a/src/CoreShop/Bundle/PaymentBundle/Doctrine/ORM/PaymentRepository.php
+++ b/src/CoreShop/Bundle/PaymentBundle/Doctrine/ORM/PaymentRepository.php
@@ -1,17 +1,21 @@
setParameter('orderId', $payable->getId())
->orderBy('o.id', 'DESC')
->getQuery()
- ->getResult();
+ ->getResult()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/PaymentBundle/Form/Type/PaymentProviderChoiceType.php b/src/CoreShop/Bundle/PaymentBundle/Form/Type/PaymentProviderChoiceType.php
index 1928db4134..bb34d097ea 100644
--- a/src/CoreShop/Bundle/PaymentBundle/Form/Type/PaymentProviderChoiceType.php
+++ b/src/CoreShop/Bundle/PaymentBundle/Form/Type/PaymentProviderChoiceType.php
@@ -1,17 +1,21 @@
false,
'active' => true,
'subject' => null,
- ]);
+ ])
+ ;
}
public function buildView(FormView $view, FormInterface $form, array $options): void
diff --git a/src/CoreShop/Bundle/PaymentBundle/Form/Type/PaymentProviderTranslationType.php b/src/CoreShop/Bundle/PaymentBundle/Form/Type/PaymentProviderTranslationType.php
index b544bbfb25..43a25cf6be 100644
--- a/src/CoreShop/Bundle/PaymentBundle/Form/Type/PaymentProviderTranslationType.php
+++ b/src/CoreShop/Bundle/PaymentBundle/Form/Type/PaymentProviderTranslationType.php
@@ -1,17 +1,21 @@
add('instructions', TextareaType::class, [
'required' => false,
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/PaymentBundle/Form/Type/PaymentProviderType.php b/src/CoreShop/Bundle/PaymentBundle/Form/Type/PaymentProviderType.php
index d66777a42d..68d9ff9cc8 100644
--- a/src/CoreShop/Bundle/PaymentBundle/Form/Type/PaymentProviderType.php
+++ b/src/CoreShop/Bundle/PaymentBundle/Form/Type/PaymentProviderType.php
@@ -1,17 +1,21 @@
add('active', CheckboxType::class, [
'required' => false,
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/PaymentBundle/Resources/public/pimcore/css/payment.css b/src/CoreShop/Bundle/PaymentBundle/Resources/public/pimcore/css/payment.css
index fb0d4ed5bd..48ec53593e 100644
--- a/src/CoreShop/Bundle/PaymentBundle/Resources/public/pimcore/css/payment.css
+++ b/src/CoreShop/Bundle/PaymentBundle/Resources/public/pimcore/css/payment.css
@@ -1,12 +1,15 @@
-/**
- * CoreShop.
+/*
+ * CoreShop
*
- * This source file is subject to the GNU General Public License version 3 (GPLv3)
- * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
- * files that are distributed with this source code.
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
* @license https://www.coreshop.org/license GPLv3 and CCL
+ *
*/
.pimcore_icon_coreShopPaymentProvider,
diff --git a/src/CoreShop/Bundle/PayumBundle/Action/AuthorizePaymentAction.php b/src/CoreShop/Bundle/PayumBundle/Action/AuthorizePaymentAction.php
index a60f19b75a..9f57bab51e 100644
--- a/src/CoreShop/Bundle/PayumBundle/Action/AuthorizePaymentAction.php
+++ b/src/CoreShop/Bundle/PayumBundle/Action/AuthorizePaymentAction.php
@@ -1,17 +1,21 @@
setModel($details);
$this->gateway->execute($request);
} finally {
- $payment->setDetails((array)$details);
+ $payment->setDetails((array) $details);
}
}
diff --git a/src/CoreShop/Bundle/PayumBundle/Action/CapturePaymentAction.php b/src/CoreShop/Bundle/PayumBundle/Action/CapturePaymentAction.php
index 416d207fe6..3c50ae6829 100644
--- a/src/CoreShop/Bundle/PayumBundle/Action/CapturePaymentAction.php
+++ b/src/CoreShop/Bundle/PayumBundle/Action/CapturePaymentAction.php
@@ -1,17 +1,21 @@
setModel($details);
$this->gateway->execute($request);
} finally {
- $payment->setDetails((array)$details);
+ $payment->setDetails((array) $details);
}
}
diff --git a/src/CoreShop/Bundle/PayumBundle/Action/ConfirmOrderAction.php b/src/CoreShop/Bundle/PayumBundle/Action/ConfirmOrderAction.php
index 2cba2dd771..d3b3514c73 100644
--- a/src/CoreShop/Bundle/PayumBundle/Action/ConfirmOrderAction.php
+++ b/src/CoreShop/Bundle/PayumBundle/Action/ConfirmOrderAction.php
@@ -1,17 +1,21 @@
gateway->execute($request);
} finally {
- $payment->setDetails((array)$details);
+ $payment->setDetails((array) $details);
}
}
diff --git a/src/CoreShop/Bundle/PayumBundle/Action/Offline/ConfirmOrderAction.php b/src/CoreShop/Bundle/PayumBundle/Action/Offline/ConfirmOrderAction.php
index b5af73af4c..7c697725cb 100644
--- a/src/CoreShop/Bundle/PayumBundle/Action/Offline/ConfirmOrderAction.php
+++ b/src/CoreShop/Bundle/PayumBundle/Action/Offline/ConfirmOrderAction.php
@@ -1,17 +1,21 @@
getCustomer()) {
$details['EMAIL'] = $customer->getEmail();
}
-
+
$invoiceAddress = $order->getInvoiceAddress();
if ($invoiceAddress) {
@@ -113,7 +119,6 @@ private function prepareAddressData(OrderInterface $order, array $details): arra
$details['PAYMENTREQUEST_0_SHIPTOCITY'] = $invoiceAddress->getCity();
$details['PAYMENTREQUEST_0_SHIPTOZIP'] = $invoiceAddress->getPostcode();
-
if ($invoiceAddress->getPhoneNumber() !== null) {
$details['PAYMENTREQUEST_0_SHIPTOPHONENUM'] = $invoiceAddress->getPhoneNumber();
}
diff --git a/src/CoreShop/Bundle/PayumBundle/Action/ResolveNextRouteAction.php b/src/CoreShop/Bundle/PayumBundle/Action/ResolveNextRouteAction.php
index a687b38826..c1a982312f 100644
--- a/src/CoreShop/Bundle/PayumBundle/Action/ResolveNextRouteAction.php
+++ b/src/CoreShop/Bundle/PayumBundle/Action/ResolveNextRouteAction.php
@@ -1,17 +1,21 @@
getGatewayName(),
$payment,
'coreshop_payment_after',
- []
+ [],
);
} else {
$token = $this->getPayum()->getTokenFactory()->createCaptureToken(
$gatewayConfig->getGatewayName(),
$payment,
'coreshop_payment_after',
- []
+ [],
);
}
diff --git a/src/CoreShop/Bundle/PayumBundle/CoreGatewayFactory.php b/src/CoreShop/Bundle/PayumBundle/CoreGatewayFactory.php
index a69c76db56..c247a3f9a5 100644
--- a/src/CoreShop/Bundle/PayumBundle/CoreGatewayFactory.php
+++ b/src/CoreShop/Bundle/PayumBundle/CoreGatewayFactory.php
@@ -1,17 +1,21 @@
scalarNode('obtain_credit_card')->defaultValue('@CoreShopPayum/Action/obtainCreditCard.html.twig')->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
return $treeBuilder;
}
diff --git a/src/CoreShop/Bundle/PayumBundle/DependencyInjection/CoreShopPayumExtension.php b/src/CoreShop/Bundle/PayumBundle/DependencyInjection/CoreShopPayumExtension.php
index 72b02dec95..c17fd00314 100644
--- a/src/CoreShop/Bundle/PayumBundle/DependencyInjection/CoreShopPayumExtension.php
+++ b/src/CoreShop/Bundle/PayumBundle/DependencyInjection/CoreShopPayumExtension.php
@@ -1,17 +1,21 @@
getPrevious();
/**
* @var int
+ *
* @psalm-type int
*/
$previousStackSize = count($previousStack);
diff --git a/src/CoreShop/Bundle/PayumBundle/Extension/UpdatePaymentStateExtension.php b/src/CoreShop/Bundle/PayumBundle/Extension/UpdatePaymentStateExtension.php
index a03dd77272..e7e57e214a 100644
--- a/src/CoreShop/Bundle/PayumBundle/Extension/UpdatePaymentStateExtension.php
+++ b/src/CoreShop/Bundle/PayumBundle/Extension/UpdatePaymentStateExtension.php
@@ -1,17 +1,21 @@
getPrevious();
/**
* @var int
+ *
* @psalm-type int
*/
$previousStackSize = count($previousStack);
diff --git a/src/CoreShop/Bundle/PayumBundle/Factory/ConfirmOrderFactory.php b/src/CoreShop/Bundle/PayumBundle/Factory/ConfirmOrderFactory.php
index 8a3553dd4b..25a248fbad 100644
--- a/src/CoreShop/Bundle/PayumBundle/Factory/ConfirmOrderFactory.php
+++ b/src/CoreShop/Bundle/PayumBundle/Factory/ConfirmOrderFactory.php
@@ -1,17 +1,21 @@
getData();
$data['payum.http_client'] = '@coreshop.payum.http_client';
- });
+ })
+ ;
}
}
diff --git a/src/CoreShop/Bundle/PayumBundle/Form/Type/SofortGatewayConfigurationType.php b/src/CoreShop/Bundle/PayumBundle/Form/Type/SofortGatewayConfigurationType.php
index 1bc0950f9a..5216ead67e 100644
--- a/src/CoreShop/Bundle/PayumBundle/Form/Type/SofortGatewayConfigurationType.php
+++ b/src/CoreShop/Bundle/PayumBundle/Form/Type/SofortGatewayConfigurationType.php
@@ -1,17 +1,21 @@
getData();
$data['payum.http_client'] = '@coreshop.payum.http_client';
- });
+ })
+ ;
}
}
diff --git a/src/CoreShop/Bundle/PayumBundle/Request/ConfirmOrder.php b/src/CoreShop/Bundle/PayumBundle/Request/ConfirmOrder.php
index 2494c3c42c..c5544846e9 100644
--- a/src/CoreShop/Bundle/PayumBundle/Request/ConfirmOrder.php
+++ b/src/CoreShop/Bundle/PayumBundle/Request/ConfirmOrder.php
@@ -1,17 +1,21 @@
true,
'factories' => $factoryResults,
- ]
+ ],
);
}
}
diff --git a/src/CoreShop/Bundle/PayumPaymentBundle/CoreShopPayumPaymentBundle.php b/src/CoreShop/Bundle/PayumPaymentBundle/CoreShopPayumPaymentBundle.php
index 3c654249a6..553f94e84a 100644
--- a/src/CoreShop/Bundle/PayumPaymentBundle/CoreShopPayumPaymentBundle.php
+++ b/src/CoreShop/Bundle/PayumPaymentBundle/CoreShopPayumPaymentBundle.php
@@ -1,17 +1,21 @@
addMethodCall(
'add',
- ['gateway_config', $tags['type'], $container->getDefinition($id)->getClass()]
+ ['gateway_config', $tags['type'], $container->getDefinition($id)->getClass()],
);
}
}
diff --git a/src/CoreShop/Bundle/PayumPaymentBundle/DependencyInjection/Compiler/RegisterPaymentSettingsFormsPass.php b/src/CoreShop/Bundle/PayumPaymentBundle/DependencyInjection/Compiler/RegisterPaymentSettingsFormsPass.php
index c254dcfa67..8b0731df16 100644
--- a/src/CoreShop/Bundle/PayumPaymentBundle/DependencyInjection/Compiler/RegisterPaymentSettingsFormsPass.php
+++ b/src/CoreShop/Bundle/PayumPaymentBundle/DependencyInjection/Compiler/RegisterPaymentSettingsFormsPass.php
@@ -1,17 +1,21 @@
addMethodCall('add', [$payumFactory, 'default', $container->getDefinition($id)->getClass()]);
+ ->addMethodCall('add', [$payumFactory, 'default', $container->getDefinition($id)->getClass()])
+ ;
}
}
}
diff --git a/src/CoreShop/Bundle/PayumPaymentBundle/DependencyInjection/Configuration.php b/src/CoreShop/Bundle/PayumPaymentBundle/DependencyInjection/Configuration.php
index 2ec8767169..49252e9269 100644
--- a/src/CoreShop/Bundle/PayumPaymentBundle/DependencyInjection/Configuration.php
+++ b/src/CoreShop/Bundle/PayumPaymentBundle/DependencyInjection/Configuration.php
@@ -1,17 +1,21 @@
children()
->scalarNode('driver')->defaultValue(CoreShopResourceBundle::DRIVER_DOCTRINE_ORM)->end()
- ->end();
+ ->end()
+ ;
$this->addResourcesSection($rootNode);
@@ -78,6 +83,7 @@ private function addResourcesSection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/PayumPaymentBundle/DependencyInjection/CoreShopPayumPaymentExtension.php b/src/CoreShop/Bundle/PayumPaymentBundle/DependencyInjection/CoreShopPayumPaymentExtension.php
index 9bcb650cec..e92e1f5e1f 100644
--- a/src/CoreShop/Bundle/PayumPaymentBundle/DependencyInjection/CoreShopPayumPaymentExtension.php
+++ b/src/CoreShop/Bundle/PayumPaymentBundle/DependencyInjection/CoreShopPayumPaymentExtension.php
@@ -1,17 +1,21 @@
$val->getGatewayConfig()->getFactoryName()];
},
- ]);
+ ])
+ ;
}
public static function getExtendedTypes(): array
diff --git a/src/CoreShop/Bundle/PayumPaymentBundle/Form/Extension/PaymentProviderTypeExtension.php b/src/CoreShop/Bundle/PayumPaymentBundle/Form/Extension/PaymentProviderTypeExtension.php
index d6bc065e0e..c616456180 100644
--- a/src/CoreShop/Bundle/PayumPaymentBundle/Form/Extension/PaymentProviderTypeExtension.php
+++ b/src/CoreShop/Bundle/PayumPaymentBundle/Form/Extension/PaymentProviderTypeExtension.php
@@ -1,17 +1,21 @@
getGatewayName()) {
$gatewayConfig->setGatewayName($paymentMethod->getIdentifier());
}
- });
+ })
+ ;
}
public function getExtendedType(): string
diff --git a/src/CoreShop/Bundle/PayumPaymentBundle/Form/Type/GatewayConfigType.php b/src/CoreShop/Bundle/PayumPaymentBundle/Form/Type/GatewayConfigType.php
index 205a79d2c7..4632cd76fd 100644
--- a/src/CoreShop/Bundle/PayumPaymentBundle/Form/Type/GatewayConfigType.php
+++ b/src/CoreShop/Bundle/PayumPaymentBundle/Form/Type/GatewayConfigType.php
@@ -1,17 +1,21 @@
getForm()->add('config', $configType, [
'auto_initialize' => false,
]);
- });
+ })
+ ;
}
}
diff --git a/src/CoreShop/Bundle/PayumPaymentBundle/Resolver/EventBasedPaymentProviderResolver.php b/src/CoreShop/Bundle/PayumPaymentBundle/Resolver/EventBasedPaymentProviderResolver.php
index f1fe9db4a3..4e4339271b 100644
--- a/src/CoreShop/Bundle/PayumPaymentBundle/Resolver/EventBasedPaymentProviderResolver.php
+++ b/src/CoreShop/Bundle/PayumPaymentBundle/Resolver/EventBasedPaymentProviderResolver.php
@@ -1,17 +1,21 @@
%command.name% executes all CoreShop migrations.
EOT
- );
+ )
+ ;
}
protected function execute(InputInterface $input, OutputInterface $output): int
diff --git a/src/CoreShop/Bundle/PimcoreBundle/Command/AppMigrationGenerateCommand.php b/src/CoreShop/Bundle/PimcoreBundle/Command/AppMigrationGenerateCommand.php
index c95fa22e45..8547b29a99 100644
--- a/src/CoreShop/Bundle/PimcoreBundle/Command/AppMigrationGenerateCommand.php
+++ b/src/CoreShop/Bundle/PimcoreBundle/Command/AppMigrationGenerateCommand.php
@@ -1,17 +1,21 @@
setName('coreshop:app:migration:generate')
- ->setDescription('Create a new App migration.');
+ ->setDescription('Create a new App migration.')
+ ;
}
protected function execute(InputInterface $input, OutputInterface $output): int
diff --git a/src/CoreShop/Bundle/PimcoreBundle/Controller/Admin/DynamicDropdownController.php b/src/CoreShop/Bundle/PimcoreBundle/Controller/Admin/DynamicDropdownController.php
index df65acdcaa..48931e22d8 100644
--- a/src/CoreShop/Bundle/PimcoreBundle/Controller/Admin/DynamicDropdownController.php
+++ b/src/CoreShop/Bundle/PimcoreBundle/Controller/Admin/DynamicDropdownController.php
@@ -1,17 +1,21 @@
query->get('folderName');
+ $folderName = (string) $request->query->get('folderName');
$parts = array_map(static function (string $part) {
return Service::getValidKey($part, 'object');
}, preg_split('/\//', $folderName, 0, \PREG_SPLIT_NO_EMPTY));
$parentFolderPath = sprintf('/%s', implode('/', $parts));
- $sort = (string)$request->query->get('sortBy', '');
+ $sort = (string) $request->query->get('sortBy', '');
$options = [];
if ($parentFolderPath) {
@@ -54,7 +58,7 @@ public function optionsAction(Request $request): JsonResponse
'success' => false,
'message' => $message,
'options' => $options,
- ]
+ ],
);
}
@@ -72,14 +76,14 @@ static function (array $a, array $b) use ($sort) {
}
return $a[$field] < $b[$field] ? 0 : 1;
- }
+ },
);
return $this->json(
[
'success' => true,
'options' => $options,
- ]
+ ],
);
}
@@ -87,7 +91,7 @@ public function methodsAction(Request $request, Factory $modelFactory): JsonResp
{
$availableMethods = [];
- $className = preg_replace("@[^a-zA-Z0-9_\-]@", '', (string)$request->query->get('className'));
+ $className = preg_replace("@[^a-zA-Z0-9_\-]@", '', (string) $request->query->get('className'));
if (!empty($className)) {
/**
@@ -119,8 +123,8 @@ public function methodsAction(Request $request, Factory $modelFactory): JsonResp
private function walkPath(Request $request, DataObject\AbstractObject $folder, array $options = [], string $path = ''): array
{
$currentLang = $request->query->get('current_language');
- $source = (string)$request->query->get('methodName');
- $className = preg_replace("@[^a-zA-Z0-9_\-]@", '', (string)$request->query->get('className'));
+ $source = (string) $request->query->get('methodName');
+ $className = preg_replace("@[^a-zA-Z0-9_\-]@", '', (string) $request->query->get('className'));
if (empty($className)) {
throw new \InvalidArgumentException();
diff --git a/src/CoreShop/Bundle/PimcoreBundle/Controller/Admin/GridController.php b/src/CoreShop/Bundle/PimcoreBundle/Controller/Admin/GridController.php
index 7061ed3c7b..31136a7551 100644
--- a/src/CoreShop/Bundle/PimcoreBundle/Controller/Admin/GridController.php
+++ b/src/CoreShop/Bundle/PimcoreBundle/Controller/Admin/GridController.php
@@ -1,17 +1,21 @@
request->get('ids');
- $actionId = (string)$request->request->get('actionId');
+ $actionId = (string) $request->request->get('actionId');
if (is_string($requestedIds)) {
$requestedIds = json_decode($requestedIds);
diff --git a/src/CoreShop/Bundle/PimcoreBundle/CoreExtension/DynamicDropdown.php b/src/CoreShop/Bundle/PimcoreBundle/CoreExtension/DynamicDropdown.php
index 4127b751c1..1603e20ba5 100644
--- a/src/CoreShop/Bundle/PimcoreBundle/CoreExtension/DynamicDropdown.php
+++ b/src/CoreShop/Bundle/PimcoreBundle/CoreExtension/DynamicDropdown.php
@@ -1,17 +1,21 @@
$fieldDefinition->getName(),
'type' => $this->getFieldType($fieldDefinition, $class, $container),
],
- $container
+ $container,
);
}
public function getFieldType(Data $fieldDefinition, $class = null, $container = null)
{
- if (!$this->instance instanceof SerializedDataType){
+ if (!$this->instance instanceof SerializedDataType) {
$this->instance = new SerializedDataType();
+
return $this->instance;
}
+
return $this->instance;
}
}
diff --git a/src/CoreShop/Bundle/PimcoreBundle/DataHub/Type/SerializedDataType.php b/src/CoreShop/Bundle/PimcoreBundle/DataHub/Type/SerializedDataType.php
index 4d57437bba..3fd709433c 100644
--- a/src/CoreShop/Bundle/PimcoreBundle/DataHub/Type/SerializedDataType.php
+++ b/src/CoreShop/Bundle/PimcoreBundle/DataHub/Type/SerializedDataType.php
@@ -1,17 +1,21 @@
registerAliasForArgument(
@@ -68,8 +72,8 @@ public function process(ContainerBuilder $container): void
strtolower(trim(preg_replace(
['/([A-Z])/', '/[_\s]+/'],
['_$1', ' '],
- $tag['type_hint']
- ))) . 'Registry'
+ $tag['type_hint'],
+ ))) . 'Registry',
);
}
}
diff --git a/src/CoreShop/Bundle/PimcoreBundle/DependencyInjection/Configuration.php b/src/CoreShop/Bundle/PimcoreBundle/DependencyInjection/Configuration.php
index 018c8cf1d2..ec98fda7e9 100644
--- a/src/CoreShop/Bundle/PimcoreBundle/DependencyInjection/Configuration.php
+++ b/src/CoreShop/Bundle/PimcoreBundle/DependencyInjection/Configuration.php
@@ -1,17 +1,21 @@
end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/PimcoreBundle/DependencyInjection/CoreShopPimcoreExtension.php b/src/CoreShop/Bundle/PimcoreBundle/DependencyInjection/CoreShopPimcoreExtension.php
index a01a6c512d..e3293f63b3 100644
--- a/src/CoreShop/Bundle/PimcoreBundle/DependencyInjection/CoreShopPimcoreExtension.php
+++ b/src/CoreShop/Bundle/PimcoreBundle/DependencyInjection/CoreShopPimcoreExtension.php
@@ -1,17 +1,21 @@
registerForAutoconfiguration(GridActionInterface::class)
- ->addTag(RegisterGridActionPass::GRID_ACTION_TAG);
+ ->addTag(RegisterGridActionPass::GRID_ACTION_TAG)
+ ;
$container
->registerForAutoconfiguration(GridFilterInterface::class)
- ->addTag(RegisterGridFilterPass::GRID_FILTER_TAG);
+ ->addTag(RegisterGridFilterPass::GRID_FILTER_TAG)
+ ;
}
}
diff --git a/src/CoreShop/Bundle/PimcoreBundle/DependencyInjection/Extension/AbstractPimcoreExtension.php b/src/CoreShop/Bundle/PimcoreBundle/DependencyInjection/Extension/AbstractPimcoreExtension.php
index ae9131a392..cb635bc19c 100644
--- a/src/CoreShop/Bundle/PimcoreBundle/DependencyInjection/Extension/AbstractPimcoreExtension.php
+++ b/src/CoreShop/Bundle/PimcoreBundle/DependencyInjection/Extension/AbstractPimcoreExtension.php
@@ -1,17 +1,21 @@
params = $params;
}
diff --git a/src/CoreShop/Bundle/PimcoreBundle/EventListener/AdminJavascriptListener.php b/src/CoreShop/Bundle/PimcoreBundle/EventListener/AdminJavascriptListener.php
index 66bea8d5b5..6d9539433d 100644
--- a/src/CoreShop/Bundle/PimcoreBundle/EventListener/AdminJavascriptListener.php
+++ b/src/CoreShop/Bundle/PimcoreBundle/EventListener/AdminJavascriptListener.php
@@ -1,17 +1,21 @@
slugger->slug($object, $language, (string)$i);
- $i++;
+ $slug = $this->slugger->slug($object, $language, (string) $i);
+ ++$i;
}
$newSlugs[] = new UrlSlug($slug, 0);
diff --git a/src/CoreShop/Bundle/PimcoreBundle/Events.php b/src/CoreShop/Bundle/PimcoreBundle/Events.php
index 2a5bc42063..d1180bdcfe 100644
--- a/src/CoreShop/Bundle/PimcoreBundle/Events.php
+++ b/src/CoreShop/Bundle/PimcoreBundle/Events.php
@@ -1,17 +1,21 @@
eventDispatcher->dispatch($mailEvent, Events::PRE_MAIL_SEND);
diff --git a/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/css/pimcore.css b/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/css/pimcore.css
index fef3a50f0b..1bb4fc5c9c 100644
--- a/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/css/pimcore.css
+++ b/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/css/pimcore.css
@@ -1,12 +1,15 @@
-/**
- * CoreShop.
+/*
+ * CoreShop
*
- * This source file is subject to the GNU General Public License version 3 (GPLv3)
- * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
- * files that are distributed with this source code.
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
* @license https://www.coreshop.org/license GPLv3 and CCL
+ *
*/
.coreshop_icon_serialized,
diff --git a/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/data/coreShopDynamicDropdown.js b/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/data/coreShopDynamicDropdown.js
index 6692f44e4b..3e5f3b0aea 100644
--- a/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/data/coreShopDynamicDropdown.js
+++ b/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/data/coreShopDynamicDropdown.js
@@ -1,12 +1,15 @@
-/**
- * CoreShop.
+/*
+ * CoreShop
*
- * This source file is subject to the GNU General Public License version 3 (GPLv3)
- * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
- * files that are distributed with this source code.
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
* @license https://www.coreshop.org/license GPLv3 and CCL
+ *
*/
pimcore.registerNS('pimcore.object.classes.data.coreShopDynamicDropdown');
diff --git a/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/data/coreShopDynamicDropdownMultiple.js b/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/data/coreShopDynamicDropdownMultiple.js
index 8b81b284d9..a2f7c448c8 100644
--- a/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/data/coreShopDynamicDropdownMultiple.js
+++ b/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/data/coreShopDynamicDropdownMultiple.js
@@ -1,12 +1,15 @@
-/**
- * CoreShop.
+/*
+ * CoreShop
*
- * This source file is subject to the GNU General Public License version 3 (GPLv3)
- * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
- * files that are distributed with this source code.
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
* @license https://www.coreshop.org/license GPLv3 and CCL
+ *
*/
pimcore.registerNS('pimcore.object.classes.data.coreShopDynamicDropdownMultiple');
diff --git a/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/data/coreShopItemSelector.js b/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/data/coreShopItemSelector.js
index 5663061c87..bf2c747a51 100644
--- a/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/data/coreShopItemSelector.js
+++ b/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/data/coreShopItemSelector.js
@@ -1,12 +1,15 @@
-/**
- * CoreShop.
+/*
+ * CoreShop
*
- * This source file is subject to the GNU General Public License version 3 (GPLv3)
- * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
- * files that are distributed with this source code.
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
* @license https://www.coreshop.org/license GPLv3 and CCL
+ *
*/
pimcore.registerNS('pimcore.object.classes.data.coreShopItemSelector');
diff --git a/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/data/coreShopSuperBoxSelect.js b/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/data/coreShopSuperBoxSelect.js
index f81801728b..b47b1426bb 100644
--- a/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/data/coreShopSuperBoxSelect.js
+++ b/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/data/coreShopSuperBoxSelect.js
@@ -1,12 +1,15 @@
-/**
- * CoreShop.
+/*
+ * CoreShop
*
- * This source file is subject to the GNU General Public License version 3 (GPLv3)
- * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
- * files that are distributed with this source code.
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
* @license https://www.coreshop.org/license GPLv3 and CCL
+ *
*/
pimcore.registerNS('pimcore.object.classes.data.coreShopSuperBoxSelect');
diff --git a/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/tags/coreShopDynamicDropdown.js b/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/tags/coreShopDynamicDropdown.js
index da026cb147..de764cddc1 100644
--- a/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/tags/coreShopDynamicDropdown.js
+++ b/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/tags/coreShopDynamicDropdown.js
@@ -1,12 +1,15 @@
-/**
- * CoreShop.
+/*
+ * CoreShop
*
- * This source file is subject to the GNU General Public License version 3 (GPLv3)
- * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
- * files that are distributed with this source code.
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
* @license https://www.coreshop.org/license GPLv3 and CCL
+ *
*/
pimcore.registerNS('pimcore.object.tags.coreShopDynamicDropdown');
diff --git a/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/tags/coreShopDynamicDropdownMultiple.js b/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/tags/coreShopDynamicDropdownMultiple.js
index d28bd6ec3e..4fb99edca3 100644
--- a/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/tags/coreShopDynamicDropdownMultiple.js
+++ b/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/tags/coreShopDynamicDropdownMultiple.js
@@ -1,12 +1,15 @@
-/**
- * CoreShop.
+/*
+ * CoreShop
*
- * This source file is subject to the GNU General Public License version 3 (GPLv3)
- * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
- * files that are distributed with this source code.
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
* @license https://www.coreshop.org/license GPLv3 and CCL
+ *
*/
pimcore.registerNS('pimcore.object.tags.coreShopDynamicDropdownMultiple');
diff --git a/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/tags/coreShopItemSelector.js b/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/tags/coreShopItemSelector.js
index be565238f5..6e80637f0b 100644
--- a/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/tags/coreShopItemSelector.js
+++ b/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/tags/coreShopItemSelector.js
@@ -1,12 +1,15 @@
-/**
- * CoreShop.
+/*
+ * CoreShop
*
- * This source file is subject to the GNU General Public License version 3 (GPLv3)
- * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
- * files that are distributed with this source code.
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
* @license https://www.coreshop.org/license GPLv3 and CCL
+ *
*/
pimcore.registerNS('pimcore.object.tags.coreShopItemSelector');
diff --git a/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/tags/coreShopSuperBoxSelect.js b/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/tags/coreShopSuperBoxSelect.js
index 09a063b3f5..c18426ead0 100644
--- a/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/tags/coreShopSuperBoxSelect.js
+++ b/src/CoreShop/Bundle/PimcoreBundle/Resources/public/pimcore/js/coreExtension/tags/coreShopSuperBoxSelect.js
@@ -1,12 +1,15 @@
-/**
- * CoreShop.
+/*
+ * CoreShop
*
- * This source file is subject to the GNU General Public License version 3 (GPLv3)
- * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
- * files that are distributed with this source code.
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
* @license https://www.coreshop.org/license GPLv3 and CCL
+ *
*/
pimcore.registerNS('pimcore.object.tags.coreShopSuperBoxSelect');
diff --git a/src/CoreShop/Bundle/ProductBundle/Controller/ProductPriceRuleController.php b/src/CoreShop/Bundle/ProductBundle/Controller/ProductPriceRuleController.php
index 2fa8ef7ccd..4db7bfea45 100644
--- a/src/CoreShop/Bundle/ProductBundle/Controller/ProductPriceRuleController.php
+++ b/src/CoreShop/Bundle/ProductBundle/Controller/ProductPriceRuleController.php
@@ -1,17 +1,21 @@
get('coreshop.repository.stack.product');
/** @var ProductInterface $product */
- $product = $repository->find($this->getParameterFromRequest($request,'productId'));
+ $product = $repository->find($this->getParameterFromRequest($request, 'productId'));
if ($product instanceof Concrete) {
$product = VersionHelper::getLatestVersion($product);
diff --git a/src/CoreShop/Bundle/ProductBundle/CoreExtension/ProductSpecificPriceRules.php b/src/CoreShop/Bundle/ProductBundle/CoreExtension/ProductSpecificPriceRules.php
index 9f3d7381fd..1189f161cf 100644
--- a/src/CoreShop/Bundle/ProductBundle/CoreExtension/ProductSpecificPriceRules.php
+++ b/src/CoreShop/Bundle/ProductBundle/CoreExtension/ProductSpecificPriceRules.php
@@ -1,17 +1,21 @@
arrayCastRecursive($value);
}
if ($value instanceof \stdClass) {
- $array[$key] = $this->arrayCastRecursive((array)$value);
+ $array[$key] = $this->arrayCastRecursive((array) $value);
}
}
}
if ($array instanceof \stdClass) {
- return $this->arrayCastRecursive((array)$array);
+ return $this->arrayCastRecursive((array) $array);
}
return $array;
diff --git a/src/CoreShop/Bundle/ProductBundle/CoreExtension/ProductUnit.php b/src/CoreShop/Bundle/ProductBundle/CoreExtension/ProductUnit.php
index f58194333d..4ca90b6a9a 100644
--- a/src/CoreShop/Bundle/ProductBundle/CoreExtension/ProductUnit.php
+++ b/src/CoreShop/Bundle/ProductBundle/CoreExtension/ProductUnit.php
@@ -1,17 +1,21 @@
getDataFromResource($data, $object, $params);
}
}
@@ -137,7 +141,7 @@ public function getDataForResource($data, $object = null, $params = [])
public function getDataFromResource($data, $object = null, $params = [])
{
- if ((int)$data > 0) {
+ if ((int) $data > 0) {
return $this->getRepository()->find($data);
}
diff --git a/src/CoreShop/Bundle/ProductBundle/CoreExtension/ProductUnitDefinitions.php b/src/CoreShop/Bundle/ProductBundle/CoreExtension/ProductUnitDefinitions.php
index 0b9063a6ca..e0c3235a10 100644
--- a/src/CoreShop/Bundle/ProductBundle/CoreExtension/ProductUnitDefinitions.php
+++ b/src/CoreShop/Bundle/ProductBundle/CoreExtension/ProductUnitDefinitions.php
@@ -1,17 +1,21 @@
0) {
+ if (strlen((string) $defaultValue) > 0) {
$this->defaultValue = $defaultValue;
}
@@ -453,7 +457,7 @@ public function getVersionPreview($data, $object = null, $params = [])
return sprintf(
'Default Unit: %s, additional units: %d',
$defaultUnit,
- $data->getAdditionalUnitDefinitions()->count()
+ $data->getAdditionalUnitDefinitions()->count(),
);
}
@@ -480,7 +484,7 @@ public function getFromCsvImport($importValue, $object = null, $params = [])
throw new \InvalidArgumentException(sprintf(
'Error decoding Product Unit Definitions JSON `%s`: %s',
$importValue,
- json_last_error_msg()
+ json_last_error_msg(),
));
}
@@ -502,11 +506,11 @@ public function getDiffDataForEditMode($data, $object = null, $params = [])
*/
protected function toNumeric($value): float|int
{
- if (!str_contains((string)$value, '.')) {
- return (int)$value;
+ if (!str_contains((string) $value, '.')) {
+ return (int) $value;
}
- return (float)$value;
+ return (float) $value;
}
/**
@@ -518,7 +522,7 @@ protected function expandDotNotationKeys(array $array)
while (count($array)) {
$value = reset($array);
- $key = (string)key($array);
+ $key = (string) key($array);
unset($array[$key]);
if (str_contains($key, '.')) {
diff --git a/src/CoreShop/Bundle/ProductBundle/CoreShopProductBundle.php b/src/CoreShop/Bundle/ProductBundle/CoreShopProductBundle.php
index 6dd546950b..0bfa623645 100644
--- a/src/CoreShop/Bundle/ProductBundle/CoreShopProductBundle.php
+++ b/src/CoreShop/Bundle/ProductBundle/CoreShopProductBundle.php
@@ -1,17 +1,21 @@
scalarNode('manufacturer')->defaultValue(ManufacturerInterface::class)->cannotBeEmpty()->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
private function addModelsSection(ArrayNodeDefinition $node): void
@@ -302,7 +307,8 @@ private function addModelsSection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
@@ -333,6 +339,7 @@ private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/ProductBundle/DependencyInjection/CoreShopProductExtension.php b/src/CoreShop/Bundle/ProductBundle/DependencyInjection/CoreShopProductExtension.php
index 16a0d5d7ad..db1c5439af 100644
--- a/src/CoreShop/Bundle/ProductBundle/DependencyInjection/CoreShopProductExtension.php
+++ b/src/CoreShop/Bundle/ProductBundle/DependencyInjection/CoreShopProductExtension.php
@@ -1,17 +1,21 @@
registerForAutoconfiguration(ProductDiscountCalculatorInterface::class)
- ->addTag(ProductDiscountCalculatorsPass::PRODUCT_DISCOUNT_CALCULATOR_TAG);
+ ->addTag(ProductDiscountCalculatorsPass::PRODUCT_DISCOUNT_CALCULATOR_TAG)
+ ;
$container
->registerForAutoconfiguration(ProductDiscountPriceCalculatorInterface::class)
- ->addTag(ProductDiscountPriceCalculatorsPass::PRODUCT_DISCOUNT_PRICE_CALCULATOR_TAG);
+ ->addTag(ProductDiscountPriceCalculatorsPass::PRODUCT_DISCOUNT_PRICE_CALCULATOR_TAG)
+ ;
$container
->registerForAutoconfiguration(ProductPriceCalculatorInterface::class)
- ->addTag(ProductRetailPriceCalculatorsPass::PRODUCT_RETAIL_PRICE_CALCULATOR_TAG);
+ ->addTag(ProductRetailPriceCalculatorsPass::PRODUCT_RETAIL_PRICE_CALCULATOR_TAG)
+ ;
$container
->registerForAutoconfiguration(ProductRetailPriceCalculatorInterface::class)
- ->addTag(ProductRetailPriceCalculatorsPass::PRODUCT_RETAIL_PRICE_CALCULATOR_TAG);
+ ->addTag(ProductRetailPriceCalculatorsPass::PRODUCT_RETAIL_PRICE_CALCULATOR_TAG)
+ ;
$container
->registerForAutoconfiguration(ProductActionProcessorInterface::class)
- ->addTag(ProductPriceRuleActionPass::PRODUCT_PRICE_RULE_ACTION_TAG);
+ ->addTag(ProductPriceRuleActionPass::PRODUCT_PRICE_RULE_ACTION_TAG)
+ ;
$container
->registerForAutoconfiguration(ProductConditionCheckerInterface::class)
- ->addTag(ProductPriceRuleConditionPass::PRODUCT_PRICE_RULE_CONDITION_TAG);
+ ->addTag(ProductPriceRuleConditionPass::PRODUCT_PRICE_RULE_CONDITION_TAG)
+ ;
$container
->registerForAutoconfiguration(ProductSpecificActionProcessorInterface::class)
- ->addTag(ProductSpecificPriceRuleActionPass::PRODUCT_SPECIFIC_PRICE_RULE_ACTION_TAG);
+ ->addTag(ProductSpecificPriceRuleActionPass::PRODUCT_SPECIFIC_PRICE_RULE_ACTION_TAG)
+ ;
$container
->registerForAutoconfiguration(ProductSpecificConditionCheckerInterface::class)
- ->addTag(ProductSpecificPriceRuleConditionPass::PRODUCT_SPECIFIC_PRICE_RULE_CONDITION_TAG);
+ ->addTag(ProductSpecificPriceRuleConditionPass::PRODUCT_SPECIFIC_PRICE_RULE_CONDITION_TAG)
+ ;
}
}
diff --git a/src/CoreShop/Bundle/ProductBundle/Doctrine/ORM/PriceRuleRepository.php b/src/CoreShop/Bundle/ProductBundle/Doctrine/ORM/PriceRuleRepository.php
index 747ddd7499..8da3a5d625 100644
--- a/src/CoreShop/Bundle/ProductBundle/Doctrine/ORM/PriceRuleRepository.php
+++ b/src/CoreShop/Bundle/ProductBundle/Doctrine/ORM/PriceRuleRepository.php
@@ -1,17 +1,21 @@
andWhere('o.active = 1')
->addOrderBy('o.priority', 'ASC')
->getQuery()
- ->getResult();
+ ->getResult()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/ProductBundle/Doctrine/ORM/ProductPriceRuleRepository.php b/src/CoreShop/Bundle/ProductBundle/Doctrine/ORM/ProductPriceRuleRepository.php
index f87fc9e499..a627132be7 100644
--- a/src/CoreShop/Bundle/ProductBundle/Doctrine/ORM/ProductPriceRuleRepository.php
+++ b/src/CoreShop/Bundle/ProductBundle/Doctrine/ORM/ProductPriceRuleRepository.php
@@ -1,17 +1,21 @@
setParameter('productId', $product->getId())
->addOrderBy('o.priority', 'ASC')
->getQuery()
- ->getResult();
+ ->getResult()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/ProductBundle/Doctrine/ORM/ProductUnitDefinitionsRepository.php b/src/CoreShop/Bundle/ProductBundle/Doctrine/ORM/ProductUnitDefinitionsRepository.php
index 28c2a4c442..b455402aff 100644
--- a/src/CoreShop/Bundle/ProductBundle/Doctrine/ORM/ProductUnitDefinitionsRepository.php
+++ b/src/CoreShop/Bundle/ProductBundle/Doctrine/ORM/ProductUnitDefinitionsRepository.php
@@ -1,17 +1,21 @@
andWhere('o.product = :product')
->setParameter('product', $product->getId())
->getQuery()
- ->getOneOrNullResult();
+ ->getOneOrNullResult()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/ProductBundle/Doctrine/ORM/ProductUnitRepository.php b/src/CoreShop/Bundle/ProductBundle/Doctrine/ORM/ProductUnitRepository.php
index 0731f599fd..9a96352af4 100644
--- a/src/CoreShop/Bundle/ProductBundle/Doctrine/ORM/ProductUnitRepository.php
+++ b/src/CoreShop/Bundle/ProductBundle/Doctrine/ORM/ProductUnitRepository.php
@@ -1,17 +1,21 @@
andWhere('o.name = :name')
->setParameter('name', $name)
->getQuery()
- ->getOneOrNullResult();
+ ->getOneOrNullResult()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/ProductBundle/EventListener/CategoryPersistEventListener.php b/src/CoreShop/Bundle/ProductBundle/EventListener/CategoryPersistEventListener.php
index 03f06b1bce..3e8759045a 100644
--- a/src/CoreShop/Bundle/ProductBundle/EventListener/CategoryPersistEventListener.php
+++ b/src/CoreShop/Bundle/ProductBundle/EventListener/CategoryPersistEventListener.php
@@ -1,17 +1,21 @@
[
'data-form-collection' => 'update',
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/ProductBundle/Form/Type/ProductPriceRuleConditionChoiceType.php b/src/CoreShop/Bundle/ProductBundle/Form/Type/ProductPriceRuleConditionChoiceType.php
index 27d4a5af35..026c9b9a2e 100644
--- a/src/CoreShop/Bundle/ProductBundle/Form/Type/ProductPriceRuleConditionChoiceType.php
+++ b/src/CoreShop/Bundle/ProductBundle/Form/Type/ProductPriceRuleConditionChoiceType.php
@@ -1,17 +1,21 @@
[
'data-form-collection' => 'update',
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/ProductBundle/Form/Type/ProductPriceRuleTranslationType.php b/src/CoreShop/Bundle/ProductBundle/Form/Type/ProductPriceRuleTranslationType.php
index b181589f14..2944c5cc84 100644
--- a/src/CoreShop/Bundle/ProductBundle/Form/Type/ProductPriceRuleTranslationType.php
+++ b/src/CoreShop/Bundle/ProductBundle/Form/Type/ProductPriceRuleTranslationType.php
@@ -1,17 +1,21 @@
add('label', TextType::class);
+ ->add('label', TextType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/ProductBundle/Form/Type/ProductPriceRuleType.php b/src/CoreShop/Bundle/ProductBundle/Form/Type/ProductPriceRuleType.php
index 8233d1972e..9121e9f7dc 100644
--- a/src/CoreShop/Bundle/ProductBundle/Form/Type/ProductPriceRuleType.php
+++ b/src/CoreShop/Bundle/ProductBundle/Form/Type/ProductPriceRuleType.php
@@ -1,17 +1,21 @@
add('active', CheckboxType::class)
->add('stopPropagation', CheckboxType::class)
->add('conditions', ProductPriceRuleConditionCollectionType::class)
- ->add('actions', ProductPriceRuleActionCollectionType::class);
+ ->add('actions', ProductPriceRuleActionCollectionType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/ProductBundle/Form/Type/ProductSelectionType.php b/src/CoreShop/Bundle/ProductBundle/Form/Type/ProductSelectionType.php
index f8d5f3d441..aeb4a8b137 100644
--- a/src/CoreShop/Bundle/ProductBundle/Form/Type/ProductSelectionType.php
+++ b/src/CoreShop/Bundle/ProductBundle/Form/Type/ProductSelectionType.php
@@ -1,17 +1,21 @@
[
'data-form-collection' => 'update',
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/ProductBundle/Form/Type/ProductSpecificPriceRuleConditionChoiceType.php b/src/CoreShop/Bundle/ProductBundle/Form/Type/ProductSpecificPriceRuleConditionChoiceType.php
index 427a129adf..55aeaa8511 100644
--- a/src/CoreShop/Bundle/ProductBundle/Form/Type/ProductSpecificPriceRuleConditionChoiceType.php
+++ b/src/CoreShop/Bundle/ProductBundle/Form/Type/ProductSpecificPriceRuleConditionChoiceType.php
@@ -1,17 +1,21 @@
[
'data-form-collection' => 'update',
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/ProductBundle/Form/Type/ProductSpecificPriceRuleTranslationType.php b/src/CoreShop/Bundle/ProductBundle/Form/Type/ProductSpecificPriceRuleTranslationType.php
index 937885c062..c4bf3f9167 100644
--- a/src/CoreShop/Bundle/ProductBundle/Form/Type/ProductSpecificPriceRuleTranslationType.php
+++ b/src/CoreShop/Bundle/ProductBundle/Form/Type/ProductSpecificPriceRuleTranslationType.php
@@ -1,17 +1,21 @@
add('label', TextType::class);
+ ->add('label', TextType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/ProductBundle/Form/Type/ProductSpecificPriceRuleType.php b/src/CoreShop/Bundle/ProductBundle/Form/Type/ProductSpecificPriceRuleType.php
index 818b2e0524..db2849e64d 100644
--- a/src/CoreShop/Bundle/ProductBundle/Form/Type/ProductSpecificPriceRuleType.php
+++ b/src/CoreShop/Bundle/ProductBundle/Form/Type/ProductSpecificPriceRuleType.php
@@ -1,17 +1,21 @@
add('stopPropagation', CheckboxType::class)
->add('priority', IntegerType::class)
->add('conditions', ProductSpecificPriceRuleConditionCollectionType::class)
- ->add('actions', ProductSpecificPriceRuleActionCollectionType::class);
+ ->add('actions', ProductSpecificPriceRuleActionCollectionType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/ProductBundle/Form/Type/Rule/Action/DiscountAmountConfigurationType.php b/src/CoreShop/Bundle/ProductBundle/Form/Type/Rule/Action/DiscountAmountConfigurationType.php
index 5c3be0c2c7..9ef29a8634 100644
--- a/src/CoreShop/Bundle/ProductBundle/Form/Type/Rule/Action/DiscountAmountConfigurationType.php
+++ b/src/CoreShop/Bundle/ProductBundle/Form/Type/Rule/Action/DiscountAmountConfigurationType.php
@@ -1,17 +1,21 @@
[
new NotBlank(['groups' => $this->validationGroups]),
],
- ]);
+ ])
+ ;
$builder->get('currency')->addModelTransformer(new CallbackTransformer(
function (mixed $currency) {
@@ -63,7 +68,7 @@ function (mixed $currency) {
}
return null;
- }
+ },
));
}
diff --git a/src/CoreShop/Bundle/ProductBundle/Form/Type/Rule/Action/DiscountPercentConfigurationType.php b/src/CoreShop/Bundle/ProductBundle/Form/Type/Rule/Action/DiscountPercentConfigurationType.php
index ba2cd4e624..dd780b7004 100644
--- a/src/CoreShop/Bundle/ProductBundle/Form/Type/Rule/Action/DiscountPercentConfigurationType.php
+++ b/src/CoreShop/Bundle/ProductBundle/Form/Type/Rule/Action/DiscountPercentConfigurationType.php
@@ -1,17 +1,21 @@
'numeric', 'groups' => $this->validationGroups]),
new Range(['min' => 0, 'max' => 100, 'groups' => $this->validationGroups]),
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/ProductBundle/Form/Type/Rule/Action/PriceConfigurationType.php b/src/CoreShop/Bundle/ProductBundle/Form/Type/Rule/Action/PriceConfigurationType.php
index b4562e3162..18b1f36b33 100644
--- a/src/CoreShop/Bundle/ProductBundle/Form/Type/Rule/Action/PriceConfigurationType.php
+++ b/src/CoreShop/Bundle/ProductBundle/Form/Type/Rule/Action/PriceConfigurationType.php
@@ -1,17 +1,21 @@
[
new NotBlank(['groups' => $this->validationGroups]),
],
- ]);
+ ])
+ ;
$builder->get('currency')->addModelTransformer(new CallbackTransformer(
function (mixed $currency) {
@@ -61,7 +66,7 @@ function (mixed $currency) {
}
return null;
- }
+ },
));
}
diff --git a/src/CoreShop/Bundle/ProductBundle/Form/Type/Rule/Condition/ProductPriceNestedConfigurationType.php b/src/CoreShop/Bundle/ProductBundle/Form/Type/Rule/Condition/ProductPriceNestedConfigurationType.php
index a07ad23d0d..5c2c4ff2d5 100644
--- a/src/CoreShop/Bundle/ProductBundle/Form/Type/Rule/Condition/ProductPriceNestedConfigurationType.php
+++ b/src/CoreShop/Bundle/ProductBundle/Form/Type/Rule/Condition/ProductPriceNestedConfigurationType.php
@@ -1,17 +1,21 @@
add('conditions', ProductPriceRuleConditionCollectionType::class, [
'constraints' => new Valid(['groups' => $this->validationGroups]),
'nested' => true,
- ]);
+ ])
+ ;
$builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
$data = $event->getData();
diff --git a/src/CoreShop/Bundle/ProductBundle/Form/Type/Rule/Condition/ProductSpecificPriceNestedConfigurationType.php b/src/CoreShop/Bundle/ProductBundle/Form/Type/Rule/Condition/ProductSpecificPriceNestedConfigurationType.php
index 665438dd8e..d99054f4a4 100644
--- a/src/CoreShop/Bundle/ProductBundle/Form/Type/Rule/Condition/ProductSpecificPriceNestedConfigurationType.php
+++ b/src/CoreShop/Bundle/ProductBundle/Form/Type/Rule/Condition/ProductSpecificPriceNestedConfigurationType.php
@@ -1,17 +1,21 @@
add('conditions', ProductSpecificPriceRuleConditionCollectionType::class, [
'constraints' => [new Valid(['groups' => $this->validationGroups])],
'nested' => true,
- ]);
+ ])
+ ;
$builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
$data = $event->getData();
diff --git a/src/CoreShop/Bundle/ProductBundle/Form/Type/Rule/Condition/TimespanConfigurationType.php b/src/CoreShop/Bundle/ProductBundle/Form/Type/Rule/Condition/TimespanConfigurationType.php
index 57afff7362..cd8ecafdc9 100644
--- a/src/CoreShop/Bundle/ProductBundle/Form/Type/Rule/Condition/TimespanConfigurationType.php
+++ b/src/CoreShop/Bundle/ProductBundle/Form/Type/Rule/Condition/TimespanConfigurationType.php
@@ -1,17 +1,21 @@
'id',
'choice_label' => 'name',
'choice_translation_domain' => false,
- ]);
+ ])
+ ;
}
public function getParent(): string
diff --git a/src/CoreShop/Bundle/ProductBundle/Form/Type/Unit/ProductUnitDefinitionCollectionType.php b/src/CoreShop/Bundle/ProductBundle/Form/Type/Unit/ProductUnitDefinitionCollectionType.php
index 84748c3c93..51a1e2a736 100644
--- a/src/CoreShop/Bundle/ProductBundle/Form/Type/Unit/ProductUnitDefinitionCollectionType.php
+++ b/src/CoreShop/Bundle/ProductBundle/Form/Type/Unit/ProductUnitDefinitionCollectionType.php
@@ -1,17 +1,21 @@
add('price', MoneyType::class)
- ->add('unitDefinition', ProductUnitDefinitionSelectionType::class);
+ ->add('unitDefinition', ProductUnitDefinitionSelectionType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/ProductBundle/Form/Type/Unit/ProductUnitDefinitionSelectionType.php b/src/CoreShop/Bundle/ProductBundle/Form/Type/Unit/ProductUnitDefinitionSelectionType.php
index afc463b60c..d52aa8c83a 100644
--- a/src/CoreShop/Bundle/ProductBundle/Form/Type/Unit/ProductUnitDefinitionSelectionType.php
+++ b/src/CoreShop/Bundle/ProductBundle/Form/Type/Unit/ProductUnitDefinitionSelectionType.php
@@ -1,17 +1,21 @@
productUnitDefinitionRepository->find($value);
- }
+ },
));
}
@@ -53,7 +57,8 @@ public function configureOptions(OptionsResolver $resolver): void
$resolver
->setDefaults([
'csrf_protection' => false,
- ]);
+ ])
+ ;
}
public function getParent(): string
diff --git a/src/CoreShop/Bundle/ProductBundle/Form/Type/Unit/ProductUnitDefinitionType.php b/src/CoreShop/Bundle/ProductBundle/Form/Type/Unit/ProductUnitDefinitionType.php
index 4f484aaf0d..5ced9c681f 100644
--- a/src/CoreShop/Bundle/ProductBundle/Form/Type/Unit/ProductUnitDefinitionType.php
+++ b/src/CoreShop/Bundle/ProductBundle/Form/Type/Unit/ProductUnitDefinitionType.php
@@ -1,17 +1,21 @@
add('unit', ProductUnitChoiceType::class)
->add('conversionRate', NumberType::class)
- ->add('precision', IntegerType::class);
+ ->add('precision', IntegerType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/ProductBundle/Form/Type/Unit/ProductUnitDefinitionsChoiceType.php b/src/CoreShop/Bundle/ProductBundle/Form/Type/Unit/ProductUnitDefinitionsChoiceType.php
index 4c5f205b24..0b502a48aa 100644
--- a/src/CoreShop/Bundle/ProductBundle/Form/Type/Unit/ProductUnitDefinitionsChoiceType.php
+++ b/src/CoreShop/Bundle/ProductBundle/Form/Type/Unit/ProductUnitDefinitionsChoiceType.php
@@ -1,17 +1,21 @@
add('additionalUnitDefinitions', ProductUnitDefinitionCollectionType::class, [
'mapped' => false,
- ]);
+ ])
+ ;
}
public function onSubmit(FormEvent $event): void
diff --git a/src/CoreShop/Bundle/ProductBundle/Form/Type/Unit/ProductUnitTranslationType.php b/src/CoreShop/Bundle/ProductBundle/Form/Type/Unit/ProductUnitTranslationType.php
index 364ddae35e..9d0a00c317 100644
--- a/src/CoreShop/Bundle/ProductBundle/Form/Type/Unit/ProductUnitTranslationType.php
+++ b/src/CoreShop/Bundle/ProductBundle/Form/Type/Unit/ProductUnitTranslationType.php
@@ -1,17 +1,21 @@
add('fullLabel', TextType::class)
->add('fullPluralLabel', TextType::class)
->add('shortLabel', TextType::class)
- ->add('shortPluralLabel', TextType::class);
+ ->add('shortPluralLabel', TextType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/ProductBundle/Form/Type/Unit/ProductUnitType.php b/src/CoreShop/Bundle/ProductBundle/Form/Type/Unit/ProductUnitType.php
index 1ea08b48f4..eb5e30d23e 100644
--- a/src/CoreShop/Bundle/ProductBundle/Form/Type/Unit/ProductUnitType.php
+++ b/src/CoreShop/Bundle/ProductBundle/Form/Type/Unit/ProductUnitType.php
@@ -1,17 +1,21 @@
add('name', TextType::class)
->add('translations', ResourceTranslationsType::class, [
'entry_type' => ProductUnitTranslationType::class,
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/ProductBundle/Pimcore/Repository/CategoryRepository.php b/src/CoreShop/Bundle/ProductBundle/Pimcore/Repository/CategoryRepository.php
index 467d60385f..df6af21d0a 100644
--- a/src/CoreShop/Bundle/ProductBundle/Pimcore/Repository/CategoryRepository.php
+++ b/src/CoreShop/Bundle/ProductBundle/Pimcore/Repository/CategoryRepository.php
@@ -1,17 +1,21 @@
setOrderKey(
sprintf('o_%s ASC', $category->getChildrenSortBy()),
- false
+ false,
);
} else {
$list->setOrderKey(
'o_key ASC',
- false
+ false,
);
}
diff --git a/src/CoreShop/Bundle/ProductBundle/Pimcore/Repository/ProductRepository.php b/src/CoreShop/Bundle/ProductBundle/Pimcore/Repository/ProductRepository.php
index 80f66d4833..a2d183d71d 100644
--- a/src/CoreShop/Bundle/ProductBundle/Pimcore/Repository/ProductRepository.php
+++ b/src/CoreShop/Bundle/ProductBundle/Pimcore/Repository/ProductRepository.php
@@ -1,17 +1,21 @@
arrayCastRecursive($value);
}
if ($value instanceof \stdClass) {
- $array[$key] = $this->arrayCastRecursive((array)$value);
+ $array[$key] = $this->arrayCastRecursive((array) $value);
}
}
}
if ($array instanceof \stdClass) {
- return $this->arrayCastRecursive((array)$array);
+ return $this->arrayCastRecursive((array) $array);
}
return $array;
@@ -509,7 +513,7 @@ protected function checkForRangeOrphans(EntityManager $entityManager, ProductQua
$keepIds = [];
foreach ($currentRanges as $currentRange) {
if (isset($currentRange['id']) && $currentRange['id'] !== null) {
- $keepIds[] = (int)$currentRange['id'];
+ $keepIds[] = (int) $currentRange['id'];
}
}
diff --git a/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/CoreShopProductQuantityPriceRulesBundle.php b/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/CoreShopProductQuantityPriceRulesBundle.php
index afea6c28a2..7f1317e2b0 100644
--- a/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/CoreShopProductQuantityPriceRulesBundle.php
+++ b/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/CoreShopProductQuantityPriceRulesBundle.php
@@ -1,17 +1,21 @@
end()
->end()
->end()
- ->end();
+ ->end()
+ ;
$this->addModelsSection($rootNode);
$this->addPimcoreResourcesSection($rootNode);
@@ -95,7 +100,8 @@ private function addModelsSection(ArrayNodeDefinition $node): void
->end()
->end()
- ->end();
+ ->end()
+ ;
}
private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
@@ -126,6 +132,7 @@ private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/DependencyInjection/CoreShopProductQuantityPriceRulesExtension.php b/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/DependencyInjection/CoreShopProductQuantityPriceRulesExtension.php
index 45c6062cff..da2612cf15 100644
--- a/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/DependencyInjection/CoreShopProductQuantityPriceRulesExtension.php
+++ b/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/DependencyInjection/CoreShopProductQuantityPriceRulesExtension.php
@@ -1,17 +1,21 @@
registerForAutoconfiguration(ProductQuantityPriceRuleActionInterface::class)
- ->addTag(ProductQuantityPriceRulesActionPass::PRODUCT_QUANTITY_PRICE_RULE_ACTION_TAG);
+ ->addTag(ProductQuantityPriceRulesActionPass::PRODUCT_QUANTITY_PRICE_RULE_ACTION_TAG)
+ ;
$container
->registerForAutoconfiguration(CalculatorInterface::class)
- ->addTag(ProductQuantityPriceRulesCalculatorPass::PRODUCT_QUANTITY_PRICE_RULE_CALCULATOR_TAG);
+ ->addTag(ProductQuantityPriceRulesCalculatorPass::PRODUCT_QUANTITY_PRICE_RULE_CALCULATOR_TAG)
+ ;
$container
->registerForAutoconfiguration(QuantityRuleConditionCheckerInterface::class)
- ->addTag(ProductQuantityPriceRulesConditionPass::PRODUCT_QUANTITY_PRICE_RULE_CONDITION_TAG);
+ ->addTag(ProductQuantityPriceRulesConditionPass::PRODUCT_QUANTITY_PRICE_RULE_CONDITION_TAG)
+ ;
}
}
diff --git a/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Doctrine/ORM/ProductQuantityPriceRuleRepository.php b/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Doctrine/ORM/ProductQuantityPriceRuleRepository.php
index d10e588905..91c5a85382 100644
--- a/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Doctrine/ORM/ProductQuantityPriceRuleRepository.php
+++ b/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Doctrine/ORM/ProductQuantityPriceRuleRepository.php
@@ -1,17 +1,21 @@
createQueryBuilder('o')
->andWhere('o.active = 1')
->getQuery()
- ->getResult();
+ ->getResult()
+ ;
}
public function findForProduct(QuantityRangePriceAwareInterface $product): array
@@ -34,7 +39,8 @@ public function findForProduct(QuantityRangePriceAwareInterface $product): array
->andWhere('o.product = :productId')
->setParameter('productId', $product->getId())
->getQuery()
- ->getResult();
+ ->getResult()
+ ;
}
public function findWithConditionOfType($conditionType): array
@@ -44,7 +50,8 @@ public function findWithConditionOfType($conditionType): array
->andWhere('condition.type = :conditionType')
->setParameter('conditionType', $conditionType)
->getQuery()
- ->getResult();
+ ->getResult()
+ ;
}
public function findWithActionOfType($actionType): array
diff --git a/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Event/ProductQuantityPriceRuleValidationEvent.php b/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Event/ProductQuantityPriceRuleValidationEvent.php
index 0270b541b8..7e70a4d614 100644
--- a/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Event/ProductQuantityPriceRuleValidationEvent.php
+++ b/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Event/ProductQuantityPriceRuleValidationEvent.php
@@ -1,17 +1,21 @@
object = $object;
diff --git a/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Form/Type/ProductQuantityPriceRuleConditionChoiceType.php b/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Form/Type/ProductQuantityPriceRuleConditionChoiceType.php
index 89dcc6d644..3290ebba45 100644
--- a/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Form/Type/ProductQuantityPriceRuleConditionChoiceType.php
+++ b/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Form/Type/ProductQuantityPriceRuleConditionChoiceType.php
@@ -1,17 +1,21 @@
[
'data-form-collection' => 'update',
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Form/Type/ProductQuantityPriceRuleType.php b/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Form/Type/ProductQuantityPriceRuleType.php
index 235a555aa5..b1f578bfee 100644
--- a/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Form/Type/ProductQuantityPriceRuleType.php
+++ b/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Form/Type/ProductQuantityPriceRuleType.php
@@ -1,17 +1,21 @@
add('active', CheckboxType::class)
->add('priority', NumberType::class)
->add('conditions', ProductQuantityPriceRuleConditionCollectionType::class)
- ->add('ranges', ProductQuantityRangeCollectionType::class);
+ ->add('ranges', ProductQuantityRangeCollectionType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Form/Type/ProductQuantityRangeCollectionType.php b/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Form/Type/ProductQuantityRangeCollectionType.php
index 456eafe77e..2cae63c421 100644
--- a/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Form/Type/ProductQuantityRangeCollectionType.php
+++ b/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Form/Type/ProductQuantityRangeCollectionType.php
@@ -1,17 +1,21 @@
add('pricingBehaviour', ChoiceType::class, [
'choices' => $this->actionTypes,
])
- ->add('highlighted', CheckboxType::class, []);
+ ->add('highlighted', CheckboxType::class, [])
+ ;
}
public function configureOptions(OptionsResolver $resolver): void
diff --git a/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Form/Type/Rule/Condition/ProductQuantityPriceRuleNestedConfigurationType.php b/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Form/Type/Rule/Condition/ProductQuantityPriceRuleNestedConfigurationType.php
index 2c7c1b96f2..741ad332f2 100644
--- a/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Form/Type/Rule/Condition/ProductQuantityPriceRuleNestedConfigurationType.php
+++ b/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Form/Type/Rule/Condition/ProductQuantityPriceRuleNestedConfigurationType.php
@@ -1,17 +1,21 @@
add('conditions', ProductQuantityPriceRuleConditionCollectionType::class, ['nested' => true]);
+ ->add('conditions', ProductQuantityPriceRuleConditionCollectionType::class, ['nested' => true])
+ ;
$builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
$data = $event->getData();
diff --git a/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Form/Type/Rule/Condition/TimespanConfigurationType.php b/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Form/Type/Rule/Condition/TimespanConfigurationType.php
index 4384139a6a..0268794485 100644
--- a/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Form/Type/Rule/Condition/TimespanConfigurationType.php
+++ b/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Form/Type/Rule/Condition/TimespanConfigurationType.php
@@ -1,17 +1,21 @@
add('dateFrom', NumberType::class)
- ->add('dateTo', NumberType::class);
+ ->add('dateTo', NumberType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Resources/public/pimcore/css/product-quanity-price-rules.css b/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Resources/public/pimcore/css/product-quanity-price-rules.css
index 82c09264b5..8ab4f3dde3 100644
--- a/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Resources/public/pimcore/css/product-quanity-price-rules.css
+++ b/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Resources/public/pimcore/css/product-quanity-price-rules.css
@@ -1,12 +1,15 @@
-/**
- * CoreShop.
+/*
+ * CoreShop
*
- * This source file is subject to the GNU General Public License version 3 (GPLv3)
- * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
- * files that are distributed with this source code.
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
* @license https://www.coreshop.org/license GPLv3 and CCL
+ *
*/
.coreshop_icon_product_quantity_price_rules, .pimcore_icon_coreShopProductQuantityPriceRules {
diff --git a/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Twig/ProductQuantityPriceRuleRangesExtension.php b/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Twig/ProductQuantityPriceRuleRangesExtension.php
index 9715fccfea..e21a7e9d14 100644
--- a/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Twig/ProductQuantityPriceRuleRangesExtension.php
+++ b/src/CoreShop/Bundle/ProductQuantityPriceRulesBundle/Twig/ProductQuantityPriceRuleRangesExtension.php
@@ -1,17 +1,21 @@
addCompilerPass($compilerPassClassName::$compilerPassMethod(
[$this->getConfigFilesPath() => $this->getModelNamespace()],
[$this->getObjectManagerParameter()],
- sprintf('%s.driver.%s', $this->getBundlePrefix(), $driver)
+ sprintf('%s.driver.%s', $this->getBundlePrefix(), $driver),
));
break;
@@ -57,7 +61,7 @@ public function build(ContainerBuilder $container): void
[$this->getModelNamespace()],
[$this->getConfigFilesPath()],
[sprintf('%s.object_manager', $this->getBundlePrefix())],
- sprintf('%s.driver.%s', $this->getBundlePrefix(), $driver)
+ sprintf('%s.driver.%s', $this->getBundlePrefix(), $driver),
));
break;
@@ -136,7 +140,7 @@ protected function getConfigFilesPath(): string
return sprintf(
'%s/Resources/config/doctrine/%s',
$this->getPath(),
- strtolower($this->getDoctrineMappingDirectory())
+ strtolower($this->getDoctrineMappingDirectory()),
);
}
diff --git a/src/CoreShop/Bundle/ResourceBundle/Command/CreateDatabaseTablesCommand.php b/src/CoreShop/Bundle/ResourceBundle/Command/CreateDatabaseTablesCommand.php
index 2829e3b01e..2e0ab51265 100644
--- a/src/CoreShop/Bundle/ResourceBundle/Command/CreateDatabaseTablesCommand.php
+++ b/src/CoreShop/Bundle/ResourceBundle/Command/CreateDatabaseTablesCommand.php
@@ -1,17 +1,21 @@
addArgument(
'application-name',
- InputArgument::REQUIRED
+ InputArgument::REQUIRED,
)
->addOption(
'dump-sql',
null,
InputOption::VALUE_NONE,
- 'Dumps the generated SQL statements to the screen (does not execute them).'
+ 'Dumps the generated SQL statements to the screen (does not execute them).',
)
->addOption(
'force',
'f',
InputOption::VALUE_NONE,
- 'Causes the generated SQL statements to be physically executed against your database.'
- );
+ 'Causes the generated SQL statements to be physically executed against your database.',
+ )
+ ;
}
protected function execute(InputInterface $input, OutputInterface $output): int
diff --git a/src/CoreShop/Bundle/ResourceBundle/Command/DropDatabaseTablesCommand.php b/src/CoreShop/Bundle/ResourceBundle/Command/DropDatabaseTablesCommand.php
index 949cee6d60..8278782024 100644
--- a/src/CoreShop/Bundle/ResourceBundle/Command/DropDatabaseTablesCommand.php
+++ b/src/CoreShop/Bundle/ResourceBundle/Command/DropDatabaseTablesCommand.php
@@ -1,17 +1,21 @@
addArgument(
'application-name',
- InputArgument::REQUIRED
+ InputArgument::REQUIRED,
)
->addOption(
'dump-sql',
null,
InputOption::VALUE_NONE,
- 'Dumps the generated SQL statements to the screen (does not execute them).'
+ 'Dumps the generated SQL statements to the screen (does not execute them).',
)
->addOption(
'force',
'f',
InputOption::VALUE_NONE,
- 'Causes the generated SQL statements to be physically executed against your database.'
- );
+ 'Causes the generated SQL statements to be physically executed against your database.',
+ )
+ ;
}
protected function execute(InputInterface $input, OutputInterface $output): int
diff --git a/src/CoreShop/Bundle/ResourceBundle/Command/InstallResourcesCommand.php b/src/CoreShop/Bundle/ResourceBundle/Command/InstallResourcesCommand.php
index 95a7a3daf4..0a9a77c466 100644
--- a/src/CoreShop/Bundle/ResourceBundle/Command/InstallResourcesCommand.php
+++ b/src/CoreShop/Bundle/ResourceBundle/Command/InstallResourcesCommand.php
@@ -1,17 +1,21 @@
writeln(sprintf(
'Install Resources for Environment %s.',
- $kernel->getEnvironment()
+ $kernel->getEnvironment(),
));
$this->resourceInstaller->installResources($output, $input->getOption('application-name'));
diff --git a/src/CoreShop/Bundle/ResourceBundle/ComposerPackageBundleInterface.php b/src/CoreShop/Bundle/ResourceBundle/ComposerPackageBundleInterface.php
index 6ab056428d..67d36a2f7e 100644
--- a/src/CoreShop/Bundle/ResourceBundle/ComposerPackageBundleInterface.php
+++ b/src/CoreShop/Bundle/ResourceBundle/ComposerPackageBundleInterface.php
@@ -1,17 +1,21 @@
eventDispatcher->dispatch(
$event,
- sprintf('%s.%s.%s', $metadata->getApplicationName(), $metadata->getName(), $eventName)
+ sprintf('%s.%s.%s', $metadata->getApplicationName(), $metadata->getName(), $eventName),
);
}
@@ -42,7 +46,7 @@ public function dispatchPreEvent($eventName, MetadataInterface $metadata, Resour
$this->eventDispatcher->dispatch(
$event,
- sprintf('%s.%s.pre_%s', $metadata->getApplicationName(), $metadata->getName(), $eventName)
+ sprintf('%s.%s.pre_%s', $metadata->getApplicationName(), $metadata->getName(), $eventName),
);
}
@@ -52,7 +56,7 @@ public function dispatchPostEvent($eventName, MetadataInterface $metadata, Resou
$this->eventDispatcher->dispatch(
$event,
- sprintf('%s.%s.post_%s', $metadata->getApplicationName(), $metadata->getName(), $eventName)
+ sprintf('%s.%s.post_%s', $metadata->getApplicationName(), $metadata->getName(), $eventName),
);
}
@@ -62,7 +66,7 @@ public function dispatchInitializeEvent($eventName, MetadataInterface $metadata,
$this->eventDispatcher->dispatch(
$event,
- sprintf('%s.%s.initialize_%s', $metadata->getApplicationName(), $metadata->getName(), $eventName)
+ sprintf('%s.%s.initialize_%s', $metadata->getApplicationName(), $metadata->getName(), $eventName),
);
}
diff --git a/src/CoreShop/Bundle/ResourceBundle/Controller/EventDispatcherInterface.php b/src/CoreShop/Bundle/ResourceBundle/Controller/EventDispatcherInterface.php
index 3d5c57265f..34e8cf40b2 100644
--- a/src/CoreShop/Bundle/ResourceBundle/Controller/EventDispatcherInterface.php
+++ b/src/CoreShop/Bundle/ResourceBundle/Controller/EventDispatcherInterface.php
@@ -1,17 +1,21 @@
getPermission()) {
/**
* @var User $user
+ *
* @psalm-var User $user
*/
$user = method_exists($this, 'getAdminUser') ? $this->getAdminUser() : $this->getUser();
diff --git a/src/CoreShop/Bundle/ResourceBundle/Controller/ResourceController.php b/src/CoreShop/Bundle/ResourceBundle/Controller/ResourceController.php
index 6bdab4b261..30370ea24b 100644
--- a/src/CoreShop/Bundle/ResourceBundle/Controller/ResourceController.php
+++ b/src/CoreShop/Bundle/ResourceBundle/Controller/ResourceController.php
@@ -1,17 +1,21 @@
getAdminUser() : $this->getUser();
@@ -76,7 +81,7 @@ public function getAction(Request $request): JsonResponse
{
$this->isGrantedOr403();
- $resources = $this->findOr404((int)$this->getParameterFromRequest($request, 'id'));
+ $resources = $this->findOr404((int) $this->getParameterFromRequest($request, 'id'));
return $this->viewHandler->handle(['data' => $resources, 'success' => true], ['group' => 'Detailed']);
}
diff --git a/src/CoreShop/Bundle/ResourceBundle/Controller/ResourceFormFactory.php b/src/CoreShop/Bundle/ResourceBundle/Controller/ResourceFormFactory.php
index 77f5cc66dc..0b60db18d9 100644
--- a/src/CoreShop/Bundle/ResourceBundle/Controller/ResourceFormFactory.php
+++ b/src/CoreShop/Bundle/ResourceBundle/Controller/ResourceFormFactory.php
@@ -1,17 +1,21 @@
nameProperty,
- $resource::class
- )
+ $resource::class,
+ ),
);
}
diff --git a/src/CoreShop/Bundle/ResourceBundle/CoreExtension/Multiselect.php b/src/CoreShop/Bundle/ResourceBundle/CoreExtension/Multiselect.php
index 4959b28cec..fac5edc07d 100644
--- a/src/CoreShop/Bundle/ResourceBundle/CoreExtension/Multiselect.php
+++ b/src/CoreShop/Bundle/ResourceBundle/CoreExtension/Multiselect.php
@@ -1,17 +1,21 @@
getDataFromResource($data, $object, $params);
}
}
@@ -178,7 +182,7 @@ public function getDataForResource($data, $object = null, $params = [])
*/
public function getDataFromResource($data, $object = null, $params = [])
{
- if ((int)$data > 0) {
+ if ((int) $data > 0) {
return $this->getRepository()->find($data);
}
diff --git a/src/CoreShop/Bundle/ResourceBundle/CoreExtension/TempEntityManagerTrait.php b/src/CoreShop/Bundle/ResourceBundle/CoreExtension/TempEntityManagerTrait.php
index 9e551eb66a..cf20b30202 100644
--- a/src/CoreShop/Bundle/ResourceBundle/CoreExtension/TempEntityManagerTrait.php
+++ b/src/CoreShop/Bundle/ResourceBundle/CoreExtension/TempEntityManagerTrait.php
@@ -1,17 +1,21 @@
repository = $repository;
diff --git a/src/CoreShop/Bundle/ResourceBundle/DataHub/QueryType/Select.php b/src/CoreShop/Bundle/ResourceBundle/DataHub/QueryType/Select.php
index 912fb16561..409418fc5f 100644
--- a/src/CoreShop/Bundle/ResourceBundle/DataHub/QueryType/Select.php
+++ b/src/CoreShop/Bundle/ResourceBundle/DataHub/QueryType/Select.php
@@ -1,17 +1,21 @@
$this->getFieldType($fieldDefinition, $class, $container),
'resolve' => $this->getResolver($attribute, $fieldDefinition, $class),
],
- $container
+ $container,
);
}
diff --git a/src/CoreShop/Bundle/ResourceBundle/DataHub/Resolver/MultiResourceResolver.php b/src/CoreShop/Bundle/ResourceBundle/DataHub/Resolver/MultiResourceResolver.php
index 46c9005fb9..9555b1636c 100644
--- a/src/CoreShop/Bundle/ResourceBundle/DataHub/Resolver/MultiResourceResolver.php
+++ b/src/CoreShop/Bundle/ResourceBundle/DataHub/Resolver/MultiResourceResolver.php
@@ -1,17 +1,21 @@
getClass('model'),
new Reference($id),
- ]
+ ],
);
}
}
diff --git a/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Compiler/RegisterPimcoreResourcesPass.php b/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Compiler/RegisterPimcoreResourcesPass.php
index d6601a7acb..51498fe89c 100644
--- a/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Compiler/RegisterPimcoreResourcesPass.php
+++ b/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Compiler/RegisterPimcoreResourcesPass.php
@@ -1,17 +1,21 @@
setFactory([Metadata::class, 'fromAliasAndConfiguration'])
- ->setArguments([$alias, ['driver' => CoreShopResourceBundle::DRIVER_PIMCORE]]);
+ ->setArguments([$alias, ['driver' => CoreShopResourceBundle::DRIVER_PIMCORE]])
+ ;
$repositoryDefinition = new Definition(StackRepository::class);
$repositoryDefinition->setArguments([
@@ -58,7 +63,8 @@ public function process(ContainerBuilder $container): void
]);
$container->setDefinition(sprintf('%s.repository.stack.%s', $applicationName, $name), $repositoryDefinition)
- ->setPublic(true);
+ ->setPublic(true)
+ ;
}
}
}
diff --git a/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Compiler/ValidatorAutoMappingFixPass.php b/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Compiler/ValidatorAutoMappingFixPass.php
index e13ddc17b8..f05946a88e 100644
--- a/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Compiler/ValidatorAutoMappingFixPass.php
+++ b/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Compiler/ValidatorAutoMappingFixPass.php
@@ -1,17 +1,21 @@
end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
private function addTranslationsSection(ArrayNodeDefinition $node): void
@@ -120,7 +125,8 @@ private function addTranslationsSection(ArrayNodeDefinition $node): void
->children()
->scalarNode('locale_provider')->defaultValue(TranslationLocaleProviderInterface::class)->cannotBeEmpty()->end()
->end()
- ->end();
+ ->end()
+ ;
}
private function addDriversSection(ArrayNodeDefinition $node): void
@@ -131,7 +137,8 @@ private function addDriversSection(ArrayNodeDefinition $node): void
->defaultValue([CoreShopResourceBundle::DRIVER_DOCTRINE_ORM])
->enumPrototype()->values(CoreShopResourceBundle::getAvailableDrivers())->end()
->end()
- ->end();
+ ->end()
+ ;
}
private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
@@ -158,6 +165,7 @@ private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/CoreShopResourceExtension.php b/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/CoreShopResourceExtension.php
index 10379f703a..40417cde3e 100644
--- a/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/CoreShopResourceExtension.php
+++ b/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/CoreShopResourceExtension.php
@@ -1,24 +1,27 @@
loadResources($configs['resources'], $container);
$this->loadPimcoreModels($configs['pimcore'], $container);
-
$bodyListener = new Definition(BodyListener::class);
$bodyListener->addTag('kernel.event_listener', [
'event' => 'kernel.request',
@@ -78,7 +80,8 @@ public function load(array $configs, ContainerBuilder $container): void
$container
->registerForAutoconfiguration(ResourceInstallerInterface::class)
- ->addTag(RegisterInstallersPass::INSTALLER_TAG);
+ ->addTag(RegisterInstallersPass::INSTALLER_TAG)
+ ;
}
private function loadPersistence(array $drivers, array $resources, LoaderInterface $loader): void
@@ -88,7 +91,7 @@ private function loadPersistence(array $drivers, array $resources, LoaderInterfa
throw new InvalidArgumentException(sprintf(
'Resource "%s" uses driver "%s", but this driver has not been enabled.',
$alias,
- $resource['driver']
+ $resource['driver'],
));
}
}
@@ -135,17 +138,17 @@ protected function loadPimcoreModels(array $models, ContainerBuilder $container)
CoreShopResourceBundle::PIMCORE_MODEL_TYPE_FIELD_COLLECTION => str_replace(
'Pimcore\Model\DataObject\Fieldcollection\Data\\',
'',
- $resourceConfig['classes']['model']
+ $resourceConfig['classes']['model'],
),
CoreShopResourceBundle::PIMCORE_MODEL_TYPE_BRICK => str_replace(
'Pimcore\Model\DataObject\Objectbrick\Data\\',
'',
- $resourceConfig['classes']['model']
+ $resourceConfig['classes']['model'],
),
default => str_replace(
'Pimcore\Model\DataObject\\',
'',
- $resourceConfig['classes']['model']
+ $resourceConfig['classes']['model'],
),
};
diff --git a/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Driver/AbstractDriver.php b/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Driver/AbstractDriver.php
index 12c5e83a24..9947c8b8f6 100644
--- a/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Driver/AbstractDriver.php
+++ b/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Driver/AbstractDriver.php
@@ -1,17 +1,21 @@
addMethodCall('setContainer', [new Reference('service_container')]);
+ ->addMethodCall('setContainer', [new Reference('service_container')])
+ ;
$container->setDefinition($metadata->getServiceId('admin_controller'), $definition);
}
@@ -109,7 +114,7 @@ protected function addFactory(ContainerBuilder $container, MetadataInterface $me
$container->registerAliasForArgument(
$metadata->getServiceId('factory'),
$typehintClass,
- $metadata->getHumanizedName() . ' factory'
+ $metadata->getHumanizedName() . ' factory',
);
}
}
@@ -120,7 +125,8 @@ protected function getMetadataDefinition(MetadataInterface $metadata): Definitio
$definition = new Definition(Metadata::class);
$definition
->setFactory([new Reference(RegistryInterface::class), 'get'])
- ->setArguments([$metadata->getAlias()]);
+ ->setArguments([$metadata->getAlias()])
+ ;
return $definition;
}
diff --git a/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Driver/Doctrine/AbstractDoctrineDriver.php b/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Driver/Doctrine/AbstractDoctrineDriver.php
index 0551c9df6d..c628007d4b 100644
--- a/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Driver/Doctrine/AbstractDoctrineDriver.php
+++ b/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Driver/Doctrine/AbstractDoctrineDriver.php
@@ -1,17 +1,21 @@
setFactory([new Reference($this->getManagerServiceId($metadata)), 'getClassMetadata'])
->setArguments([$metadata->getClass('model')])
- ->setPublic(false);
+ ->setPublic(false)
+ ;
return $definition;
}
@@ -42,14 +47,14 @@ protected function addManager(ContainerBuilder $container, MetadataInterface $me
$container->setAlias(
$metadata->getServiceId('manager'),
- $alias
+ $alias,
);
if (method_exists($container, 'registerAliasForArgument')) {
$container->registerAliasForArgument(
$metadata->getServiceId('manager'),
ObjectManager::class,
- $metadata->getHumanizedName() . ' manager'
+ $metadata->getHumanizedName() . ' manager',
);
}
}
diff --git a/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Driver/Doctrine/DoctrineORMDriver.php b/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Driver/Doctrine/DoctrineORMDriver.php
index 325f766ec5..377b7f5737 100644
--- a/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Driver/Doctrine/DoctrineORMDriver.php
+++ b/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Driver/Doctrine/DoctrineORMDriver.php
@@ -1,17 +1,21 @@
registerAliasForArgument(
$metadata->getServiceId('repository'),
$typehintClass,
- $metadata->getHumanizedName() . ' repository'
+ $metadata->getHumanizedName() . ' repository',
);
}
}
@@ -102,7 +106,7 @@ protected function addRepositoryFactory(ContainerBuilder $container, MetadataInt
$container->registerAliasForArgument(
$metadata->getServiceId('repository.factory'),
$typehintClass,
- $metadata->getHumanizedName() . ' repository factory'
+ $metadata->getHumanizedName() . ' repository factory',
);
}
}
@@ -116,7 +120,7 @@ protected function addManager(ContainerBuilder $container, MetadataInterface $me
$container->registerAliasForArgument(
$metadata->getServiceId('manager'),
EntityManagerInterface::class,
- $metadata->getHumanizedName() . ' manager'
+ $metadata->getHumanizedName() . ' manager',
);
}
}
diff --git a/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Driver/DriverInterface.php b/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Driver/DriverInterface.php
index 87d10f308a..2db28ae1f0 100644
--- a/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Driver/DriverInterface.php
+++ b/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Driver/DriverInterface.php
@@ -1,17 +1,21 @@
registerAliasForArgument(
$metadata->getServiceId('repository'),
$typehintClass,
- $metadata->getHumanizedName() . ' repository'
+ $metadata->getHumanizedName() . ' repository',
);
}
}
@@ -205,7 +209,7 @@ protected function addRepositoryFactory(ContainerBuilder $container, MetadataInt
$container->registerAliasForArgument(
$metadata->getServiceId('repository.factory'),
$typehintClass,
- $metadata->getHumanizedName() . ' repository factory'
+ $metadata->getHumanizedName() . ' repository factory',
);
}
}
@@ -218,14 +222,14 @@ protected function addManager(ContainerBuilder $container, MetadataInterface $me
$container->setAlias(
$metadata->getServiceId('manager'),
- $alias
+ $alias,
);
if (method_exists($container, 'registerAliasForArgument')) {
$container->registerAliasForArgument(
$metadata->getServiceId('manager'),
ObjectManager::class,
- $metadata->getHumanizedName() . ' manager'
+ $metadata->getHumanizedName() . ' manager',
);
}
}
diff --git a/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Extension/AbstractModelExtension.php b/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Extension/AbstractModelExtension.php
index 6ce14e8fc3..0de35ff40f 100644
--- a/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Extension/AbstractModelExtension.php
+++ b/src/CoreShop/Bundle/ResourceBundle/DependencyInjection/Extension/AbstractModelExtension.php
@@ -1,17 +1,21 @@
str_replace(
'Pimcore\Model\DataObject\Fieldcollection\Data\\',
'',
- $modelConfig['classes']['model']
+ $modelConfig['classes']['model'],
),
CoreShopResourceBundle::PIMCORE_MODEL_TYPE_BRICK => str_replace(
'Pimcore\Model\DataObject\Objectbrick\Data\\',
'',
- $modelConfig['classes']['model']
+ $modelConfig['classes']['model'],
),
default => str_replace(
'Pimcore\Model\DataObject\\',
'',
- $modelConfig['classes']['model']
+ $modelConfig['classes']['model'],
),
};
diff --git a/src/CoreShop/Bundle/ResourceBundle/Doctrine/ORM/EntityMerger.php b/src/CoreShop/Bundle/ResourceBundle/Doctrine/ORM/EntityMerger.php
index dc5314b530..244e73c37c 100644
--- a/src/CoreShop/Bundle/ResourceBundle/Doctrine/ORM/EntityMerger.php
+++ b/src/CoreShop/Bundle/ResourceBundle/Doctrine/ORM/EntityMerger.php
@@ -1,17 +1,21 @@
em,
$class,
- $origDataCollection
+ $origDataCollection,
);
$newCollection->setOwner($entity, $assoc);
$newCollection->takeSnapshot();
@@ -193,8 +196,7 @@ private function checkAssociations($entity, $managedCopy, array &$visited): void
if ($managedCopy) {
$snapshotEntries[] = $managedCopy;
- }
- else {
+ } else {
$snapshotEntries[] = $snapshotEntry;
}
}
diff --git a/src/CoreShop/Bundle/ResourceBundle/Doctrine/ORM/EntityRepository.php b/src/CoreShop/Bundle/ResourceBundle/Doctrine/ORM/EntityRepository.php
index 6ab7c91e97..7a019d2cda 100644
--- a/src/CoreShop/Bundle/ResourceBundle/Doctrine/ORM/EntityRepository.php
+++ b/src/CoreShop/Bundle/ResourceBundle/Doctrine/ORM/EntityRepository.php
@@ -1,17 +1,21 @@
createQueryBuilder('o')
->getQuery()
- ->getResult();
+ ->getResult()
+ ;
}
protected function getPropertyName(string $name): string
diff --git a/src/CoreShop/Bundle/ResourceBundle/Doctrine/ResourceMappingDriverChain.php b/src/CoreShop/Bundle/ResourceBundle/Doctrine/ResourceMappingDriverChain.php
index c459d6c70a..0ba81ab37d 100644
--- a/src/CoreShop/Bundle/ResourceBundle/Doctrine/ResourceMappingDriverChain.php
+++ b/src/CoreShop/Bundle/ResourceBundle/Doctrine/ResourceMappingDriverChain.php
@@ -1,17 +1,21 @@
setDefaultDriver($mappingDriver);
}
diff --git a/src/CoreShop/Bundle/ResourceBundle/Event/ResourceControllerEvent.php b/src/CoreShop/Bundle/ResourceBundle/Event/ResourceControllerEvent.php
index f239d7be8f..28a0fb6e34 100644
--- a/src/CoreShop/Bundle/ResourceBundle/Event/ResourceControllerEvent.php
+++ b/src/CoreShop/Bundle/ResourceBundle/Event/ResourceControllerEvent.php
@@ -1,17 +1,21 @@
getArgument('copier');
$copier->addFilter(
new DoctrineCollectionFilter(),
- new PropertyTypeMatcher('Doctrine\Common\Collections\Collection')
+ new PropertyTypeMatcher('Doctrine\Common\Collections\Collection'),
);
$event->setArgument('copier', $copier);
}
diff --git a/src/CoreShop/Bundle/ResourceBundle/EventListener/ORMMappedSuperClassSubscriber.php b/src/CoreShop/Bundle/ResourceBundle/EventListener/ORMMappedSuperClassSubscriber.php
index 9d7f193e87..cbd5c06ac9 100644
--- a/src/CoreShop/Bundle/ResourceBundle/EventListener/ORMMappedSuperClassSubscriber.php
+++ b/src/CoreShop/Bundle/ResourceBundle/EventListener/ORMMappedSuperClassSubscriber.php
@@ -1,17 +1,21 @@
getNamingStrategy()
+ $configuration->getNamingStrategy(),
);
// Wakeup Reflection
@@ -107,7 +111,7 @@ private function isRelation(int $type): bool
ClassMetadataInfo::ONE_TO_MANY,
ClassMetadataInfo::ONE_TO_ONE,
],
- true
+ true,
);
}
}
diff --git a/src/CoreShop/Bundle/ResourceBundle/EventListener/ORMRepositoryClassSubscriber.php b/src/CoreShop/Bundle/ResourceBundle/EventListener/ORMRepositoryClassSubscriber.php
index 850b0763fa..69e3a2bb87 100644
--- a/src/CoreShop/Bundle/ResourceBundle/EventListener/ORMRepositoryClassSubscriber.php
+++ b/src/CoreShop/Bundle/ResourceBundle/EventListener/ORMRepositoryClassSubscriber.php
@@ -1,17 +1,21 @@
addError(new FormError(
call_user_func($form->getConfig()->getOption('upload_max_size_message')),
null,
- ['{{ max }}' => $this->serverParams->getNormalizedIniPostMaxSize()]
+ ['{{ max }}' => $this->serverParams->getNormalizedIniPostMaxSize()],
));
return;
diff --git a/src/CoreShop/Bundle/ResourceBundle/Form/Helper/ErrorSerializer.php b/src/CoreShop/Bundle/ResourceBundle/Form/Helper/ErrorSerializer.php
index c56134cdc7..9756701769 100644
--- a/src/CoreShop/Bundle/ResourceBundle/Form/Helper/ErrorSerializer.php
+++ b/src/CoreShop/Bundle/ResourceBundle/Form/Helper/ErrorSerializer.php
@@ -1,17 +1,21 @@
end()
->end()
->end()
- ->end();
+ ->end()
+ ;
return $treeBuilder;
}
diff --git a/src/CoreShop/Bundle/ResourceBundle/Installer/Configuration/GridConfigConfiguration.php b/src/CoreShop/Bundle/ResourceBundle/Installer/Configuration/GridConfigConfiguration.php
index 70ee81ea9d..b2bbe59ca2 100644
--- a/src/CoreShop/Bundle/ResourceBundle/Installer/Configuration/GridConfigConfiguration.php
+++ b/src/CoreShop/Bundle/ResourceBundle/Installer/Configuration/GridConfigConfiguration.php
@@ -1,17 +1,21 @@
end()
->end()
->end()
- ->end();
+ ->end()
+ ;
return $treeBuilder;
}
diff --git a/src/CoreShop/Bundle/ResourceBundle/Installer/Configuration/ImageThumbnailConfiguration.php b/src/CoreShop/Bundle/ResourceBundle/Installer/Configuration/ImageThumbnailConfiguration.php
index b5baa82ea5..dff99a687c 100644
--- a/src/CoreShop/Bundle/ResourceBundle/Installer/Configuration/ImageThumbnailConfiguration.php
+++ b/src/CoreShop/Bundle/ResourceBundle/Installer/Configuration/ImageThumbnailConfiguration.php
@@ -1,17 +1,21 @@
end()
->end()
->end()
- ->end();
+ ->end()
+ ;
return $treeBuilder;
}
diff --git a/src/CoreShop/Bundle/ResourceBundle/Installer/Configuration/RouteConfiguration.php b/src/CoreShop/Bundle/ResourceBundle/Installer/Configuration/RouteConfiguration.php
index d6316ac171..b0f9c82e0e 100644
--- a/src/CoreShop/Bundle/ResourceBundle/Installer/Configuration/RouteConfiguration.php
+++ b/src/CoreShop/Bundle/ResourceBundle/Installer/Configuration/RouteConfiguration.php
@@ -1,17 +1,21 @@
end()
->end()
->end()
- ->end();
+ ->end()
+ ;
return $treeBuilder;
}
diff --git a/src/CoreShop/Bundle/ResourceBundle/Installer/Configuration/TranslationConfiguration.php b/src/CoreShop/Bundle/ResourceBundle/Installer/Configuration/TranslationConfiguration.php
index 27e1dcbdcf..885c2dc628 100644
--- a/src/CoreShop/Bundle/ResourceBundle/Installer/Configuration/TranslationConfiguration.php
+++ b/src/CoreShop/Bundle/ResourceBundle/Installer/Configuration/TranslationConfiguration.php
@@ -1,17 +1,21 @@
end()
->end()
->end()
- ->end();
+ ->end()
+ ;
return $treeBuilder;
}
diff --git a/src/CoreShop/Bundle/ResourceBundle/Installer/PimcoreClassInstaller.php b/src/CoreShop/Bundle/ResourceBundle/Installer/PimcoreClassInstaller.php
index 9bb3d7b1b7..cc552f7edf 100644
--- a/src/CoreShop/Bundle/ResourceBundle/Installer/PimcoreClassInstaller.php
+++ b/src/CoreShop/Bundle/ResourceBundle/Installer/PimcoreClassInstaller.php
@@ -1,17 +1,21 @@
kernel->getContainer()->hasParameter($parameter)) {
@@ -61,7 +65,7 @@ public function installResources(OutputInterface $output, string $applicationNam
$documents = Yaml::parse(file_get_contents($file));
$documents = $processor->processConfiguration(
$configurationDefinition,
- ['documents' => $documents]
+ ['documents' => $documents],
);
$documents = $documents['documents'];
@@ -94,7 +98,7 @@ public function installResources(OutputInterface $output, string $applicationNam
foreach ($docsToInstall as $docData) {
$progress->setMessage(
- sprintf('Install Document %s/%s', $docData['path'], $docData['key'])
+ sprintf('Install Document %s/%s', $docData['path'], $docData['key']),
);
foreach ($validLanguages as $language) {
@@ -115,7 +119,7 @@ public function installResources(OutputInterface $output, string $applicationNam
foreach ($languagesDone as $doneLanguage) {
$translatedDocument = Document::getByPath(
$rootDocument->getRealFullPath(
- ) . '/' . $doneLanguage . '/' . $docData['path'] . '/' . $docData['key']
+ ) . '/' . $doneLanguage . '/' . $docData['path'] . '/' . $docData['key'],
);
if ($translatedDocument) {
@@ -149,11 +153,12 @@ private function installDocument(Document $rootDocument, string $language, array
if (\Pimcore\Tool::classExists($class)) {
/**
* @var Document $document
+ *
* @psalm-var class-string $class
*/
$document = new $class();
$document->setParent(
- Document::getByPath($rootDocument->getRealFullPath() . '/' . $language . '/' . $properties['path'])
+ Document::getByPath($rootDocument->getRealFullPath() . '/' . $language . '/' . $properties['path']),
);
$document->setKey(Service::getValidKey($properties['key'], 'document'));
diff --git a/src/CoreShop/Bundle/ResourceBundle/Installer/PimcoreGridConfigInstaller.php b/src/CoreShop/Bundle/ResourceBundle/Installer/PimcoreGridConfigInstaller.php
index 762ee14d92..06763294eb 100644
--- a/src/CoreShop/Bundle/ResourceBundle/Installer/PimcoreGridConfigInstaller.php
+++ b/src/CoreShop/Bundle/ResourceBundle/Installer/PimcoreGridConfigInstaller.php
@@ -1,17 +1,21 @@
setObjectVar(
$fd->getName(),
- $fd->marshalForCache($data, $data->getObjectVar($fd->getName()))
+ $fd->marshalForCache($data, $data->getObjectVar($fd->getName())),
);
}
}
@@ -75,7 +75,7 @@ public function unmarshall(string $value)
$data->setObjectVar(
$fd->getName(),
- $fd->unmarshalForCache($data, $data->getObjectVar($fd->getName()))
+ $fd->unmarshalForCache($data, $data->getObjectVar($fd->getName())),
);
}
}
diff --git a/src/CoreShop/Bundle/ResourceBundle/Pimcore/ObjectManager.php b/src/CoreShop/Bundle/ResourceBundle/Pimcore/ObjectManager.php
index 43f25fa4f4..8e81c73eea 100644
--- a/src/CoreShop/Bundle/ResourceBundle/Pimcore/ObjectManager.php
+++ b/src/CoreShop/Bundle/ResourceBundle/Pimcore/ObjectManager.php
@@ -1,17 +1,21 @@
addConditionParam(
$criterion['condition'],
- $criterion['variable'] ?? null
+ $criterion['variable'] ?? null,
);
}
}
diff --git a/src/CoreShop/Bundle/ResourceBundle/Pimcore/PimcoreRepository.php b/src/CoreShop/Bundle/ResourceBundle/Pimcore/PimcoreRepository.php
index f4159feb01..d75795adf7 100644
--- a/src/CoreShop/Bundle/ResourceBundle/Pimcore/PimcoreRepository.php
+++ b/src/CoreShop/Bundle/ResourceBundle/Pimcore/PimcoreRepository.php
@@ -1,17 +1,21 @@
end()
->end()
->end()
- ->end();
+ ->end()
+ ;
return $treeBuilder;
}
diff --git a/src/CoreShop/Bundle/ResourceBundle/Routing/ResourceLoader.php b/src/CoreShop/Bundle/ResourceBundle/Routing/ResourceLoader.php
index 960e9ee38a..e4e52f56e8 100644
--- a/src/CoreShop/Bundle/ResourceBundle/Routing/ResourceLoader.php
+++ b/src/CoreShop/Bundle/ResourceBundle/Routing/ResourceLoader.php
@@ -1,17 +1,21 @@
getActive()) {
$this->context->buildViolation($constraint->message)
->setParameter('{{ value }}', $this->formatValue($value))
- ->addViolation();
+ ->addViolation()
+ ;
}
} else {
throw new UnexpectedTypeException($value, ToggleableInterface::class);
diff --git a/src/CoreShop/Bundle/ResourceBundle/Validator/Constraints/UniqueEntity.php b/src/CoreShop/Bundle/ResourceBundle/Validator/Constraints/UniqueEntity.php
index 7fa3666535..a17701fe8d 100644
--- a/src/CoreShop/Bundle/ResourceBundle/Validator/Constraints/UniqueEntity.php
+++ b/src/CoreShop/Bundle/ResourceBundle/Validator/Constraints/UniqueEntity.php
@@ -1,17 +1,21 @@
$getter();
@@ -119,7 +125,8 @@ public function validate($value, Constraint $constraint): void
->setParameter('{{ value }}', $criteria[$fields[0]])
->setInvalidValue($criteria[$fields[0]])
->setCause($value)
- ->addViolation();
+ ->addViolation()
+ ;
}
}
}
diff --git a/src/CoreShop/Bundle/RuleBundle/Assessor/RuleAvailabilityAssessor.php b/src/CoreShop/Bundle/RuleBundle/Assessor/RuleAvailabilityAssessor.php
index 99fe546dac..6f1818765b 100644
--- a/src/CoreShop/Bundle/RuleBundle/Assessor/RuleAvailabilityAssessor.php
+++ b/src/CoreShop/Bundle/RuleBundle/Assessor/RuleAvailabilityAssessor.php
@@ -1,17 +1,21 @@
setName('coreshop:rules:check-availability')
- ->setDescription('Check for outdated / invalid rules and disable them.');
+ ->setDescription('Check for outdated / invalid rules and disable them.')
+ ;
}
protected function execute(InputInterface $input, OutputInterface $output): int
diff --git a/src/CoreShop/Bundle/RuleBundle/CoreShopRuleBundle.php b/src/CoreShop/Bundle/RuleBundle/CoreShopRuleBundle.php
index a83f0a460b..e203961e61 100644
--- a/src/CoreShop/Bundle/RuleBundle/CoreShopRuleBundle.php
+++ b/src/CoreShop/Bundle/RuleBundle/CoreShopRuleBundle.php
@@ -1,17 +1,21 @@
end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
@@ -108,6 +113,7 @@ private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/RuleBundle/DependencyInjection/CoreShopRuleExtension.php b/src/CoreShop/Bundle/RuleBundle/DependencyInjection/CoreShopRuleExtension.php
index 532a3ab573..7ac36e5dae 100644
--- a/src/CoreShop/Bundle/RuleBundle/DependencyInjection/CoreShopRuleExtension.php
+++ b/src/CoreShop/Bundle/RuleBundle/DependencyInjection/CoreShopRuleExtension.php
@@ -1,17 +1,21 @@
registerForAutoconfiguration(RuleAvailabilityAssessorInterface::class)
- ->addTag(RuleAvailabilityAssessorPass::RULE_AVAILABILITY_ASSESSOR_TAG);
+ ->addTag(RuleAvailabilityAssessorPass::RULE_AVAILABILITY_ASSESSOR_TAG)
+ ;
$container
->registerForAutoconfiguration(RuleConditionsValidationProcessorInterface::class)
- ->addTag(TraceableValidationProcessorPass::RULE_CONDITIONS_VALIDATIONS_PROCESSOR);
+ ->addTag(TraceableValidationProcessorPass::RULE_CONDITIONS_VALIDATIONS_PROCESSOR)
+ ;
}
}
diff --git a/src/CoreShop/Bundle/RuleBundle/Doctrine/ORM/RuleRepository.php b/src/CoreShop/Bundle/RuleBundle/Doctrine/ORM/RuleRepository.php
index e599ccdf82..a857e87384 100644
--- a/src/CoreShop/Bundle/RuleBundle/Doctrine/ORM/RuleRepository.php
+++ b/src/CoreShop/Bundle/RuleBundle/Doctrine/ORM/RuleRepository.php
@@ -1,17 +1,21 @@
createQueryBuilder('o')
->andWhere('o.active = 1')
->getQuery()
- ->getResult();
+ ->getResult()
+ ;
}
public function findWithConditionOfType($conditionType): array
@@ -34,7 +39,8 @@ public function findWithConditionOfType($conditionType): array
->andWhere('condition.type = :conditionType')
->setParameter('conditionType', $conditionType)
->getQuery()
- ->getResult();
+ ->getResult()
+ ;
}
public function findWithActionOfType($actionType): array
@@ -44,6 +50,7 @@ public function findWithActionOfType($actionType): array
->andWhere('action.type = :actionType')
->setParameter('actionType', $actionType)
->getQuery()
- ->getResult();
+ ->getResult()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/RuleBundle/Event/RuleAvailabilityCheckEvent.php b/src/CoreShop/Bundle/RuleBundle/Event/RuleAvailabilityCheckEvent.php
index 8f05016d82..b08677206c 100644
--- a/src/CoreShop/Bundle/RuleBundle/Event/RuleAvailabilityCheckEvent.php
+++ b/src/CoreShop/Bundle/RuleBundle/Event/RuleAvailabilityCheckEvent.php
@@ -1,17 +1,21 @@
addConfigurationFields($event->getForm(), $this->formTypeRegistry->get($data['type'], 'default'));
- });
+ })
+ ;
}
public function configureOptions(OptionsResolver $resolver): void
@@ -75,7 +83,8 @@ public function configureOptions(OptionsResolver $resolver): void
$resolver
->setDefault('configuration_type', null)
- ->setAllowedTypes('configuration_type', ['string', 'null']);
+ ->setAllowedTypes('configuration_type', ['string', 'null'])
+ ;
}
/**
diff --git a/src/CoreShop/Bundle/RuleBundle/Form/Type/Core/AbstractConfigurationCollectionType.php b/src/CoreShop/Bundle/RuleBundle/Form/Type/Core/AbstractConfigurationCollectionType.php
index b355d82268..38befdbd43 100644
--- a/src/CoreShop/Bundle/RuleBundle/Form/Type/Core/AbstractConfigurationCollectionType.php
+++ b/src/CoreShop/Bundle/RuleBundle/Form/Type/Core/AbstractConfigurationCollectionType.php
@@ -1,17 +1,21 @@
$type]
- )
+ ['configuration_type' => $type],
+ ),
);
$prototypes[$type] = $formBuilder->getForm();
diff --git a/src/CoreShop/Bundle/RuleBundle/Form/Type/Rule/Condition/AbstractNestedConfigurationType.php b/src/CoreShop/Bundle/RuleBundle/Form/Type/Rule/Condition/AbstractNestedConfigurationType.php
index 0e3a17fcfc..88443b5aac 100644
--- a/src/CoreShop/Bundle/RuleBundle/Form/Type/Rule/Condition/AbstractNestedConfigurationType.php
+++ b/src/CoreShop/Bundle/RuleBundle/Form/Type/Rule/Condition/AbstractNestedConfigurationType.php
@@ -1,17 +1,21 @@
['coreshop']]),
],
'choices' => ['and' => 'and', 'or' => 'or', 'not' => 'not'],
- ]);
+ ])
+ ;
}
}
diff --git a/src/CoreShop/Bundle/RuleBundle/Form/Type/Rule/EmptyConfigurationFormType.php b/src/CoreShop/Bundle/RuleBundle/Form/Type/Rule/EmptyConfigurationFormType.php
index cef07c81b6..d2d7acfc83 100644
--- a/src/CoreShop/Bundle/RuleBundle/Form/Type/Rule/EmptyConfigurationFormType.php
+++ b/src/CoreShop/Bundle/RuleBundle/Form/Type/Rule/EmptyConfigurationFormType.php
@@ -1,17 +1,21 @@
add('name', TextType::class)
->add('conditions', RuleConditionCollectionType::class)
- ->add('actions', RuleActionCollectionType::class);
+ ->add('actions', RuleActionCollectionType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/RuleBundle/Processor/RuleAvailabilityProcessor.php b/src/CoreShop/Bundle/RuleBundle/Processor/RuleAvailabilityProcessor.php
index c799242710..afcfe0669a 100644
--- a/src/CoreShop/Bundle/RuleBundle/Processor/RuleAvailabilityProcessor.php
+++ b/src/CoreShop/Bundle/RuleBundle/Processor/RuleAvailabilityProcessor.php
@@ -1,17 +1,21 @@
eventDispatcher->dispatch(
new RuleAvailabilityCheckEvent($rule, $rule::class, $ruleIsAvailable),
- 'coreshop.rule.availability_check'
+ 'coreshop.rule.availability_check',
);
if ($event->isAvailable() === false) {
diff --git a/src/CoreShop/Bundle/RuleBundle/Processor/RuleAvailabilityProcessorInterface.php b/src/CoreShop/Bundle/RuleBundle/Processor/RuleAvailabilityProcessorInterface.php
index 47d0ae89fe..7c89abfd06 100644
--- a/src/CoreShop/Bundle/RuleBundle/Processor/RuleAvailabilityProcessorInterface.php
+++ b/src/CoreShop/Bundle/RuleBundle/Processor/RuleAvailabilityProcessorInterface.php
@@ -1,17 +1,21 @@
registerForAutoconfiguration(ExtractorInterface::class)
- ->addTag(ExtractorRegistryServicePass::EXTRACTOR_TAG);
+ ->addTag(ExtractorRegistryServicePass::EXTRACTOR_TAG)
+ ;
}
}
diff --git a/src/CoreShop/Bundle/SequenceBundle/CoreShopSequenceBundle.php b/src/CoreShop/Bundle/SequenceBundle/CoreShopSequenceBundle.php
index b702ab8105..c3b5d5eb3c 100644
--- a/src/CoreShop/Bundle/SequenceBundle/CoreShopSequenceBundle.php
+++ b/src/CoreShop/Bundle/SequenceBundle/CoreShopSequenceBundle.php
@@ -1,17 +1,21 @@
end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/SequenceBundle/DependencyInjection/CoreShopSequenceExtension.php b/src/CoreShop/Bundle/SequenceBundle/DependencyInjection/CoreShopSequenceExtension.php
index dd7d512c8b..16f63dc6b2 100644
--- a/src/CoreShop/Bundle/SequenceBundle/DependencyInjection/CoreShopSequenceExtension.php
+++ b/src/CoreShop/Bundle/SequenceBundle/DependencyInjection/CoreShopSequenceExtension.php
@@ -1,17 +1,21 @@
andWhere('o.type = :type')
->setParameter('type', $type)
->getQuery()
- ->getOneOrNullResult();
+ ->getOneOrNullResult()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/ShippingBundle/Controller/CarrierController.php b/src/CoreShop/Bundle/ShippingBundle/Controller/CarrierController.php
index 8956a40178..2b49c1b377 100644
--- a/src/CoreShop/Bundle/ShippingBundle/Controller/CarrierController.php
+++ b/src/CoreShop/Bundle/ShippingBundle/Controller/CarrierController.php
@@ -1,17 +1,21 @@
true,
'taxCalculationStrategies' => $convertedStrategies,
- ]
+ ],
);
}
}
diff --git a/src/CoreShop/Bundle/ShippingBundle/Controller/ShippingRuleController.php b/src/CoreShop/Bundle/ShippingBundle/Controller/ShippingRuleController.php
index 749c4ad10d..2f46daf789 100644
--- a/src/CoreShop/Bundle/ShippingBundle/Controller/ShippingRuleController.php
+++ b/src/CoreShop/Bundle/ShippingBundle/Controller/ShippingRuleController.php
@@ -1,17 +1,21 @@
addDefaultsIfNotSet()
->children()
->scalarNode('default_resolver')->cannotBeEmpty()->end()
- ->end();
+ ->end()
+ ;
$this->addModelsSection($rootNode);
$this->addPimcoreResourcesSection($rootNode);
@@ -131,7 +136,8 @@ private function addModelsSection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
@@ -162,6 +168,7 @@ private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/ShippingBundle/DependencyInjection/CoreShopShippingExtension.php b/src/CoreShop/Bundle/ShippingBundle/DependencyInjection/CoreShopShippingExtension.php
index a377df1d13..90f78b58c9 100644
--- a/src/CoreShop/Bundle/ShippingBundle/DependencyInjection/CoreShopShippingExtension.php
+++ b/src/CoreShop/Bundle/ShippingBundle/DependencyInjection/CoreShopShippingExtension.php
@@ -1,17 +1,21 @@
registerForAutoconfiguration(ShippableCarrierValidatorInterface::class)
- ->addTag(CompositeShippableValidatorPass::SHIPABLE_VALIDATOR_TAG);
+ ->addTag(CompositeShippableValidatorPass::SHIPABLE_VALIDATOR_TAG)
+ ;
$container
->registerForAutoconfiguration(CarrierPriceCalculatorInterface::class)
- ->addTag(ShippingPriceCalculatorsPass::SHIPPING_PRICE_CALCULATOR_TAG);
+ ->addTag(ShippingPriceCalculatorsPass::SHIPPING_PRICE_CALCULATOR_TAG)
+ ;
$container
->registerForAutoconfiguration(ShippingRuleActionProcessorInterface::class)
- ->addTag(ShippingRuleActionPass::SHIPPING_RULE_ACTION_TAG);
+ ->addTag(ShippingRuleActionPass::SHIPPING_RULE_ACTION_TAG)
+ ;
$container
->registerForAutoconfiguration(ShippingConditionCheckerInterface::class)
- ->addTag(ShippingRuleConditionPass::SHIPPING_RULE_CONDITION_TAG);
+ ->addTag(ShippingRuleConditionPass::SHIPPING_RULE_CONDITION_TAG)
+ ;
$container
->registerForAutoconfiguration(TaxCalculationStrategyInterface::class)
- ->addTag(ShippingTaxCalculationStrategyPass::SHIPPING_TAX_STRATEGY_TAG);
+ ->addTag(ShippingTaxCalculationStrategyPass::SHIPPING_TAX_STRATEGY_TAG)
+ ;
}
}
diff --git a/src/CoreShop/Bundle/ShippingBundle/Form/Type/CarrierChoiceType.php b/src/CoreShop/Bundle/ShippingBundle/Form/Type/CarrierChoiceType.php
index 1efe35e2c5..25b054140e 100644
--- a/src/CoreShop/Bundle/ShippingBundle/Form/Type/CarrierChoiceType.php
+++ b/src/CoreShop/Bundle/ShippingBundle/Form/Type/CarrierChoiceType.php
@@ -1,17 +1,21 @@
'identifier',
'choice_translation_domain' => false,
'active' => true,
- ]);
+ ])
+ ;
}
public function buildView(FormView $view, FormInterface $form, array $options): void
diff --git a/src/CoreShop/Bundle/ShippingBundle/Form/Type/CarrierTranslationType.php b/src/CoreShop/Bundle/ShippingBundle/Form/Type/CarrierTranslationType.php
index 8d99d383e3..65ca3ef15d 100644
--- a/src/CoreShop/Bundle/ShippingBundle/Form/Type/CarrierTranslationType.php
+++ b/src/CoreShop/Bundle/ShippingBundle/Form/Type/CarrierTranslationType.php
@@ -1,17 +1,21 @@
add('title', TextType::class)
->add('description', TextareaType::class, [
'required' => false,
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/ShippingBundle/Form/Type/CarrierType.php b/src/CoreShop/Bundle/ShippingBundle/Form/Type/CarrierType.php
index 4bfde67e70..0ca1e6aa04 100644
--- a/src/CoreShop/Bundle/ShippingBundle/Form/Type/CarrierType.php
+++ b/src/CoreShop/Bundle/ShippingBundle/Form/Type/CarrierType.php
@@ -1,17 +1,21 @@
add('shippingRules', ShippingRuleGroupCollectionType::class)
->add('translations', ResourceTranslationsType::class, [
'entry_type' => CarrierTranslationType::class,
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Action/AdditionPercentActionConfigurationType.php b/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Action/AdditionPercentActionConfigurationType.php
index a08e850773..5197a0d4c2 100644
--- a/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Action/AdditionPercentActionConfigurationType.php
+++ b/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Action/AdditionPercentActionConfigurationType.php
@@ -1,17 +1,21 @@
'numeric', 'groups' => $this->validationGroups]),
new Range(['min' => 0, 'max' => 100, 'groups' => $this->validationGroups]),
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Action/DiscountPercentActionConfigurationType.php b/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Action/DiscountPercentActionConfigurationType.php
index 5603538b08..99800444b1 100644
--- a/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Action/DiscountPercentActionConfigurationType.php
+++ b/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Action/DiscountPercentActionConfigurationType.php
@@ -1,17 +1,21 @@
'numeric', 'groups' => $this->validationGroups]),
new Range(['min' => 0, 'max' => 100, 'groups' => $this->validationGroups]),
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Common/ShippingRuleConfigurationType.php b/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Common/ShippingRuleConfigurationType.php
index 06b62fb0e3..39c66f1e45 100644
--- a/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Common/ShippingRuleConfigurationType.php
+++ b/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Common/ShippingRuleConfigurationType.php
@@ -1,17 +1,21 @@
[
new NotBlank(['groups' => $this->validationGroups]),
],
- ]);
+ ])
+ ;
$builder->get('shippingRule')->addModelTransformer(new CallbackTransformer(
function (mixed $shippingRule) {
@@ -53,7 +58,7 @@ function (mixed $shippingRule) {
}
return null;
- }
+ },
));
}
diff --git a/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Condition/AmountConfigurationType.php b/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Condition/AmountConfigurationType.php
index 2df1125885..795f6c4cd7 100644
--- a/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Condition/AmountConfigurationType.php
+++ b/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Condition/AmountConfigurationType.php
@@ -1,17 +1,21 @@
'numeric', 'groups' => $this->validationGroups]),
],
])
- ->add('gross', CheckboxType::class, []);
+ ->add('gross', CheckboxType::class, [])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Condition/DimensionConfigurationType.php b/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Condition/DimensionConfigurationType.php
index dd6ae38347..e3e2d77838 100644
--- a/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Condition/DimensionConfigurationType.php
+++ b/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Condition/DimensionConfigurationType.php
@@ -1,17 +1,21 @@
$this->validationGroups]),
new Type(['type' => 'numeric', 'groups' => $this->validationGroups]),
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Condition/NestedConfigurationType.php b/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Condition/NestedConfigurationType.php
index e637a2334d..bbecc18d63 100644
--- a/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Condition/NestedConfigurationType.php
+++ b/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Condition/NestedConfigurationType.php
@@ -1,17 +1,21 @@
add('conditions', ShippingRuleConditionCollectionType::class, [
'constraints' => [new Valid(['groups' => $this->validationGroups])],
'nested' => true,
- ]);
+ ])
+ ;
$builder->addEventListener(FormEvents::PRE_SET_DATA, function (FormEvent $event) {
$data = $event->getData();
diff --git a/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Condition/PostcodeConfigurationType.php b/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Condition/PostcodeConfigurationType.php
index 782f556405..dfe29079cf 100644
--- a/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Condition/PostcodeConfigurationType.php
+++ b/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Condition/PostcodeConfigurationType.php
@@ -1,17 +1,21 @@
add('postcodes', TextType::class, [
])
- ->add('exclusion', CheckboxType::class);
+ ->add('exclusion', CheckboxType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Condition/WeightConfigurationType.php b/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Condition/WeightConfigurationType.php
index 4f29e603d6..fe02ca3fb4 100644
--- a/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Condition/WeightConfigurationType.php
+++ b/src/CoreShop/Bundle/ShippingBundle/Form/Type/Rule/Condition/WeightConfigurationType.php
@@ -1,17 +1,21 @@
$this->validationGroups]),
new Type(['type' => 'numeric', 'groups' => $this->validationGroups]),
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/ShippingBundle/Form/Type/ShippingRuleActionChoiceType.php b/src/CoreShop/Bundle/ShippingBundle/Form/Type/ShippingRuleActionChoiceType.php
index e098116dfb..d9fb27e747 100644
--- a/src/CoreShop/Bundle/ShippingBundle/Form/Type/ShippingRuleActionChoiceType.php
+++ b/src/CoreShop/Bundle/ShippingBundle/Form/Type/ShippingRuleActionChoiceType.php
@@ -1,17 +1,21 @@
[
'data-form-collection' => 'update',
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/ShippingBundle/Form/Type/ShippingRuleChoiceType.php b/src/CoreShop/Bundle/ShippingBundle/Form/Type/ShippingRuleChoiceType.php
index 4fcdda2d59..55c237548d 100644
--- a/src/CoreShop/Bundle/ShippingBundle/Form/Type/ShippingRuleChoiceType.php
+++ b/src/CoreShop/Bundle/ShippingBundle/Form/Type/ShippingRuleChoiceType.php
@@ -1,17 +1,21 @@
'name',
'choice_translation_domain' => false,
'active' => true,
- ]);
+ ])
+ ;
}
public function getParent(): string
diff --git a/src/CoreShop/Bundle/ShippingBundle/Form/Type/ShippingRuleConditionChoiceType.php b/src/CoreShop/Bundle/ShippingBundle/Form/Type/ShippingRuleConditionChoiceType.php
index e7cf83ced3..27d2a3f0c6 100644
--- a/src/CoreShop/Bundle/ShippingBundle/Form/Type/ShippingRuleConditionChoiceType.php
+++ b/src/CoreShop/Bundle/ShippingBundle/Form/Type/ShippingRuleConditionChoiceType.php
@@ -1,17 +1,21 @@
[
'data-form-collection' => 'update',
],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/ShippingBundle/Form/Type/ShippingRuleGroupCollectionType.php b/src/CoreShop/Bundle/ShippingBundle/Form/Type/ShippingRuleGroupCollectionType.php
index cfa42d795e..ea65722fdc 100644
--- a/src/CoreShop/Bundle/ShippingBundle/Form/Type/ShippingRuleGroupCollectionType.php
+++ b/src/CoreShop/Bundle/ShippingBundle/Form/Type/ShippingRuleGroupCollectionType.php
@@ -1,17 +1,21 @@
add('priority', NumberType::class)
->add('stopPropagation', CheckboxType::class)
->add('shippingRule', ShippingRuleChoiceType::class)
- ->add('carrier', CarrierChoiceType::class);
+ ->add('carrier', CarrierChoiceType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/ShippingBundle/Form/Type/ShippingRuleType.php b/src/CoreShop/Bundle/ShippingBundle/Form/Type/ShippingRuleType.php
index 9f5f15b3fe..65abd34620 100644
--- a/src/CoreShop/Bundle/ShippingBundle/Form/Type/ShippingRuleType.php
+++ b/src/CoreShop/Bundle/ShippingBundle/Form/Type/ShippingRuleType.php
@@ -1,17 +1,21 @@
add('name', TextareaType::class)
->add('active', CheckboxType::class)
->add('conditions', ShippingRuleConditionCollectionType::class)
- ->add('actions', ShippingRuleActionCollectionType::class);
+ ->add('actions', ShippingRuleActionCollectionType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/ShippingBundle/Form/Type/ShippingTaxCalculationStrategyChoiceType.php b/src/CoreShop/Bundle/ShippingBundle/Form/Type/ShippingTaxCalculationStrategyChoiceType.php
index eba417b58d..fc3db00205 100644
--- a/src/CoreShop/Bundle/ShippingBundle/Form/Type/ShippingTaxCalculationStrategyChoiceType.php
+++ b/src/CoreShop/Bundle/ShippingBundle/Form/Type/ShippingTaxCalculationStrategyChoiceType.php
@@ -1,17 +1,21 @@
createAddToStorageList($storageList, $item);
$form = $this->formFactory->createNamed(
- 'coreshop-'.$product->getId(),
+ 'coreshop-' . $product->getId(),
$this->addToStorageListForm,
- $addToStorageList
+ $addToStorageList,
);
if ($request->isMethod('POST')) {
@@ -139,7 +142,7 @@ public function addItemAction(Request $request): Response
[
'form' => $form->createView(),
'product' => $product,
- ]
+ ],
);
}
@@ -209,12 +212,11 @@ public function summaryAction(Request $request): Response
protected function createAddToStorageList(
StorageListInterface $storageList,
- StorageListItemInterface $storageListItem
+ StorageListItemInterface $storageListItem,
): AddToStorageListInterface {
return $this->addToStorageListFactory->createWithStorageListAndStorageListItem($storageList, $storageListItem);
}
-
/**
* @return mixed
*
diff --git a/src/CoreShop/Bundle/StorageListBundle/Core/EventListener/SessionStoreStorageListSubscriber.php b/src/CoreShop/Bundle/StorageListBundle/Core/EventListener/SessionStoreStorageListSubscriber.php
index e7bf4f7064..3221819b20 100644
--- a/src/CoreShop/Bundle/StorageListBundle/Core/EventListener/SessionStoreStorageListSubscriber.php
+++ b/src/CoreShop/Bundle/StorageListBundle/Core/EventListener/SessionStoreStorageListSubscriber.php
@@ -1,17 +1,21 @@
set(
sprintf('%s.%s', $this->sessionKeyName, $storageList->getStore()->getId()),
- $storageList->getId()
+ $storageList->getId(),
);
}
}
diff --git a/src/CoreShop/Bundle/StorageListBundle/Core/EventListener/StorageListBlamerListener.php b/src/CoreShop/Bundle/StorageListBundle/Core/EventListener/StorageListBlamerListener.php
index 108c2975ef..61d5f2e493 100644
--- a/src/CoreShop/Bundle/StorageListBundle/Core/EventListener/StorageListBlamerListener.php
+++ b/src/CoreShop/Bundle/StorageListBundle/Core/EventListener/StorageListBlamerListener.php
@@ -1,17 +1,21 @@
end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/StorageListBundle/DependencyInjection/CoreShopStorageListExtension.php b/src/CoreShop/Bundle/StorageListBundle/DependencyInjection/CoreShopStorageListExtension.php
index 7cd5f616ab..f889c06573 100644
--- a/src/CoreShop/Bundle/StorageListBundle/DependencyInjection/CoreShopStorageListExtension.php
+++ b/src/CoreShop/Bundle/StorageListBundle/DependencyInjection/CoreShopStorageListExtension.php
@@ -1,17 +1,21 @@
registerForAutoconfiguration($list['context']['interface'])
- ->addTag($list['context']['tag']);
+ ->addTag($list['context']['tag'])
+ ;
}
$factoryContextDefinition = new Definition(StorageListFactoryContext::class);
@@ -92,7 +97,7 @@ public function load(array $configs, ContainerBuilder $container): void
$sessionSubscriber = new Definition(SessionSubscriber::class, [
new Reference(PimcoreContextResolver::class),
new Reference($contextCompositeServiceName),
- $list['session']['key']
+ $list['session']['key'],
]);
$container->setDefinition('coreshop.storage_list.session_subscriber.' . $name, $sessionSubscriber);
@@ -102,8 +107,7 @@ public function load(array $configs, ContainerBuilder $container): void
if ($container->has($class)) {
$controllerDefinition = $container->getDefinition($class);
- }
- else {
+ } else {
$controllerDefinition = new Definition($class);
}
@@ -153,22 +157,22 @@ public function load(array $configs, ContainerBuilder $container): void
$storeBasedContextDefinition->setDecoratedService($contextCompositeServiceName);
$storeBasedContextDefinition->setArgument(
'$context',
- new Reference('coreshop.storage_list.context.store_based.'.$name.'.inner')
+ new Reference('coreshop.storage_list.context.store_based.' . $name . '.inner'),
);
$storeBasedContextDefinition->setArgument(
'$shopperContext',
- new Reference('coreshop.context.shopper')
+ new Reference('coreshop.context.shopper'),
);
$container->setDefinition(
- 'coreshop.storage_list.context.store_based.'.$name,
- $storeBasedContextDefinition
+ 'coreshop.storage_list.context.store_based.' . $name,
+ $storeBasedContextDefinition,
);
}
if ($list['session']['enabled']) {
$sessionAndStoreBasedContextDefinition = new Definition(
- SessionAndStoreBasedStorageListContext::class
+ SessionAndStoreBasedStorageListContext::class,
);
$sessionAndStoreBasedContextDefinition->setArgument('$requestStack', new Reference('request_stack'));
$sessionAndStoreBasedContextDefinition->setArgument('$sessionKeyName', $list['session']['key']);
@@ -199,7 +203,7 @@ public function load(array $configs, ContainerBuilder $container): void
(new RegisterStorageListPass(
$list['context']['interface'],
$contextCompositeServiceName,
- $list['context']['tag']
+ $list['context']['tag'],
))->process($container);
}
}
diff --git a/src/CoreShop/Bundle/StorageListBundle/EventListener/SessionSubscriber.php b/src/CoreShop/Bundle/StorageListBundle/EventListener/SessionSubscriber.php
index fcf340445a..93c8039970 100644
--- a/src/CoreShop/Bundle/StorageListBundle/EventListener/SessionSubscriber.php
+++ b/src/CoreShop/Bundle/StorageListBundle/EventListener/SessionSubscriber.php
@@ -1,17 +1,21 @@
set(
sprintf('%s', $this->sessionKeyName),
- $list->getId()
+ $list->getId(),
);
}
}
diff --git a/src/CoreShop/Bundle/StorageListBundle/Form/Type/AddToStorageListType.php b/src/CoreShop/Bundle/StorageListBundle/Form/Type/AddToStorageListType.php
index 9dbc1c2e4d..96597d602e 100644
--- a/src/CoreShop/Bundle/StorageListBundle/Form/Type/AddToStorageListType.php
+++ b/src/CoreShop/Bundle/StorageListBundle/Form/Type/AddToStorageListType.php
@@ -1,17 +1,21 @@
false,
'label' => 'coreshop.form.storage_list.items',
])
- ->add('submit', SubmitType::class);
+ ->add('submit', SubmitType::class)
+ ;
}
public function configureOptions(OptionsResolver $resolver): void
@@ -49,4 +54,3 @@ public function getBlockPrefix(): string
return 'coreshop_storage_list';
}
}
-
diff --git a/src/CoreShop/Bundle/StorageListBundle/Pimcore/Repository/PimcoreStorageListRepository.php b/src/CoreShop/Bundle/StorageListBundle/Pimcore/Repository/PimcoreStorageListRepository.php
index 8b9270eff1..1e17b38212 100644
--- a/src/CoreShop/Bundle/StorageListBundle/Pimcore/Repository/PimcoreStorageListRepository.php
+++ b/src/CoreShop/Bundle/StorageListBundle/Pimcore/Repository/PimcoreStorageListRepository.php
@@ -1,17 +1,21 @@
data = [
'store' => null,
diff --git a/src/CoreShop/Bundle/StoreBundle/Context/Debug/DebugStoreContext.php b/src/CoreShop/Bundle/StoreBundle/Context/Debug/DebugStoreContext.php
index 86eef43488..a51eb01161 100644
--- a/src/CoreShop/Bundle/StoreBundle/Context/Debug/DebugStoreContext.php
+++ b/src/CoreShop/Bundle/StoreBundle/Context/Debug/DebugStoreContext.php
@@ -1,17 +1,21 @@
repository->getAll();
- foreach($stores as $store) {
+ foreach ($stores as $store) {
$options[] = [
'key' => $store->getName(),
- 'value' => $store->getId()
+ 'value' => $store->getId(),
];
}
@@ -43,9 +50,9 @@ public function getOptions($context, $fieldDefinition)
/**
* Returns the value which is defined in the 'Default value' field
+ *
* @param array $context
* @param Data $fieldDefinition
- * @return null
*/
public function getDefaultValue($context, $fieldDefinition)
{
@@ -55,10 +62,11 @@ public function getDefaultValue($context, $fieldDefinition)
/**
* @param array $context
* @param Data $fieldDefinition
+ *
* @return bool
*/
public function hasStaticOptions($context, $fieldDefinition)
{
return true;
}
-}
\ No newline at end of file
+}
diff --git a/src/CoreShop/Bundle/StoreBundle/CoreShopStoreBundle.php b/src/CoreShop/Bundle/StoreBundle/CoreShopStoreBundle.php
index 262d69c8b0..50a570437e 100644
--- a/src/CoreShop/Bundle/StoreBundle/CoreShopStoreBundle.php
+++ b/src/CoreShop/Bundle/StoreBundle/CoreShopStoreBundle.php
@@ -1,17 +1,21 @@
end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
@@ -96,6 +101,7 @@ private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/StoreBundle/DependencyInjection/CoreShopStoreExtension.php b/src/CoreShop/Bundle/StoreBundle/DependencyInjection/CoreShopStoreExtension.php
index 0c9da0cb42..cdffbb2071 100644
--- a/src/CoreShop/Bundle/StoreBundle/DependencyInjection/CoreShopStoreExtension.php
+++ b/src/CoreShop/Bundle/StoreBundle/DependencyInjection/CoreShopStoreExtension.php
@@ -1,17 +1,21 @@
registerForAutoconfiguration(StoreContextInterface::class)
- ->addTag(CompositeStoreContextPass::STORE_CONTEXT_TAG);
+ ->addTag(CompositeStoreContextPass::STORE_CONTEXT_TAG)
+ ;
$container
->registerForAutoconfiguration(RequestResolverInterface::class)
- ->addTag(CompositeRequestResolverPass::STORE_REQUEST_RESOLVER_TAG);
+ ->addTag(CompositeRequestResolverPass::STORE_REQUEST_RESOLVER_TAG)
+ ;
}
}
diff --git a/src/CoreShop/Bundle/StoreBundle/Doctrine/ORM/StoreRepository.php b/src/CoreShop/Bundle/StoreBundle/Doctrine/ORM/StoreRepository.php
index 9a911a6ec9..f03f922c94 100644
--- a/src/CoreShop/Bundle/StoreBundle/Doctrine/ORM/StoreRepository.php
+++ b/src/CoreShop/Bundle/StoreBundle/Doctrine/ORM/StoreRepository.php
@@ -1,17 +1,21 @@
andWhere('o.siteId = :siteId')
->setParameter('siteId', $siteId)
->getQuery()
- ->getOneOrNullResult();
+ ->getOneOrNullResult()
+ ;
}
public function findStandard(): ?StoreInterface
@@ -40,6 +45,7 @@ public function findStandard(): ?StoreInterface
return $this->createQueryBuilder('o')
->andWhere('o.isDefault = 1')
->getQuery()
- ->getOneOrNullResult();
+ ->getOneOrNullResult()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/StoreBundle/Form/Type/StoreChoiceType.php b/src/CoreShop/Bundle/StoreBundle/Form/Type/StoreChoiceType.php
index a59a9af783..a8f2e0bcc1 100644
--- a/src/CoreShop/Bundle/StoreBundle/Form/Type/StoreChoiceType.php
+++ b/src/CoreShop/Bundle/StoreBundle/Form/Type/StoreChoiceType.php
@@ -1,17 +1,21 @@
'id',
'choice_label' => 'name',
'choice_translation_domain' => false,
- ]);
+ ])
+ ;
}
public function getParent(): string
diff --git a/src/CoreShop/Bundle/StoreBundle/Form/Type/StoreType.php b/src/CoreShop/Bundle/StoreBundle/Form/Type/StoreType.php
index a214afbf11..374c8f8aa4 100644
--- a/src/CoreShop/Bundle/StoreBundle/Form/Type/StoreType.php
+++ b/src/CoreShop/Bundle/StoreBundle/Form/Type/StoreType.php
@@ -1,17 +1,21 @@
add('name', TextType::class)
->add('template', TextType::class)
->add('siteId', IntegerType::class)
- ->add('currency', CurrencyChoiceType::class);
+ ->add('currency', CurrencyChoiceType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/StoreBundle/Helper/PimcoreSiteHelper.php b/src/CoreShop/Bundle/StoreBundle/Helper/PimcoreSiteHelper.php
index 4431d853c5..7fd568b7c4 100644
--- a/src/CoreShop/Bundle/StoreBundle/Helper/PimcoreSiteHelper.php
+++ b/src/CoreShop/Bundle/StoreBundle/Helper/PimcoreSiteHelper.php
@@ -1,17 +1,21 @@
end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
@@ -183,6 +188,7 @@ private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/TaxationBundle/DependencyInjection/CoreShopTaxationExtension.php b/src/CoreShop/Bundle/TaxationBundle/DependencyInjection/CoreShopTaxationExtension.php
index 5831fcd7fe..9b37d4c4cf 100644
--- a/src/CoreShop/Bundle/TaxationBundle/DependencyInjection/CoreShopTaxationExtension.php
+++ b/src/CoreShop/Bundle/TaxationBundle/DependencyInjection/CoreShopTaxationExtension.php
@@ -1,17 +1,21 @@
setParameter('name', $name)
->setParameter('locale', $locale)
->getQuery()
- ->getResult();
+ ->getResult()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/TaxationBundle/Doctrine/ORM/TaxRuleRepository.php b/src/CoreShop/Bundle/TaxationBundle/Doctrine/ORM/TaxRuleRepository.php
index 7099389c2e..b3cf762143 100644
--- a/src/CoreShop/Bundle/TaxationBundle/Doctrine/ORM/TaxRuleRepository.php
+++ b/src/CoreShop/Bundle/TaxationBundle/Doctrine/ORM/TaxRuleRepository.php
@@ -1,17 +1,21 @@
andWhere('o.taxRuleGroup = :taxRuleGroup')
->setParameter('taxRuleGroup', $group)
->getQuery()
- ->getResult();
+ ->getResult()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/TaxationBundle/Form/Type/TaxRateChoiceType.php b/src/CoreShop/Bundle/TaxationBundle/Form/Type/TaxRateChoiceType.php
index efe4354040..54b54f2a37 100644
--- a/src/CoreShop/Bundle/TaxationBundle/Form/Type/TaxRateChoiceType.php
+++ b/src/CoreShop/Bundle/TaxationBundle/Form/Type/TaxRateChoiceType.php
@@ -1,17 +1,21 @@
'name',
'choice_translation_domain' => false,
'active' => true,
- ]);
+ ])
+ ;
}
public function getParent(): string
diff --git a/src/CoreShop/Bundle/TaxationBundle/Form/Type/TaxRateTranslationType.php b/src/CoreShop/Bundle/TaxationBundle/Form/Type/TaxRateTranslationType.php
index c4addb58e8..226ab13bed 100644
--- a/src/CoreShop/Bundle/TaxationBundle/Form/Type/TaxRateTranslationType.php
+++ b/src/CoreShop/Bundle/TaxationBundle/Form/Type/TaxRateTranslationType.php
@@ -1,17 +1,21 @@
add('name', TextType::class);
+ ->add('name', TextType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/TaxationBundle/Form/Type/TaxRateType.php b/src/CoreShop/Bundle/TaxationBundle/Form/Type/TaxRateType.php
index bff0170572..609c648703 100644
--- a/src/CoreShop/Bundle/TaxationBundle/Form/Type/TaxRateType.php
+++ b/src/CoreShop/Bundle/TaxationBundle/Form/Type/TaxRateType.php
@@ -1,17 +1,21 @@
TaxRateTranslationType::class,
])
->add('rate', NumberType::class)
- ->add('active', CheckboxType::class);
+ ->add('active', CheckboxType::class)
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/TaxationBundle/Form/Type/TaxRuleGroupChoiceType.php b/src/CoreShop/Bundle/TaxationBundle/Form/Type/TaxRuleGroupChoiceType.php
index 85b8fb3147..39e10a1866 100644
--- a/src/CoreShop/Bundle/TaxationBundle/Form/Type/TaxRuleGroupChoiceType.php
+++ b/src/CoreShop/Bundle/TaxationBundle/Form/Type/TaxRuleGroupChoiceType.php
@@ -1,17 +1,21 @@
'id',
'choice_label' => 'name',
'choice_translation_domain' => false,
- ]);
+ ])
+ ;
}
public function getParent(): string
diff --git a/src/CoreShop/Bundle/TaxationBundle/Form/Type/TaxRuleGroupType.php b/src/CoreShop/Bundle/TaxationBundle/Form/Type/TaxRuleGroupType.php
index 0df7610255..aaac7e9c08 100644
--- a/src/CoreShop/Bundle/TaxationBundle/Form/Type/TaxRuleGroupType.php
+++ b/src/CoreShop/Bundle/TaxationBundle/Form/Type/TaxRuleGroupType.php
@@ -1,17 +1,21 @@
true,
'allow_delete' => true,
'by_reference' => false,
- ]
- );
+ ],
+ )
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/TaxationBundle/Form/Type/TaxRuleType.php b/src/CoreShop/Bundle/TaxationBundle/Form/Type/TaxRuleType.php
index 2236de3f06..e5f7ee84f1 100644
--- a/src/CoreShop/Bundle/TaxationBundle/Form/Type/TaxRuleType.php
+++ b/src/CoreShop/Bundle/TaxationBundle/Form/Type/TaxRuleType.php
@@ -1,17 +1,21 @@
2,
],
'choice_translation_domain' => false,
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/TaxationBundle/Resources/public/pimcore/css/taxation.css b/src/CoreShop/Bundle/TaxationBundle/Resources/public/pimcore/css/taxation.css
index d394a8f6c3..3db55cf2d0 100644
--- a/src/CoreShop/Bundle/TaxationBundle/Resources/public/pimcore/css/taxation.css
+++ b/src/CoreShop/Bundle/TaxationBundle/Resources/public/pimcore/css/taxation.css
@@ -1,13 +1,17 @@
-/**
- * CoreShop.
+/*
+ * CoreShop
*
- * This source file is subject to the GNU General Public License version 3 (GPLv3)
- * For the full copyright and license information, please view the LICENSE.md and gpl-3.0.txt
- * files that are distributed with this source code.
+ * This source file is available under two different licenses:
+ * - GNU General Public License version 3 (GPLv3)
+ * - CoreShop Commercial License (CCL)
+ * Full copyright and license information is available in
+ * LICENSE.md which is distributed with this source code.
*
* @copyright Copyright (c) CoreShop GmbH (https://www.coreshop.org)
* @license https://www.coreshop.org/license GPLv3 and CCL
+ *
*/
+
.coreshop_icon_taxes, .coreshop_icon_tax_rate, .pimcore_icon_coreShopTaxRate {
background: url(../img/taxes.svg) center center no-repeat !important;
}
diff --git a/src/CoreShop/Bundle/TestBundle/CoreShopTestBundle.php b/src/CoreShop/Bundle/TestBundle/CoreShopTestBundle.php
index f6f7c11d82..796a3d7d70 100644
--- a/src/CoreShop/Bundle/TestBundle/CoreShopTestBundle.php
+++ b/src/CoreShop/Bundle/TestBundle/CoreShopTestBundle.php
@@ -1,17 +1,21 @@
booleanNode('pimcore_document_property')->defaultFalse()->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
return $treeBuilder;
}
diff --git a/src/CoreShop/Bundle/ThemeBundle/DependencyInjection/CoreShopThemeExtension.php b/src/CoreShop/Bundle/ThemeBundle/DependencyInjection/CoreShopThemeExtension.php
index 2ccd7792ca..97b6d116b3 100644
--- a/src/CoreShop/Bundle/ThemeBundle/DependencyInjection/CoreShopThemeExtension.php
+++ b/src/CoreShop/Bundle/ThemeBundle/DependencyInjection/CoreShopThemeExtension.php
@@ -1,17 +1,21 @@
registerForAutoconfiguration(ThemeResolverInterface::class)
- ->addTag(CompositeThemeResolverPass::THEME_RESOLVER_TAG);
+ ->addTag(CompositeThemeResolverPass::THEME_RESOLVER_TAG)
+ ;
}
}
diff --git a/src/CoreShop/Bundle/ThemeBundle/EventListener/DocumentRenderListener.php b/src/CoreShop/Bundle/ThemeBundle/EventListener/DocumentRenderListener.php
index cda17adf90..5f72134c90 100644
--- a/src/CoreShop/Bundle/ThemeBundle/EventListener/DocumentRenderListener.php
+++ b/src/CoreShop/Bundle/ThemeBundle/EventListener/DocumentRenderListener.php
@@ -1,17 +1,21 @@
themeContext->setTheme($theme);
- }
- catch (ThemeNotResolvedException) {
+ } catch (ThemeNotResolvedException) {
//Ignore
}
}
diff --git a/src/CoreShop/Bundle/ThemeBundle/Service/CompositeThemeResolver.php b/src/CoreShop/Bundle/ThemeBundle/Service/CompositeThemeResolver.php
index f2f29f953e..4f16fab15b 100644
--- a/src/CoreShop/Bundle/ThemeBundle/Service/CompositeThemeResolver.php
+++ b/src/CoreShop/Bundle/ThemeBundle/Service/CompositeThemeResolver.php
@@ -1,17 +1,21 @@
request->get('documentId');
if ($documentId) {
- $document = Document::getById((int)$documentId);
+ $document = Document::getById((int) $documentId);
}
- }
- else {
+ } else {
$document = $this->documentResolver->getDocument($request);
}
diff --git a/src/CoreShop/Bundle/ThemeBundle/Service/PimcoreSiteThemeResolver.php b/src/CoreShop/Bundle/ThemeBundle/Service/PimcoreSiteThemeResolver.php
index 33c99da3bc..d6d6fe23e1 100644
--- a/src/CoreShop/Bundle/ThemeBundle/Service/PimcoreSiteThemeResolver.php
+++ b/src/CoreShop/Bundle/ThemeBundle/Service/PimcoreSiteThemeResolver.php
@@ -1,17 +1,21 @@
requestStack->getMainRequest();
@@ -43,10 +46,9 @@ public function resolveTheme(): string
$documentId = $request->request->get('documentId');
if ($documentId) {
- $document = Document::getById((int)$documentId);
+ $document = Document::getById((int) $documentId);
}
- }
- else {
+ } else {
$document = $this->documentResolver->getDocument($request);
}
diff --git a/src/CoreShop/Bundle/ThemeBundle/Service/ThemeHelper.php b/src/CoreShop/Bundle/ThemeBundle/Service/ThemeHelper.php
index 8a29a41dc8..a9d61937b7 100644
--- a/src/CoreShop/Bundle/ThemeBundle/Service/ThemeHelper.php
+++ b/src/CoreShop/Bundle/ThemeBundle/Service/ThemeHelper.php
@@ -1,17 +1,21 @@
end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/TrackingBundle/DependencyInjection/CoreShopTrackingExtension.php b/src/CoreShop/Bundle/TrackingBundle/DependencyInjection/CoreShopTrackingExtension.php
index f4978cfd89..6e8130c2e9 100644
--- a/src/CoreShop/Bundle/TrackingBundle/DependencyInjection/CoreShopTrackingExtension.php
+++ b/src/CoreShop/Bundle/TrackingBundle/DependencyInjection/CoreShopTrackingExtension.php
@@ -1,17 +1,21 @@
registerForAutoconfiguration(TrackerInterface::class)
- ->addTag(TrackerPass::TRACKER_TAG);
+ ->addTag(TrackerPass::TRACKER_TAG)
+ ;
$container
->registerForAutoconfiguration(TrackingExtractorInterface::class)
- ->addTag(TrackingExtractorPass::TRACKING_EXTRACTOR_TAG);
+ ->addTag(TrackingExtractorPass::TRACKING_EXTRACTOR_TAG)
+ ;
}
protected function configureTrackers(array $configs, ContainerBuilder $container): void
@@ -54,10 +60,12 @@ protected function configureTrackers(array $configs, ContainerBuilder $container
if (!array_key_exists($type, $configs['trackers'])) {
$container->getDefinition($id)
- ->addMethodCall('setEnabled', [false]);
+ ->addMethodCall('setEnabled', [false])
+ ;
} else {
$container->getDefinition($id)
- ->addMethodCall('setEnabled', [$configs['trackers'][$type]['enabled']]);
+ ->addMethodCall('setEnabled', [$configs['trackers'][$type]['enabled']])
+ ;
}
}
}
diff --git a/src/CoreShop/Bundle/TrackingBundle/EventListener/GtmDataLayerBlockListener.php b/src/CoreShop/Bundle/TrackingBundle/EventListener/GtmDataLayerBlockListener.php
index a459d9ec5a..78ca8c75f2 100644
--- a/src/CoreShop/Bundle/TrackingBundle/EventListener/GtmDataLayerBlockListener.php
+++ b/src/CoreShop/Bundle/TrackingBundle/EventListener/GtmDataLayerBlockListener.php
@@ -1,17 +1,21 @@
configureOptions($resolver);
@@ -57,7 +61,7 @@ protected function configureOptions(OptionsResolver $resolver): void
$resolver->setDefaults(
[
'template_extension' => 'twig',
- ]
+ ],
);
$resolver->setAllowedTypes('template_prefix', 'string');
@@ -70,7 +74,7 @@ protected function getTemplatePath(string $name): string
'%s/%s.js.%s',
$this->templatePrefix,
$name,
- $this->templateExtension
+ $this->templateExtension,
);
}
@@ -78,7 +82,7 @@ protected function renderTemplate(string $name, array $parameters): string
{
return $this->twig->render(
$this->getTemplatePath($name),
- $parameters
+ $parameters,
);
}
diff --git a/src/CoreShop/Bundle/TrackingBundle/Tracker/Google/AnalyticsEnhancedEcommerce.php b/src/CoreShop/Bundle/TrackingBundle/Tracker/Google/AnalyticsEnhancedEcommerce.php
index 3aff4bd303..e14cc4d0a0 100644
--- a/src/CoreShop/Bundle/TrackingBundle/Tracker/Google/AnalyticsEnhancedEcommerce.php
+++ b/src/CoreShop/Bundle/TrackingBundle/Tracker/Google/AnalyticsEnhancedEcommerce.php
@@ -1,17 +1,21 @@
get('gtagcode');
+ return (bool) $config->get('gtagcode');
}
}
diff --git a/src/CoreShop/Bundle/TrackingBundle/Tracker/Google/GlobalSiteTagEnhancedEcommerce.php b/src/CoreShop/Bundle/TrackingBundle/Tracker/Google/GlobalSiteTagEnhancedEcommerce.php
index a4e7670f55..401d153231 100644
--- a/src/CoreShop/Bundle/TrackingBundle/Tracker/Google/GlobalSiteTagEnhancedEcommerce.php
+++ b/src/CoreShop/Bundle/TrackingBundle/Tracker/Google/GlobalSiteTagEnhancedEcommerce.php
@@ -1,17 +1,21 @@
get('gtagcode');
+ return (bool) $config->get('gtagcode');
}
}
diff --git a/src/CoreShop/Bundle/TrackingBundle/Tracker/Google/TagManager/CodeTracker.php b/src/CoreShop/Bundle/TrackingBundle/Tracker/Google/TagManager/CodeTracker.php
index c4d78b02a1..e899ce0ab5 100644
--- a/src/CoreShop/Bundle/TrackingBundle/Tracker/Google/TagManager/CodeTracker.php
+++ b/src/CoreShop/Bundle/TrackingBundle/Tracker/Google/TagManager/CodeTracker.php
@@ -1,17 +1,21 @@
get('gtagcode');
+ return (bool) $config->get('gtagcode');
}
protected function transformOrder(array $actionData): array
diff --git a/src/CoreShop/Bundle/UserBundle/CoreShopUserBundle.php b/src/CoreShop/Bundle/UserBundle/CoreShopUserBundle.php
index 882b34b160..8b73a35a11 100644
--- a/src/CoreShop/Bundle/UserBundle/CoreShopUserBundle.php
+++ b/src/CoreShop/Bundle/UserBundle/CoreShopUserBundle.php
@@ -1,17 +1,21 @@
children()
->scalarNode('driver')->defaultValue(CoreShopResourceBundle::DRIVER_DOCTRINE_ORM)->end()
- ->end();
+ ->end()
+ ;
$this->addStack($rootNode);
$this->addModelsSection($rootNode);
@@ -69,7 +74,8 @@ private function addModelsSection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
private function addStack(ArrayNodeDefinition $node): void
@@ -81,7 +87,8 @@ private function addStack(ArrayNodeDefinition $node): void
->scalarNode('user')->defaultValue(UserInterface::class)->cannotBeEmpty()->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
@@ -108,6 +115,7 @@ private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/UserBundle/DependencyInjection/CoreShopUserExtension.php b/src/CoreShop/Bundle/UserBundle/DependencyInjection/CoreShopUserExtension.php
index 80bb44c3f1..e0db153ebb 100644
--- a/src/CoreShop/Bundle/UserBundle/DependencyInjection/CoreShopUserExtension.php
+++ b/src/CoreShop/Bundle/UserBundle/DependencyInjection/CoreShopUserExtension.php
@@ -1,17 +1,21 @@
'coreshop.form.user.password.must_match',
'first_options' => ['label' => 'coreshop.form.user.new_password'],
'second_options' => ['label' => 'coreshop.form.user.new_password_repeat'],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/UserBundle/Form/Type/RequestResetPasswordType.php b/src/CoreShop/Bundle/UserBundle/Form/Type/RequestResetPasswordType.php
index d015048c66..738aa29fc5 100644
--- a/src/CoreShop/Bundle/UserBundle/Form/Type/RequestResetPasswordType.php
+++ b/src/CoreShop/Bundle/UserBundle/Form/Type/RequestResetPasswordType.php
@@ -1,17 +1,21 @@
add($identifier, $typeClass, [
'label' => sprintf('coreshop.form.customer.%s', $identifier),
'constraints' => [
- new NotBlank()
+ new NotBlank(),
],
]);
}
diff --git a/src/CoreShop/Bundle/UserBundle/Form/Type/ResetPasswordType.php b/src/CoreShop/Bundle/UserBundle/Form/Type/ResetPasswordType.php
index c23fa87e03..94c404f84d 100644
--- a/src/CoreShop/Bundle/UserBundle/Form/Type/ResetPasswordType.php
+++ b/src/CoreShop/Bundle/UserBundle/Form/Type/ResetPasswordType.php
@@ -1,17 +1,21 @@
PasswordType::class,
'first_options' => ['label' => 'coreshop.form.user.password'],
'second_options' => ['label' => 'coreshop.form.user.password_repeat'],
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/UserBundle/Form/Type/UserLoginType.php b/src/CoreShop/Bundle/UserBundle/Form/Type/UserLoginType.php
index 67c13f2704..bcfafa0675 100644
--- a/src/CoreShop/Bundle/UserBundle/Form/Type/UserLoginType.php
+++ b/src/CoreShop/Bundle/UserBundle/Form/Type/UserLoginType.php
@@ -1,17 +1,21 @@
add('_remember_me', CheckboxType::class, [
'label' => 'coreshop.form.login.remember_me',
'required' => false,
- ]);
+ ])
+ ;
}
public function getBlockPrefix(): string
diff --git a/src/CoreShop/Bundle/UserBundle/Pimcore/Repository/UserRepository.php b/src/CoreShop/Bundle/UserBundle/Pimcore/Repository/UserRepository.php
index dc1cccb478..18272dede8 100644
--- a/src/CoreShop/Bundle/UserBundle/Pimcore/Repository/UserRepository.php
+++ b/src/CoreShop/Bundle/UserBundle/Pimcore/Repository/UserRepository.php
@@ -1,17 +1,21 @@
children()
->scalarNode('redirect_to_main_variant')->defaultTrue()
- ->end();
+ ->end()
+ ;
return $treeBuilder;
}
@@ -55,7 +60,8 @@ private function addStack(ArrayNodeDefinition $node): void
->scalarNode('attribute')->defaultValue(AttributeInterface::class)->cannotBeEmpty()->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
private function addModelsSection(ArrayNodeDefinition $node): void
@@ -118,7 +124,8 @@ private function addModelsSection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
@@ -145,6 +152,7 @@ private function addPimcoreResourcesSection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/VariantBundle/DependencyInjection/CoreShopVariantExtension.php b/src/CoreShop/Bundle/VariantBundle/DependencyInjection/CoreShopVariantExtension.php
index 7d64e65ccc..3fb874f73e 100644
--- a/src/CoreShop/Bundle/VariantBundle/DependencyInjection/CoreShopVariantExtension.php
+++ b/src/CoreShop/Bundle/VariantBundle/DependencyInjection/CoreShopVariantExtension.php
@@ -1,17 +1,21 @@
processConfiguration($this->getConfiguration([], $container), $configs);
- $loader = new YamlFileLoader($container, new FileLocator(__DIR__.'/../Resources/config'));
+ $loader = new YamlFileLoader($container, new FileLocator(__DIR__ . '/../Resources/config'));
//$this->registerResources('coreshop', CoreShopResourceBundle::DRIVER_DOCTRINE_ORM, $config['resources'], $container);
$this->registerPimcoreModels('coreshop', $configs['pimcore'], $container);
diff --git a/src/CoreShop/Bundle/VariantBundle/EventListener/AttributeListener.php b/src/CoreShop/Bundle/VariantBundle/EventListener/AttributeListener.php
index d0e1493cd9..1c282af621 100644
--- a/src/CoreShop/Bundle/VariantBundle/EventListener/AttributeListener.php
+++ b/src/CoreShop/Bundle/VariantBundle/EventListener/AttributeListener.php
@@ -1,17 +1,21 @@
setAttributeGroup($parent);
+
break;
}
-
- } while($parent != null);
+ } while ($parent != null);
$this->validate($object);
}
@@ -71,13 +77,13 @@ private function validate(AttributeInterface $object)
if (count($result) > 0) {
$validationExceptions[] = new NiceValidationException(implode(
- PHP_EOL,
+ \PHP_EOL,
array_map(static function (ConstraintViolationInterface $violation) {
return $violation->getMessage();
- }, iterator_to_array($result))
+ }, iterator_to_array($result)),
));
- throw new ValidationException(implode(PHP_EOL, array_map(static function (ValidationException $exception) { return $exception->getMessage(); }, $validationExceptions)));
+ throw new ValidationException(implode(\PHP_EOL, array_map(static function (ValidationException $exception) { return $exception->getMessage(); }, $validationExceptions)));
}
}
}
diff --git a/src/CoreShop/Bundle/VariantBundle/EventListener/MainVariantListener.php b/src/CoreShop/Bundle/VariantBundle/EventListener/MainVariantListener.php
index 54f4f87153..55713a8d79 100644
--- a/src/CoreShop/Bundle/VariantBundle/EventListener/MainVariantListener.php
+++ b/src/CoreShop/Bundle/VariantBundle/EventListener/MainVariantListener.php
@@ -1,17 +1,21 @@
getObject();
@@ -75,7 +82,7 @@ public function preUpdate(DataObjectEvent $dataObjectEvent): void
$name = sprintf(
'%s %s',
$parent->getName($language),
- implode(' ', array_map(static fn(AttributeInterface $a) => $a->getName($language), $object->getAttributes()))
+ implode(' ', array_map(static fn (AttributeInterface $a) => $a->getName($language), $object->getAttributes())),
);
$object->setName($name, $language);
}
@@ -90,13 +97,13 @@ private function validate(ProductVariantAwareInterface $object)
if (count($result) > 0) {
$validationExceptions[] = new NiceValidationException(implode(
- PHP_EOL,
+ \PHP_EOL,
array_map(static function (ConstraintViolationInterface $violation) {
return $violation->getMessage();
- }, iterator_to_array($result))
+ }, iterator_to_array($result)),
));
- throw new ValidationException(implode(PHP_EOL, array_map(static function (ValidationException $exception) {
+ throw new ValidationException(implode(\PHP_EOL, array_map(static function (ValidationException $exception) {
return $exception->getMessage();
}, $validationExceptions)));
}
diff --git a/src/CoreShop/Bundle/VariantBundle/Pimcore/VariantLinkGenerator.php b/src/CoreShop/Bundle/VariantBundle/Pimcore/VariantLinkGenerator.php
index a8e803681e..bf8b45727b 100644
--- a/src/CoreShop/Bundle/VariantBundle/Pimcore/VariantLinkGenerator.php
+++ b/src/CoreShop/Bundle/VariantBundle/Pimcore/VariantLinkGenerator.php
@@ -1,17 +1,21 @@
inner->generate($mainVariant, $params);
}
-}
\ No newline at end of file
+}
diff --git a/src/CoreShop/Bundle/VariantBundle/Twig/Extension/VariantExtension.php b/src/CoreShop/Bundle/VariantBundle/Twig/Extension/VariantExtension.php
index 79d9e87192..5faeff7259 100644
--- a/src/CoreShop/Bundle/VariantBundle/Twig/Extension/VariantExtension.php
+++ b/src/CoreShop/Bundle/VariantBundle/Twig/Extension/VariantExtension.php
@@ -1,17 +1,21 @@
getAttributeGroup();
@@ -49,16 +53,18 @@ public function validate($value, Constraint $constraint): void
}
$concreteListing = new DataObject\Listing();
- $concreteListing->setCondition('o_path LIKE \''.$parent->getFullPath().'/%\'');
+ $concreteListing->setCondition('o_path LIKE \'' . $parent->getFullPath() . '/%\'');
foreach ($concreteListing as $child) {
if (!$child instanceof AttributeInterface) {
continue;
}
-
+
if (!$value instanceof $child) {
$this->context->buildViolation($constraint->message)
- ->addViolation();
+ ->addViolation()
+ ;
+
break;
}
}
diff --git a/src/CoreShop/Bundle/VariantBundle/Validator/Constraints/ValidAttributesValidator.php b/src/CoreShop/Bundle/VariantBundle/Validator/Constraints/ValidAttributesValidator.php
index 5becaed078..4e93069a89 100644
--- a/src/CoreShop/Bundle/VariantBundle/Validator/Constraints/ValidAttributesValidator.php
+++ b/src/CoreShop/Bundle/VariantBundle/Validator/Constraints/ValidAttributesValidator.php
@@ -1,17 +1,21 @@
scalarNode('wishlist_product')->defaultValue(WishlistProductInterface::class)->cannotBeEmpty()->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
private function addModelsSection(ArrayNodeDefinition $node): void
@@ -94,6 +111,7 @@ private function addModelsSection(ArrayNodeDefinition $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/WishlistBundle/DependencyInjection/CoreShopWishlistExtension.php b/src/CoreShop/Bundle/WishlistBundle/DependencyInjection/CoreShopWishlistExtension.php
index 30e43a5e10..cd89114f86 100644
--- a/src/CoreShop/Bundle/WishlistBundle/DependencyInjection/CoreShopWishlistExtension.php
+++ b/src/CoreShop/Bundle/WishlistBundle/DependencyInjection/CoreShopWishlistExtension.php
@@ -1,17 +1,21 @@
false,
'label' => 'coreshop.form.wishlist.items',
])
- ->add('submit', SubmitType::class);
+ ->add('submit', SubmitType::class)
+ ;
}
public function configureOptions(OptionsResolver $resolver): void
@@ -49,4 +54,3 @@ public function getBlockPrefix(): string
return 'coreshop_wishlist';
}
}
-
diff --git a/src/CoreShop/Bundle/WishlistBundle/Pimcore/Repository/WishlistItemRepository.php b/src/CoreShop/Bundle/WishlistBundle/Pimcore/Repository/WishlistItemRepository.php
index 0e8d7c754b..3eb6df7de7 100644
--- a/src/CoreShop/Bundle/WishlistBundle/Pimcore/Repository/WishlistItemRepository.php
+++ b/src/CoreShop/Bundle/WishlistBundle/Pimcore/Repository/WishlistItemRepository.php
@@ -1,17 +1,21 @@
arrayNode('state_machine')
->useAttributeAsKey('name')
->arrayPrototype()
- ->children();
+ ->children()
+ ;
$this->addStateMachineSection($smNode);
$this->addColorSection($smNode);
@@ -115,7 +120,8 @@ private function addStateMachineSection(NodeBuilder $node): void
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
private function addColorSection(NodeBuilder $node): void
@@ -124,19 +130,22 @@ private function addColorSection(NodeBuilder $node): void
->arrayNode('place_colors')
->useAttributeAsKey('name')
->prototype('scalar')->end()
- ->end();
+ ->end()
+ ;
$node
->arrayNode('transition_colors')
->useAttributeAsKey('name')
->prototype('scalar')->end()
- ->end();
+ ->end()
+ ;
}
private function addCallBackSection(NodeBuilder $node): void
{
$callbacks = $node
- ->arrayNode('callbacks');
+ ->arrayNode('callbacks')
+ ;
$this->addSubCallbackSection($callbacks, 'guard');
$this->addSubCallbackSection($callbacks, 'before');
@@ -161,6 +170,7 @@ private function addSubCallbackSection(ArrayNodeDefinition $callbacks, string $t
->end()
->end()
->end()
- ->end();
+ ->end()
+ ;
}
}
diff --git a/src/CoreShop/Bundle/WorkflowBundle/DependencyInjection/CoreShopWorkflowExtension.php b/src/CoreShop/Bundle/WorkflowBundle/DependencyInjection/CoreShopWorkflowExtension.php
index 43f151f0d9..237e19b4f7 100644
--- a/src/CoreShop/Bundle/WorkflowBundle/DependencyInjection/CoreShopWorkflowExtension.php
+++ b/src/CoreShop/Bundle/WorkflowBundle/DependencyInjection/CoreShopWorkflowExtension.php
@@ -1,17 +1,21 @@
allowedTransitions = $allowedTransitions;
}
diff --git a/src/CoreShop/Bundle/WorkflowBundle/EventListener/WorkflowListener.php b/src/CoreShop/Bundle/WorkflowBundle/EventListener/WorkflowListener.php
index 3919e08341..0c2577955d 100644
--- a/src/CoreShop/Bundle/WorkflowBundle/EventListener/WorkflowListener.php
+++ b/src/CoreShop/Bundle/WorkflowBundle/EventListener/WorkflowListener.php
@@ -1,17 +1,21 @@
$this->container,
]);
},
- $callableArgs
+ $callableArgs,
);
}
diff --git a/src/CoreShop/Bundle/WorkflowBundle/History/HistoryLogger.php b/src/CoreShop/Bundle/WorkflowBundle/History/HistoryLogger.php
index a889dc1e10..043315e9d5 100644
--- a/src/CoreShop/Bundle/WorkflowBundle/History/HistoryLogger.php
+++ b/src/CoreShop/Bundle/WorkflowBundle/History/HistoryLogger.php
@@ -1,17 +1,21 @@
noteService->createPimcoreNoteInstance($object, $this->noteIdentifier);
@@ -42,8 +49,8 @@ public function log(
sprintf(
'%s: %s',
$this->translator->trans('coreshop_workflow_history_logger_prefix', [], 'admin'),
- $message
- )
+ $message,
+ ),
);
if (null !== $description) {
diff --git a/src/CoreShop/Bundle/WorkflowBundle/History/HistoryLoggerInterface.php b/src/CoreShop/Bundle/WorkflowBundle/History/HistoryLoggerInterface.php
index 78ce7b6997..85199c253e 100644
--- a/src/CoreShop/Bundle/WorkflowBundle/History/HistoryLoggerInterface.php
+++ b/src/CoreShop/Bundle/WorkflowBundle/History/HistoryLoggerInterface.php
@@ -1,17 +1,21 @@
translator->trans('coreshop_workflow_state_changed_from', [], 'admin'),
$this->translator->trans($fromValue, [], 'admin'),
$this->translator->trans('coreshop_workflow_state_changed_to', [], 'admin'),
- $this->translator->trans($toValue, [], 'admin')
- )
+ $this->translator->trans($toValue, [], 'admin'),
+ ),
);
$note->addData('workflow', 'text', $event->getWorkflowName());
diff --git a/src/CoreShop/Bundle/WorkflowBundle/History/StateHistoryLoggerInterface.php b/src/CoreShop/Bundle/WorkflowBundle/History/StateHistoryLoggerInterface.php
index a2907f0970..27a6781f81 100644
--- a/src/CoreShop/Bundle/WorkflowBundle/History/StateHistoryLoggerInterface.php
+++ b/src/CoreShop/Bundle/WorkflowBundle/History/StateHistoryLoggerInterface.php
@@ -1,17 +1,21 @@
*/
private PriorityQueue $countryContexts;
diff --git a/src/CoreShop/Component/Address/Context/CountryContextInterface.php b/src/CoreShop/Component/Address/Context/CountryContextInterface.php
index 29dacf72fd..220f401e4b 100644
--- a/src/CoreShop/Component/Address/Context/CountryContextInterface.php
+++ b/src/CoreShop/Component/Address/Context/CountryContextInterface.php
@@ -1,17 +1,21 @@
*/
private PriorityQueue $requestResolvers;
diff --git a/src/CoreShop/Component/Address/Context/RequestBased/CountryContext.php b/src/CoreShop/Component/Address/Context/RequestBased/CountryContext.php
index a9b9061656..c8ab3726ee 100644
--- a/src/CoreShop/Component/Address/Context/RequestBased/CountryContext.php
+++ b/src/CoreShop/Component/Address/Context/RequestBased/CountryContext.php
@@ -1,17 +1,21 @@
cache->load($cacheKey)) {
- $country = $this->countryRepository->findByCode((string)$countryIsoCode);
+ $country = $this->countryRepository->findByCode((string) $countryIsoCode);
if ($country instanceof CountryInterface) {
return $country;
diff --git a/src/CoreShop/Component/Address/Context/RequestBased/RequestResolverInterface.php b/src/CoreShop/Component/Address/Context/RequestBased/RequestResolverInterface.php
index 7195871ddd..0f987a3028 100644
--- a/src/CoreShop/Component/Address/Context/RequestBased/RequestResolverInterface.php
+++ b/src/CoreShop/Component/Address/Context/RequestBased/RequestResolverInterface.php
@@ -1,17 +1,21 @@
getName();
+ return (string) $this->getName();
}
public function getId()
diff --git a/src/CoreShop/Component/Address/Model/CountryInterface.php b/src/CoreShop/Component/Address/Model/CountryInterface.php
index 4a5aed4ef8..0f6ee71b7c 100644
--- a/src/CoreShop/Component/Address/Model/CountryInterface.php
+++ b/src/CoreShop/Component/Address/Model/CountryInterface.php
@@ -1,17 +1,21 @@
getDiscount($cart, $configuration);
@@ -49,7 +56,7 @@ public function applyRule(
public function unApplyRule(
OrderInterface $cart,
array $configuration,
- PriceRuleItemInterface $cartPriceRuleItem
+ PriceRuleItemInterface $cartPriceRuleItem,
): bool {
return true;
}
@@ -74,7 +81,7 @@ protected function getDiscount(OrderInterface $cart, array $configuration): int
return $this->moneyConverter->convert(
$this->getApplicableAmount($cartAmount, $amount),
$currency->getIsoCode(),
- $cart->getCurrency()->getIsoCode()
+ $cart->getCurrency()->getIsoCode(),
);
}
diff --git a/src/CoreShop/Component/Core/Cart/Rule/Action/DiscountPercentActionProcessor.php b/src/CoreShop/Component/Core/Cart/Rule/Action/DiscountPercentActionProcessor.php
index fd352b2c1b..b577b97e08 100644
--- a/src/CoreShop/Component/Core/Cart/Rule/Action/DiscountPercentActionProcessor.php
+++ b/src/CoreShop/Component/Core/Cart/Rule/Action/DiscountPercentActionProcessor.php
@@ -1,17 +1,21 @@
getSubtotal($withTax);
- $amount = (int)round(($configuration['percent'] / 100) * $total);
+ $amount = (int) round(($configuration['percent'] / 100) * $total);
return $this->getApplicableAmount($amount, $amount);
}
diff --git a/src/CoreShop/Component/Core/Cart/Rule/Action/FreeShippingActionProcessor.php b/src/CoreShop/Component/Core/Cart/Rule/Action/FreeShippingActionProcessor.php
index a8f872028f..d19917c0b6 100644
--- a/src/CoreShop/Component/Core/Cart/Rule/Action/FreeShippingActionProcessor.php
+++ b/src/CoreShop/Component/Core/Cart/Rule/Action/FreeShippingActionProcessor.php
@@ -1,17 +1,21 @@
getCartPriceRule()->getName(),
0,
0,
- true
+ true,
);
$item->addAdjustment($adjustment);
diff --git a/src/CoreShop/Component/Core/Cart/Rule/Action/SurchargeAmountActionProcessor.php b/src/CoreShop/Component/Core/Cart/Rule/Action/SurchargeAmountActionProcessor.php
index b926901711..a512f48bfe 100644
--- a/src/CoreShop/Component/Core/Cart/Rule/Action/SurchargeAmountActionProcessor.php
+++ b/src/CoreShop/Component/Core/Cart/Rule/Action/SurchargeAmountActionProcessor.php
@@ -1,17 +1,21 @@
getDiscount($cart, $configuration);
@@ -48,7 +55,7 @@ public function applyRule(
public function unApplyRule(
OrderInterface $cart,
array $configuration,
- PriceRuleItemInterface $cartPriceRuleItem
+ PriceRuleItemInterface $cartPriceRuleItem,
): bool {
return true;
}
@@ -66,7 +73,7 @@ protected function getDiscount(OrderInterface $cart, array $configuration): int
return $this->moneyConverter->convert(
$amount,
$currency->getIsoCode(),
- $cart->getCurrency()->getIsoCode()
+ $cart->getCurrency()->getIsoCode(),
);
}
}
diff --git a/src/CoreShop/Component/Core/Cart/Rule/Action/SurchargePercentActionProcessor.php b/src/CoreShop/Component/Core/Cart/Rule/Action/SurchargePercentActionProcessor.php
index d8331b9cd8..881a93ca66 100644
--- a/src/CoreShop/Component/Core/Cart/Rule/Action/SurchargePercentActionProcessor.php
+++ b/src/CoreShop/Component/Core/Cart/Rule/Action/SurchargePercentActionProcessor.php
@@ -1,17 +1,21 @@
getSubtotal(false);
- $amount = (int)round(($configuration['percent'] / 100) * $total);
+ $amount = (int) round(($configuration['percent'] / 100) * $total);
return $this->getApplicableAmount($amount, $amount);
}
diff --git a/src/CoreShop/Component/Core/Cart/Rule/Action/VoucherCreditActionProcessor.php b/src/CoreShop/Component/Core/Cart/Rule/Action/VoucherCreditActionProcessor.php
index b78866ae9f..4d8517e42a 100644
--- a/src/CoreShop/Component/Core/Cart/Rule/Action/VoucherCreditActionProcessor.php
+++ b/src/CoreShop/Component/Core/Cart/Rule/Action/VoucherCreditActionProcessor.php
@@ -1,17 +1,21 @@
getVoucherCode()) {
return false;
@@ -51,7 +58,7 @@ public function applyRule(
$discount = $this->moneyConverter->convert(
$discount,
$voucherCode->getCreditCurrency()->getIsoCode(),
- $cart->getCurrency()->getIsoCode()
+ $cart->getCurrency()->getIsoCode(),
);
if ($discount <= 0) {
@@ -66,7 +73,7 @@ public function applyRule(
public function unApplyRule(
OrderInterface $cart,
array $configuration,
- PriceRuleItemInterface $cartPriceRuleItem
+ PriceRuleItemInterface $cartPriceRuleItem,
): bool {
return true;
}
diff --git a/src/CoreShop/Component/Core/Cart/Rule/Applier/CartRuleApplier.php b/src/CoreShop/Component/Core/Cart/Rule/Applier/CartRuleApplier.php
index 04b8f02414..2db2debe5b 100644
--- a/src/CoreShop/Component/Core/Cart/Rule/Applier/CartRuleApplier.php
+++ b/src/CoreShop/Component/Core/Cart/Rule/Applier/CartRuleApplier.php
@@ -1,17 +1,21 @@
getTotal(false);
$totalDiscountPossible += $item->getTotal($withTax);
}
-
+
$discount = min($discount, $totalDiscountPossible);
-
+
if (0 === $discount) {
return;
}
@@ -93,7 +96,7 @@ protected function apply(OrderInterface $cart, PriceRuleItemInterface $cartPrice
$taxCalculator = $this->taxCalculatorFactory->getTaxCalculator(
$item->getProduct(),
$cart->getShippingAddress() ?: $this->defaultAddressProvider->getAddress($cart),
- $context
+ $context,
);
if ($taxCalculator instanceof TaxCalculatorInterface) {
@@ -119,9 +122,9 @@ protected function apply(OrderInterface $cart, PriceRuleItemInterface $cartPrice
$totalDiscountGross += $itemDiscountGross;
}
- $totalDiscountNet = (int)round($totalDiscountNet);
- $totalDiscountGross = (int)round($totalDiscountGross);
- $totalDiscountFloat = (int)round($totalDiscountFloat);
+ $totalDiscountNet = (int) round($totalDiscountNet);
+ $totalDiscountGross = (int) round($totalDiscountGross);
+ $totalDiscountFloat = (int) round($totalDiscountFloat);
//Add missing cents caused by rounding issues
if ($totalDiscountFloat > ($withTax ? $totalDiscountNet : $totalDiscountGross)) {
@@ -154,7 +157,7 @@ protected function apply(OrderInterface $cart, PriceRuleItemInterface $cartPrice
$taxCalculator = $this->taxCalculatorFactory->getTaxCalculator(
$item->getProduct(),
$cart->getShippingAddress() ?: $this->defaultAddressProvider->getAddress($cart),
- $context
+ $context,
);
if ($taxCalculator instanceof TaxCalculatorInterface) {
@@ -166,8 +169,8 @@ protected function apply(OrderInterface $cart, PriceRuleItemInterface $cartPrice
$this->taxCollector->collectTaxesFromGross(
$taxCalculator,
($positive ? $amountGross : -1 * $amountGross),
- $taxItems->getItems()
- )
+ $taxItems->getItems(),
+ ),
);
} else {
/** @psalm-suppress InvalidArgument */
@@ -175,8 +178,8 @@ protected function apply(OrderInterface $cart, PriceRuleItemInterface $cartPrice
$this->taxCollector->collectTaxes(
$taxCalculator,
($positive ? $amountNet : -1 * $amountNet),
- $taxItems->getItems()
- )
+ $taxItems->getItems(),
+ ),
);
}
}
@@ -185,7 +188,7 @@ protected function apply(OrderInterface $cart, PriceRuleItemInterface $cartPrice
AdjustmentInterface::CART_PRICE_RULE,
$cartPriceRuleItem->getCartPriceRule()->getName(),
$positive ? $amountGross : (-1 * $amountGross),
- $positive ? $amountNet : (-1 * $amountNet)
+ $positive ? $amountNet : (-1 * $amountNet),
));
}
@@ -197,8 +200,8 @@ protected function apply(OrderInterface $cart, PriceRuleItemInterface $cartPrice
AdjustmentInterface::CART_PRICE_RULE,
$cartPriceRuleItem->getCartPriceRule()->getName(),
$cartPriceRuleItem->getDiscount(true),
- $cartPriceRuleItem->getDiscount(false)
- )
+ $cartPriceRuleItem->getDiscount(false),
+ ),
);
}
}
diff --git a/src/CoreShop/Component/Core/Cart/Rule/Applier/CartRuleApplierInterface.php b/src/CoreShop/Component/Core/Cart/Rule/Applier/CartRuleApplierInterface.php
index 99e8efb9ed..2299681db3 100644
--- a/src/CoreShop/Component/Core/Cart/Rule/Applier/CartRuleApplierInterface.php
+++ b/src/CoreShop/Component/Core/Cart/Rule/Applier/CartRuleApplierInterface.php
@@ -1,17 +1,21 @@
getCategoriesToCheck(
$configuration['categories'],
$cart->getStore(),
- $configuration['recursive'] ?: false
+ $configuration['recursive'] ?: false,
);
foreach ($cart->getItems() as $item) {
diff --git a/src/CoreShop/Component/Core/Cart/Rule/Condition/CountriesConditionChecker.php b/src/CoreShop/Component/Core/Cart/Rule/Condition/CountriesConditionChecker.php
index 453559dbf7..e4832a0d47 100644
--- a/src/CoreShop/Component/Core/Cart/Rule/Condition/CountriesConditionChecker.php
+++ b/src/CoreShop/Component/Core/Cart/Rule/Condition/CountriesConditionChecker.php
@@ -1,17 +1,21 @@
getDiscount($orderItem, $configuration);
@@ -53,7 +56,7 @@ public function applyRule(
public function unApplyRule(
OrderItemInterface $orderItem,
array $configuration,
- PriceRuleItemInterface $cartPriceRuleItem
+ PriceRuleItemInterface $cartPriceRuleItem,
): bool {
return true;
}
@@ -78,7 +81,7 @@ protected function getDiscount(OrderItemInterface $orderItem, array $configurati
return $this->moneyConverter->convert(
$this->getApplicableAmount($cartAmount, $amount),
$currency->getIsoCode(),
- $orderItem->getOrder()->getCurrency()->getIsoCode()
+ $orderItem->getOrder()->getCurrency()->getIsoCode(),
);
}
diff --git a/src/CoreShop/Component/Core/CartItem/Rule/Action/DiscountPercentActionProcessor.php b/src/CoreShop/Component/Core/CartItem/Rule/Action/DiscountPercentActionProcessor.php
index ca67e06e1e..c82c97c096 100644
--- a/src/CoreShop/Component/Core/CartItem/Rule/Action/DiscountPercentActionProcessor.php
+++ b/src/CoreShop/Component/Core/CartItem/Rule/Action/DiscountPercentActionProcessor.php
@@ -1,17 +1,21 @@
getSubtotal($withTax);
- $amount = (int)round(($configuration['percent'] / 100) * $total);
+ $amount = (int) round(($configuration['percent'] / 100) * $total);
return $this->getApplicableAmount($amount, $amount);
}
diff --git a/src/CoreShop/Component/Core/CartItem/Rule/Applier/CartItemRuleApplier.php b/src/CoreShop/Component/Core/CartItem/Rule/Applier/CartItemRuleApplier.php
index 37fbf6fea3..8e3cb7d153 100644
--- a/src/CoreShop/Component/Core/CartItem/Rule/Applier/CartItemRuleApplier.php
+++ b/src/CoreShop/Component/Core/CartItem/Rule/Applier/CartItemRuleApplier.php
@@ -1,17 +1,21 @@
apply($orderItem, $cartPriceRuleItem, $discount, $withTax, false);
}
@@ -49,7 +53,7 @@ public function applySurcharge(
OrderItemInterface $orderItem,
PriceRuleItemInterface $cartPriceRuleItem,
int $discount,
- bool $withTax = false
+ bool $withTax = false,
): void {
$this->apply($orderItem, $cartPriceRuleItem, $discount, $withTax, true);
}
@@ -59,7 +63,7 @@ protected function apply(
PriceRuleItemInterface $cartPriceRuleItem,
int $discount,
$withTax = false,
- $positive = false
+ $positive = false,
): void {
$order = $orderItem->getOrder();
$context = $this->cartContextResolver->resolveCartContext($order);
@@ -90,7 +94,7 @@ protected function apply(
$taxCalculator = $this->taxCalculatorFactory->getTaxCalculator(
$orderItem->getProduct(),
$order->getShippingAddress() ?: $this->defaultAddressProvider->getAddress($order),
- $context
+ $context,
);
if ($taxCalculator instanceof TaxCalculatorInterface) {
@@ -111,9 +115,9 @@ protected function apply(
}
}
- $itemDiscountNet = (int)round($itemDiscountNet);
- $itemDiscountGross = (int)round($itemDiscountGross);
- $discountFloat = (int)round($discountFloat);
+ $itemDiscountNet = (int) round($itemDiscountNet);
+ $itemDiscountGross = (int) round($itemDiscountGross);
+ $discountFloat = (int) round($discountFloat);
//Add missing cents caused by rounding issues
if ($discountFloat > ($withTax ? $itemDiscountNet : $itemDiscountGross)) {
@@ -136,8 +140,8 @@ protected function apply(
$this->taxCollector->collectTaxesFromGross(
$taxCalculator,
($positive ? $amountGross : -1 * $amountGross),
- $taxItems->getItems()
- )
+ $taxItems->getItems(),
+ ),
);
} else {
/** @psalm-suppress InvalidArgument */
@@ -145,8 +149,8 @@ protected function apply(
$this->taxCollector->collectTaxes(
$taxCalculator,
($positive ? $amountNet : -1 * $amountNet),
- $taxItems->getItems()
- )
+ $taxItems->getItems(),
+ ),
);
}
}
@@ -156,8 +160,8 @@ protected function apply(
AdjustmentInterface::CART_PRICE_RULE,
$cartPriceRuleItem->getCartPriceRule()->getName(),
$positive ? $amountGross : (-1 * $amountGross),
- $positive ? $amountNet : (-1 * $amountNet)
- )
+ $positive ? $amountNet : (-1 * $amountNet),
+ ),
);
$cartPriceRuleItem->setDiscount($positive ? $itemDiscountNet : (-1 * $itemDiscountNet), false);
diff --git a/src/CoreShop/Component/Core/CartItem/Rule/Applier/CartItemRuleApplierInterface.php b/src/CoreShop/Component/Core/CartItem/Rule/Applier/CartItemRuleApplierInterface.php
index 3f72cf7cca..b00d333c3d 100644
--- a/src/CoreShop/Component/Core/CartItem/Rule/Applier/CartItemRuleApplierInterface.php
+++ b/src/CoreShop/Component/Core/CartItem/Rule/Applier/CartItemRuleApplierInterface.php
@@ -1,17 +1,21 @@
getCategoriesToCheck(
$configuration['categories'],
$orderItem->getOrder()->getStore(),
- $configuration['recursive'] ?: false
+ $configuration['recursive'] ?: false,
);
$product = $orderItem->getProduct();
diff --git a/src/CoreShop/Component/Core/CartItem/Rule/Condition/ProductsConditionChecker.php b/src/CoreShop/Component/Core/CartItem/Rule/Condition/ProductsConditionChecker.php
index 79ab786f41..9ee15cf703 100644
--- a/src/CoreShop/Component/Core/CartItem/Rule/Condition/ProductsConditionChecker.php
+++ b/src/CoreShop/Component/Core/CartItem/Rule/Condition/ProductsConditionChecker.php
@@ -1,17 +1,21 @@
getProductsToCheck(
$configuration['products'],
$orderItem->getOrder()->getStore(),
- $configuration['include_variants'] ?: false
+ $configuration['include_variants'] ?: false,
);
if ($orderItem->getIsGiftItem()) {
diff --git a/src/CoreShop/Component/Core/Configuration/ConfigurationService.php b/src/CoreShop/Component/Core/Configuration/ConfigurationService.php
index ae89f54d33..496b9ca458 100644
--- a/src/CoreShop/Component/Core/Configuration/ConfigurationService.php
+++ b/src/CoreShop/Component/Core/Configuration/ConfigurationService.php
@@ -1,17 +1,21 @@
getId(), $affiliation)
+ sprintf('Could not determine address path for customer with id %d with affiliation "%s"', $customer->getId(), $affiliation),
);
}
diff --git a/src/CoreShop/Component/Core/Customer/Address/AddressAssignmentManagerInterface.php b/src/CoreShop/Component/Core/Customer/Address/AddressAssignmentManagerInterface.php
index cd9f883fd4..9d410012ef 100644
--- a/src/CoreShop/Component/Core/Customer/Address/AddressAssignmentManagerInterface.php
+++ b/src/CoreShop/Component/Core/Customer/Address/AddressAssignmentManagerInterface.php
@@ -1,17 +1,21 @@
folderCreationService->createFolderForResource(
$address,
- ['prefix' => $rootPath]
+ ['prefix' => $rootPath],
);
}
@@ -82,8 +88,8 @@ public function moveCustomerToNewCompany(CustomerInterface $customer, array $tra
$company->setParent(
$this->folderCreationService->createFolderForResource(
$company,
- ['suffix' => mb_strtoupper(mb_substr($customer->getLastname(), 0, 1))]
- )
+ ['suffix' => mb_strtoupper(mb_substr($customer->getLastname(), 0, 1))],
+ ),
);
/** @psalm-suppress InternalMethod */
@@ -174,7 +180,7 @@ private function removeAddressRelations(AddressInterface $address): void
$dependenciesObjects = [];
/** @psalm-suppress InternalClass,InternalMethod */
- $dependenciesResult = Dependency::getBySourceId((int)$address->getId(), 'object');
+ $dependenciesResult = Dependency::getBySourceId((int) $address->getId(), 'object');
/** @psalm-suppress InternalMethod */
foreach ($dependenciesResult->getRequiredBy() as $r) {
@@ -245,6 +251,6 @@ private function forceSave(mixed $element, bool $useVersioning = true): void
private function isNewEntity(ElementInterface $element): bool
{
- return is_null($element->getId()) || $element->getId() === 0;
+ return null === $element->getId() || $element->getId() === 0;
}
}
diff --git a/src/CoreShop/Component/Core/Customer/CustomerTransformHelperInterface.php b/src/CoreShop/Component/Core/Customer/CustomerTransformHelperInterface.php
index f297565ed7..ea45412527 100644
--- a/src/CoreShop/Component/Core/Customer/CustomerTransformHelperInterface.php
+++ b/src/CoreShop/Component/Core/Customer/CustomerTransformHelperInterface.php
@@ -1,17 +1,21 @@
getPaymentState(),
[OrderPaymentStates::STATE_PAID, OrderPaymentStates::STATE_REFUNDED],
- true
+ true,
)) {
$this->giveBack($order);
@@ -56,7 +60,7 @@ public function hold(OrderInterface $order): void
continue;
}
- $product->setOnHold($product->getOnHold() + (int)ceil($orderItem->getDefaultUnitQuantity()));
+ $product->setOnHold($product->getOnHold() + (int) ceil($orderItem->getDefaultUnitQuantity()));
$this->productEntityManager->persist($product);
}
@@ -78,25 +82,25 @@ public function sell(OrderInterface $order): void
}
Assert::greaterThanEq(
- ($product->getOnHold() - (int)ceil($orderItem->getDefaultUnitQuantity())),
+ ($product->getOnHold() - (int) ceil($orderItem->getDefaultUnitQuantity())),
0,
sprintf(
'Not enough units to decrease on hold quantity from the inventory of a product "%s".',
- $product->getName()
- )
+ $product->getName(),
+ ),
);
Assert::greaterThanEq(
- ($product->getOnHand() - (int)ceil($orderItem->getDefaultUnitQuantity())),
+ ($product->getOnHand() - (int) ceil($orderItem->getDefaultUnitQuantity())),
0,
sprintf(
'Not enough units to decrease on hand quantity from the inventory of a product "%s".',
- $product->getName()
- )
+ $product->getName(),
+ ),
);
- $product->setOnHold($product->getOnHold() - (int)ceil($orderItem->getDefaultUnitQuantity()));
- $product->setOnHand($product->getOnHand() - (int)ceil($orderItem->getDefaultUnitQuantity()));
+ $product->setOnHold($product->getOnHold() - (int) ceil($orderItem->getDefaultUnitQuantity()));
+ $product->setOnHand($product->getOnHand() - (int) ceil($orderItem->getDefaultUnitQuantity()));
$this->productEntityManager->persist($product);
}
@@ -118,14 +122,14 @@ public function release(OrderInterface $order): void
}
Assert::greaterThanEq(
- ($product->getOnHold() - (int)ceil($orderItem->getDefaultUnitQuantity())),
+ ($product->getOnHold() - (int) ceil($orderItem->getDefaultUnitQuantity())),
0,
sprintf(
'Not enough units to decrease on hold quantity from the inventory of a product "%s".',
- $product->getName()
- )
+ $product->getName(),
+ ),
);
- $product->setOnHold($product->getOnHold() - (int)ceil($orderItem->getDefaultUnitQuantity()));
+ $product->setOnHold($product->getOnHold() - (int) ceil($orderItem->getDefaultUnitQuantity()));
$this->productEntityManager->persist($product);
}
@@ -146,7 +150,7 @@ public function giveBack(OrderInterface $order): void
continue;
}
- $product->setOnHand($product->getOnHand() + (int)ceil($orderItem->getDefaultUnitQuantity()));
+ $product->setOnHand($product->getOnHand() + (int) ceil($orderItem->getDefaultUnitQuantity()));
$this->productEntityManager->persist($product);
}
diff --git a/src/CoreShop/Component/Core/Inventory/Operator/OrderInventoryOperatorInterface.php b/src/CoreShop/Component/Core/Inventory/Operator/OrderInventoryOperatorInterface.php
index 15f15c9098..4c87d2f14b 100644
--- a/src/CoreShop/Component/Core/Inventory/Operator/OrderInventoryOperatorInterface.php
+++ b/src/CoreShop/Component/Core/Inventory/Operator/OrderInventoryOperatorInterface.php
@@ -1,17 +1,21 @@
getId()];
- $this->themeHelper->useTheme($store->getTemplate(),
+ $this->themeHelper->useTheme(
+ $store->getTemplate(),
function () use ($subject, $rule, $subConfiguration, $params) {
$this->mailActionProcessor->apply($subject, $rule, $subConfiguration, $params);
- }
+ },
);
}
}
diff --git a/src/CoreShop/Component/Core/Notification/Rule/Action/Order/StoreOrderMailActionProcessor.php b/src/CoreShop/Component/Core/Notification/Rule/Action/Order/StoreOrderMailActionProcessor.php
index 1bcadf0e85..83acc978e4 100644
--- a/src/CoreShop/Component/Core/Notification/Rule/Action/Order/StoreOrderMailActionProcessor.php
+++ b/src/CoreShop/Component/Core/Notification/Rule/Action/Order/StoreOrderMailActionProcessor.php
@@ -1,17 +1,21 @@
objectCloner->cloneObject(
$originalShippingAddress,
$this->folderCreationService->createFolderForResource($originalShippingAddress, ['prefix' => $order->getFullPath()]),
'shipping',
- false
+ false,
);
/**
* @var AddressInterface $invoiceAddress
+ *
* @psalm-suppress InvalidArgument
*/
$invoiceAddress = $this->objectCloner->cloneObject(
$order->getInvoiceAddress(),
$this->folderCreationService->createFolderForResource($order->getInvoiceAddress(), ['prefix' => $order->getFullPath()]),
'invoice',
- false
+ false,
);
VersionHelper::useVersioning(function () use ($shippingAddress, $invoiceAddress) {
diff --git a/src/CoreShop/Component/Core/Order/Committer/QuoteCommitter.php b/src/CoreShop/Component/Core/Order/Committer/QuoteCommitter.php
index 2d43b37e72..86e46fc6bb 100644
--- a/src/CoreShop/Component/Core/Order/Committer/QuoteCommitter.php
+++ b/src/CoreShop/Component/Core/Order/Committer/QuoteCommitter.php
@@ -1,17 +1,21 @@
objectCloner->cloneObject(
$originalShippingAddress,
$this->folderCreationService->createFolderForResource($originalShippingAddress, ['prefix' => $order->getFullPath()]),
'shipping',
- false
+ false,
);
/**
* @var AddressInterface $invoiceAddress
+ *
* @psalm-suppress InvalidArgument
*/
$invoiceAddress = $this->objectCloner->cloneObject(
$order->getInvoiceAddress(),
$this->folderCreationService->createFolderForResource($order->getInvoiceAddress(), ['prefix' => $order->getFullPath()]),
'invoice',
- false
+ false,
);
VersionHelper::useVersioning(function () use ($shippingAddress, $invoiceAddress) {
diff --git a/src/CoreShop/Component/Core/Order/Modifier/CartItemQuantityModifier.php b/src/CoreShop/Component/Core/Order/Modifier/CartItemQuantityModifier.php
index e6e1c9b06a..875f9efefd 100644
--- a/src/CoreShop/Component/Core/Order/Modifier/CartItemQuantityModifier.php
+++ b/src/CoreShop/Component/Core/Order/Modifier/CartItemQuantityModifier.php
@@ -1,17 +1,21 @@
setAmount(
$this->convert($convertedAdjustment->getAmount(true), $cart),
- $this->convert($convertedAdjustment->getAmount(false), $cart)
+ $this->convert($convertedAdjustment->getAmount(false), $cart),
);
$item->addConvertedAdjustment($convertedAdjustment);
@@ -94,7 +98,7 @@ public function process(OrderInterface $cart): void
$convertedAdjustment = clone $adjustment;
$convertedAdjustment->setAmount(
$this->convert($convertedAdjustment->getAmount(true), $cart),
- $this->convert($convertedAdjustment->getAmount(false), $cart)
+ $this->convert($convertedAdjustment->getAmount(false), $cart),
);
$cart->addConvertedAdjustment($convertedAdjustment);
@@ -132,7 +136,7 @@ private function convert(?int $value, OrderInterface $cart): int
return $this->currencyConverter->convert(
$value,
$cart->getBaseCurrency()->getIsoCode(),
- $cart->getCurrency()->getIsoCode()
+ $cart->getCurrency()->getIsoCode(),
);
}
}
diff --git a/src/CoreShop/Component/Core/Order/Processor/CartItemProcessor.php b/src/CoreShop/Component/Core/Order/Processor/CartItemProcessor.php
index af1a55ec9a..4e8724efe2 100644
--- a/src/CoreShop/Component/Core/Order/Processor/CartItemProcessor.php
+++ b/src/CoreShop/Component/Core/Order/Processor/CartItemProcessor.php
@@ -1,17 +1,21 @@
taxCalculator->getTaxCalculator(
$product,
$cart->getShippingAddress() ?: $this->defaultAddressProvider->getAddress($cart),
- $context
+ $context,
);
$quantity = $cartItem->getQuantity();
if ($taxCalculator instanceof TaxCalculatorInterface) {
if ($store->getUseGrossPrice()) {
- $totalTaxAmount = $taxCalculator->getTaxesAmountFromGross((int)round($itemPrice * $quantity));
- $totalTaxAmountArray = $taxCalculator->getTaxesAmountFromGrossAsArray((int)round($itemPrice * $quantity));
+ $totalTaxAmount = $taxCalculator->getTaxesAmountFromGross((int) round($itemPrice * $quantity));
+ $totalTaxAmountArray = $taxCalculator->getTaxesAmountFromGrossAsArray((int) round($itemPrice * $quantity));
$itemPriceTax = $taxCalculator->getTaxesAmountFromGross($itemPrice);
$itemRetailPriceTaxAmount = $taxCalculator->getTaxesAmountFromGross($itemRetailPrice);
$itemDiscountTax = $taxCalculator->getTaxesAmountFromGross($itemDiscount);
@@ -70,7 +78,7 @@ public function processCartItem(
$cartItem->setTaxes(new Fieldcollection($taxes));
- $cartItem->setSubtotal((int)round($itemPrice * $quantity), true);
+ $cartItem->setSubtotal((int) round($itemPrice * $quantity), true);
$cartItem->setSubtotal($cartItem->getSubtotal(true) - $totalTaxAmount, false);
$cartItem->setTotal($cartItem->getSubtotal(true), true);
@@ -88,8 +96,8 @@ public function processCartItem(
$cartItem->setItemDiscount($itemDiscount, true);
$cartItem->setItemDiscount($itemDiscount - $itemDiscountTax, false);
} else {
- $totalTaxAmount = $taxCalculator->getTaxesAmount((int)round($itemPrice * $quantity));
- $totalTaxAmountArray = $taxCalculator->getTaxesAmountAsArray((int)round($itemPrice * $quantity));
+ $totalTaxAmount = $taxCalculator->getTaxesAmount((int) round($itemPrice * $quantity));
+ $totalTaxAmountArray = $taxCalculator->getTaxesAmountAsArray((int) round($itemPrice * $quantity));
$itemPriceTax = $taxCalculator->getTaxesAmount($itemPrice);
$itemRetailPriceTaxAmount = $taxCalculator->getTaxesAmount($itemRetailPrice);
$itemDiscountTax = $taxCalculator->getTaxesAmount($itemDiscount);
@@ -98,8 +106,8 @@ public function processCartItem(
$cartItem->setTaxes(new Fieldcollection($taxes));
- $cartItem->setSubtotal((int)round($itemPrice * $quantity), false);
- $cartItem->setSubtotal((int)round($itemPrice * $quantity) + $totalTaxAmount, true);
+ $cartItem->setSubtotal((int) round($itemPrice * $quantity), false);
+ $cartItem->setSubtotal((int) round($itemPrice * $quantity) + $totalTaxAmount, true);
$cartItem->setTotal($cartItem->getSubtotal(true), true);
$cartItem->setTotal($cartItem->getSubtotal(false), false);
@@ -117,8 +125,8 @@ public function processCartItem(
$cartItem->setItemDiscount($itemDiscount + $itemDiscountTax, true);
}
} else {
- $cartItem->setSubtotal((int)round($itemPrice * $quantity), false);
- $cartItem->setSubtotal((int)round($itemPrice * $quantity), true);
+ $cartItem->setSubtotal((int) round($itemPrice * $quantity), false);
+ $cartItem->setSubtotal((int) round($itemPrice * $quantity), true);
$cartItem->setTotal($cartItem->getSubtotal(true), true);
$cartItem->setTotal($cartItem->getSubtotal(false), false);
diff --git a/src/CoreShop/Component/Core/Order/Processor/CartItemsProcessor.php b/src/CoreShop/Component/Core/Order/Processor/CartItemsProcessor.php
index cdf80b57c1..be4130e638 100644
--- a/src/CoreShop/Component/Core/Order/Processor/CartItemsProcessor.php
+++ b/src/CoreShop/Component/Core/Order/Processor/CartItemsProcessor.php
@@ -1,17 +1,21 @@
getItemQuantityFactor()) && $product->getItemQuantityFactor() > 1) {
- $itemPrice = (int)round($itemPrice / $product->getItemQuantityFactor());
+ $itemPrice = (int) round($itemPrice / $product->getItemQuantityFactor());
}
if ($product instanceof QuantityRangePriceAwareInterface) {
@@ -79,7 +87,7 @@ public function process(OrderInterface $cart): void
$product,
$item->getQuantity(),
$itemPrice,
- $context
+ $context,
);
} catch (NoRuleFoundException) {
} catch (NoPriceFoundException) {
@@ -102,7 +110,7 @@ public function process(OrderInterface $cart): void
}
if ($item->getCustomItemDiscount() > 0) {
- $itemPrice = (int)round((100 - $item->getCustomItemDiscount()) / 100 * $itemPrice);
+ $itemPrice = (int) round((100 - $item->getCustomItemDiscount()) / 100 * $itemPrice);
}
$this->cartItemProcessor->processCartItem(
@@ -111,7 +119,7 @@ public function process(OrderInterface $cart): void
$itemRetailPrice,
$itemDiscountPrice,
$itemDiscount,
- $context
+ $context,
);
$subtotalGross += $item->getTotal(true);
diff --git a/src/CoreShop/Component/Core/Order/Processor/CartItemsWholesaleProcessor.php b/src/CoreShop/Component/Core/Order/Processor/CartItemsWholesaleProcessor.php
index f31810d60a..e822fb078e 100644
--- a/src/CoreShop/Component/Core/Order/Processor/CartItemsWholesaleProcessor.php
+++ b/src/CoreShop/Component/Core/Order/Processor/CartItemsWholesaleProcessor.php
@@ -1,17 +1,21 @@
setItemWholesalePrice(
- $this->wholesalePriceCalculator->getPurchasableWholesalePrice($product, $context)
+ $this->wholesalePriceCalculator->getPurchasableWholesalePrice($product, $context),
);
} catch (NoPurchasableWholesalePriceFoundException) {
$item->setItemWholesalePrice(0);
diff --git a/src/CoreShop/Component/Core/Order/Processor/CartPaymentProcessor.php b/src/CoreShop/Component/Core/Order/Processor/CartPaymentProcessor.php
index 940d9fa153..7fd65f4142 100644
--- a/src/CoreShop/Component/Core/Order/Processor/CartPaymentProcessor.php
+++ b/src/CoreShop/Component/Core/Order/Processor/CartPaymentProcessor.php
@@ -1,17 +1,21 @@
setPaymentTotal(
- (int)round((round($cart->getTotal() / $this->decimalFactor, $this->decimalPrecision) * 100), 0)
+ (int) round((round($cart->getTotal() / $this->decimalFactor, $this->decimalPrecision) * 100), 0),
);
}
}
diff --git a/src/CoreShop/Component/Core/Order/Processor/CartPriceRuleVoucherProcessor.php b/src/CoreShop/Component/Core/Order/Processor/CartPriceRuleVoucherProcessor.php
index 25ede19c95..d096ad1c90 100644
--- a/src/CoreShop/Component/Core/Order/Processor/CartPriceRuleVoucherProcessor.php
+++ b/src/CoreShop/Component/Core/Order/Processor/CartPriceRuleVoucherProcessor.php
@@ -1,17 +1,21 @@
proposalCartPriceRuleCalculator->calculatePriceRule(
$cart,
$item->getCartPriceRule(),
- $voucherCode
+ $voucherCode,
);
} else {
$this->cartPriceRuleUnProcessor->unProcess($cart, $item->getCartPriceRule(), $voucherCode);
diff --git a/src/CoreShop/Component/Core/Order/Processor/CartRuleAutoProcessor.php b/src/CoreShop/Component/Core/Order/Processor/CartRuleAutoProcessor.php
index 73577a5981..12c9b65f5d 100644
--- a/src/CoreShop/Component/Core/Order/Processor/CartRuleAutoProcessor.php
+++ b/src/CoreShop/Component/Core/Order/Processor/CartRuleAutoProcessor.php
@@ -1,17 +1,21 @@
carrierPriceCalculator->getPrice(
$cart->getCarrier(),
$cart,
$address,
false,
- $context
+ $context,
);
$cart->addAdjustment(
@@ -108,8 +118,8 @@ public function process(OrderInterface $cart): void
AdjustmentInterface::SHIPPING,
'',
$priceWithTax,
- $priceWithoutTax
- )
+ $priceWithoutTax,
+ ),
);
}
diff --git a/src/CoreShop/Component/Core/Order/Processor/CartTaxProcessor.php b/src/CoreShop/Component/Core/Order/Processor/CartTaxProcessor.php
index b2105f7fcc..1cf8ff47ac 100644
--- a/src/CoreShop/Component/Core/Order/Processor/CartTaxProcessor.php
+++ b/src/CoreShop/Component/Core/Order/Processor/CartTaxProcessor.php
@@ -1,17 +1,21 @@
taxCollector->mergeTaxes(
$item->getTaxes() instanceof Fieldcollection ? $item->getTaxes()->getItems() : [],
- $usedTaxes
+ $usedTaxes,
);
}
diff --git a/src/CoreShop/Component/Core/Order/Processor/CartTextProcessor.php b/src/CoreShop/Component/Core/Order/Processor/CartTextProcessor.php
index 5e114252fb..58b06202b2 100644
--- a/src/CoreShop/Component/Core/Order/Processor/CartTextProcessor.php
+++ b/src/CoreShop/Component/Core/Order/Processor/CartTextProcessor.php
@@ -1,17 +1,21 @@
setWeight($orderItem->getItemWeight() * $quantity);
diff --git a/src/CoreShop/Component/Core/Order/Transformer/OrderToShipmentTransformer.php b/src/CoreShop/Component/Core/Order/Transformer/OrderToShipmentTransformer.php
index 0342acfb8b..5cc35b62ca 100644
--- a/src/CoreShop/Component/Core/Order/Transformer/OrderToShipmentTransformer.php
+++ b/src/CoreShop/Component/Core/Order/Transformer/OrderToShipmentTransformer.php
@@ -1,17 +1,21 @@
setWeight($order->getWeight());
diff --git a/src/CoreShop/Component/Core/Payment/Resolver/StoreBasedPaymentProviderResolver.php b/src/CoreShop/Component/Core/Payment/Resolver/StoreBasedPaymentProviderResolver.php
index c8e1d5c82d..7190b4ca58 100644
--- a/src/CoreShop/Component/Core/Payment/Resolver/StoreBasedPaymentProviderResolver.php
+++ b/src/CoreShop/Component/Core/Payment/Resolver/StoreBasedPaymentProviderResolver.php
@@ -1,17 +1,21 @@
getId() === null) {
throw new \Exception(
sprintf(
'cannot clone quantity price rules on a unsaved product (reference product id: %d.)',
- $referenceProduct->getId()
- )
+ $referenceProduct->getId(),
+ ),
);
}
@@ -43,6 +49,7 @@ public function clone(
/**
* @var Concrete&ProductInterface $referenceProduct
+ *
* @psalm-var Concrete&ProductInterface $referenceProduct
*/
$qprFieldDefinition = $referenceProduct->getClass()->getFieldDefinition('quantityPriceRules');
@@ -60,7 +67,7 @@ public function clone(
protected function reallocateRanges(
ProductInterface $product,
array $newQuantityPriceRules,
- array $oldQuantityPriceRules
+ array $oldQuantityPriceRules,
) {
if (count($oldQuantityPriceRules) !== count($newQuantityPriceRules)) {
throw new \Exception('Count of old an new rules does not match');
@@ -88,7 +95,7 @@ protected function reallocateRanges(
) {
$allocatedUnitDefinition = $this->unitMatcher->findMatchingUnitDefinitionByUnitName(
$product,
- $referenceRange->getUnitDefinition()->getUnitName()
+ $referenceRange->getUnitDefinition()->getUnitName(),
);
if (!$allocatedUnitDefinition instanceof ProductUnitDefinitionInterface) {
diff --git a/src/CoreShop/Component/Core/Product/Cloner/ProductUnitDefinitionsCloner.php b/src/CoreShop/Component/Core/Product/Cloner/ProductUnitDefinitionsCloner.php
index 06b250b9f2..494f9dda86 100644
--- a/src/CoreShop/Component/Core/Product/Cloner/ProductUnitDefinitionsCloner.php
+++ b/src/CoreShop/Component/Core/Product/Cloner/ProductUnitDefinitionsCloner.php
@@ -1,13 +1,19 @@
hasUnitDefinitions() === true && $resetExistingData === false) {
return;
@@ -34,6 +40,7 @@ public function clone(
/**
* @var Concrete&ProductInterface $referenceProduct
+ *
* @psalm-var Concrete&ProductInterface $referenceProduct
*/
$unitDefinitionsFieldDefinition = $referenceProduct->getClass()->getFieldDefinition('unitDefinitions');
@@ -50,12 +57,12 @@ public function clone(
$unitDefinitions = $unitDefinitionsFieldDefinition->createDataCopy(
$referenceProduct,
- $referenceProduct->getUnitDefinitions()
+ $referenceProduct->getUnitDefinitions(),
);
$storeValues = $storeValuesFieldDefinition->createDataCopy(
$referenceProduct,
- $referenceProduct->getStoreValues()
+ $referenceProduct->getStoreValues(),
);
$product->setUnitDefinitions($unitDefinitions);
diff --git a/src/CoreShop/Component/Core/Product/Cloner/UnitMatcher.php b/src/CoreShop/Component/Core/Product/Cloner/UnitMatcher.php
index a191fa51fc..68a4705057 100644
--- a/src/CoreShop/Component/Core/Product/Cloner/UnitMatcher.php
+++ b/src/CoreShop/Component/Core/Product/Cloner/UnitMatcher.php
@@ -1,13 +1,19 @@
getUnitDefinitions()->getUnitDefinitions() as $unitDefinition) {
-
if (!$unitDefinition instanceof ProductUnitDefinitionInterface) {
continue;
}
diff --git a/src/CoreShop/Component/Core/Product/Cloner/UnitMatcherInterface.php b/src/CoreShop/Component/Core/Product/Cloner/UnitMatcherInterface.php
index 1720ae3d47..4e3470ae21 100644
--- a/src/CoreShop/Component/Core/Product/Cloner/UnitMatcherInterface.php
+++ b/src/CoreShop/Component/Core/Product/Cloner/UnitMatcherInterface.php
@@ -1,13 +1,19 @@
getTaxRule();
diff --git a/src/CoreShop/Component/Core/Product/ProductTaxCalculatorFactoryInterface.php b/src/CoreShop/Component/Core/Product/ProductTaxCalculatorFactoryInterface.php
index 30f5e3c2b2..9d1531b772 100644
--- a/src/CoreShop/Component/Core/Product/ProductTaxCalculatorFactoryInterface.php
+++ b/src/CoreShop/Component/Core/Product/ProductTaxCalculatorFactoryInterface.php
@@ -1,17 +1,21 @@
getCategoriesToCheck(
$configuration['categories'],
$params['store'],
- $configuration['recursive'] ?: false
+ $configuration['recursive'] ?: false,
);
if (!is_array($subject->getCategories())) {
diff --git a/src/CoreShop/Component/Core/Product/Rule/Condition/CountriesConditionChecker.php b/src/CoreShop/Component/Core/Product/Rule/Condition/CountriesConditionChecker.php
index 8b154d49e1..2f7543b56a 100644
--- a/src/CoreShop/Component/Core/Product/Rule/Condition/CountriesConditionChecker.php
+++ b/src/CoreShop/Component/Core/Product/Rule/Condition/CountriesConditionChecker.php
@@ -1,17 +1,21 @@
getProductsToCheck(
$configuration['products'],
$params['store'],
- $configuration['include_variants'] ?: false
+ $configuration['include_variants'] ?: false,
);
return in_array($subject->getId(), $productIdsToCheck);
diff --git a/src/CoreShop/Component/Core/Product/Rule/Condition/QuantityConditionChecker.php b/src/CoreShop/Component/Core/Product/Rule/Condition/QuantityConditionChecker.php
index 5c9c0fc3bf..111b1cc915 100644
--- a/src/CoreShop/Component/Core/Product/Rule/Condition/QuantityConditionChecker.php
+++ b/src/CoreShop/Component/Core/Product/Rule/Condition/QuantityConditionChecker.php
@@ -1,17 +1,21 @@
inner->calculateForQuantity(
@@ -45,7 +51,7 @@ public function calculateForQuantity(
$subject,
$quantity,
$originalPrice,
- $context
+ $context,
);
}
@@ -62,7 +68,7 @@ public function calculateForQuantity(
}
if ($subject instanceof ProductInterface && is_numeric($subject->getItemQuantityFactor()) && $subject->getItemQuantityFactor() > 1) {
- $price = (int)($price / $subject->getItemQuantityFactor());
+ $price = (int) ($price / $subject->getItemQuantityFactor());
}
return $price;
@@ -72,7 +78,7 @@ public function calculateForRange(
QuantityRangeInterface $range,
QuantityRangePriceAwareInterface $subject,
int $originalPrice,
- array $context
+ array $context,
): int {
return $this->inner->calculateForRange($range, $subject, $originalPrice, $context);
}
@@ -80,7 +86,7 @@ public function calculateForRange(
protected function locate(
Collection $ranges,
float $quantity,
- ProductUnitDefinitionInterface $unitDefinition
+ ProductUnitDefinitionInterface $unitDefinition,
): ?QuantityRangeInterface {
if ($ranges->isEmpty()) {
return null;
@@ -98,7 +104,7 @@ static function (CoreQuantityRangeInterface $range) use ($unitDefinition) {
}
return true;
- }
+ },
);
// reset array index
diff --git a/src/CoreShop/Component/Core/ProductQuantityPriceRules/Rule/Action/AmountDecreaseAction.php b/src/CoreShop/Component/Core/ProductQuantityPriceRules/Rule/Action/AmountDecreaseAction.php
index 77c942b868..8b899b1367 100644
--- a/src/CoreShop/Component/Core/ProductQuantityPriceRules/Rule/Action/AmountDecreaseAction.php
+++ b/src/CoreShop/Component/Core/ProductQuantityPriceRules/Rule/Action/AmountDecreaseAction.php
@@ -1,17 +1,21 @@
getCategoriesToCheck(
$configuration['categories'],
$shippable->getStore(),
- $configuration['recursive'] ?: false
+ $configuration['recursive'] ?: false,
);
foreach ($cartItems as $item) {
diff --git a/src/CoreShop/Component/Core/Shipping/Rule/Condition/CountriesConditionChecker.php b/src/CoreShop/Component/Core/Shipping/Rule/Condition/CountriesConditionChecker.php
index bca85dff7f..55cf383dc1 100644
--- a/src/CoreShop/Component/Core/Shipping/Rule/Condition/CountriesConditionChecker.php
+++ b/src/CoreShop/Component/Core/Shipping/Rule/Condition/CountriesConditionChecker.php
@@ -1,17 +1,21 @@
getCountry();
diff --git a/src/CoreShop/Component/Core/Shipping/Rule/Condition/CurrenciesConditionChecker.php b/src/CoreShop/Component/Core/Shipping/Rule/Condition/CurrenciesConditionChecker.php
index b17994e847..dc7e3be258 100644
--- a/src/CoreShop/Component/Core/Shipping/Rule/Condition/CurrenciesConditionChecker.php
+++ b/src/CoreShop/Component/Core/Shipping/Rule/Condition/CurrenciesConditionChecker.php
@@ -1,17 +1,21 @@
getProductsToCheck(
$configuration['products'],
$shippable->getStore(),
- $configuration['include_variants'] ?: false
+ $configuration['include_variants'] ?: false,
);
$cartItems = $shippable->getItems();
diff --git a/src/CoreShop/Component/Core/Shipping/Rule/Condition/StoresConditionChecker.php b/src/CoreShop/Component/Core/Shipping/Rule/Condition/StoresConditionChecker.php
index cff7481fca..6bf18bcebe 100644
--- a/src/CoreShop/Component/Core/Shipping/Rule/Condition/StoresConditionChecker.php
+++ b/src/CoreShop/Component/Core/Shipping/Rule/Condition/StoresConditionChecker.php
@@ -1,17 +1,21 @@
getCountry();
diff --git a/src/CoreShop/Component/Core/Shipping/Taxation/TaxCalculationStrategyCartItems.php b/src/CoreShop/Component/Core/Shipping/Taxation/TaxCalculationStrategyCartItems.php
index f2411baaf7..e474ba9f26 100644
--- a/src/CoreShop/Component/Core/Shipping/Taxation/TaxCalculationStrategyCartItems.php
+++ b/src/CoreShop/Component/Core/Shipping/Taxation/TaxCalculationStrategyCartItems.php
@@ -1,17 +1,21 @@
taxCalculationFactory->getTaxCalculatorForAddress(
$taxRuleGroup[$i],
$address,
- $context
+ $context,
);
if ($useGrossValues) {
diff --git a/src/CoreShop/Component/Core/Shipping/Taxation/TaxCalculationStrategyTaxRule.php b/src/CoreShop/Component/Core/Shipping/Taxation/TaxCalculationStrategyTaxRule.php
index baf9cdec03..10d8c0804a 100644
--- a/src/CoreShop/Component/Core/Shipping/Taxation/TaxCalculationStrategyTaxRule.php
+++ b/src/CoreShop/Component/Core/Shipping/Taxation/TaxCalculationStrategyTaxRule.php
@@ -1,17 +1,21 @@
getId(),
($address->getCountry() instanceof CountryInterface ? $address->getCountry()->getId() : 0),
- ($address->getState() instanceof StateInterface ? $address->getState()->getId() : 0)
+ ($address->getState() instanceof StateInterface ? $address->getState()->getId() : 0),
);
foreach ($context as $key => $value) {
if ($value instanceof ResourceInterface) {
- $cacheIdentifier .= '-'.$key.'-'.$value->getId();
+ $cacheIdentifier .= '-' . $key . '-' . $value->getId();
}
}
@@ -51,7 +55,7 @@ public function getTaxCalculatorForAddress(
$this->cache[$cacheIdentifier] = $this->taxCalculatorFactory->getTaxCalculatorForAddress(
$taxRuleGroup,
$address,
- $context
+ $context,
);
}
diff --git a/src/CoreShop/Component/Core/Taxation/DefaultTaxationDisplayProvider.php b/src/CoreShop/Component/Core/Taxation/DefaultTaxationDisplayProvider.php
index 5bd57c67f6..dbbc6b88ed 100644
--- a/src/CoreShop/Component/Core/Taxation/DefaultTaxationDisplayProvider.php
+++ b/src/CoreShop/Component/Core/Taxation/DefaultTaxationDisplayProvider.php
@@ -1,17 +1,21 @@
taxRuleRepository->findForCountryAndState(
$taxRuleGroup,
$address->getCountry(),
- $address->getState()
+ $address->getState(),
);
$taxRates = [];
$firstRow = true;
diff --git a/src/CoreShop/Component/Core/Taxation/TaxCalculatorFactoryInterface.php b/src/CoreShop/Component/Core/Taxation/TaxCalculatorFactoryInterface.php
index 8500fb2b32..da6369e43f 100644
--- a/src/CoreShop/Component/Core/Taxation/TaxCalculatorFactoryInterface.php
+++ b/src/CoreShop/Component/Core/Taxation/TaxCalculatorFactoryInterface.php
@@ -1,17 +1,21 @@
$this->parseAmount($object->getAdjustmentsTotal(AdjustmentInterface::CART_PRICE_RULE)),
'currency' => $object->getCurrency()->getIsoCode(),
'items' => $items,
- ]
+ ],
);
}
protected function parseAmount(int $amount): int
{
- return (int)round((round($amount / $this->decimalFactor, $this->decimalPrecision)), 0);
+ return (int) round((round($amount / $this->decimalFactor, $this->decimalPrecision)), 0);
}
}
diff --git a/src/CoreShop/Component/Core/Tracking/Extractor/OrderItemExtractor.php b/src/CoreShop/Component/Core/Tracking/Extractor/OrderItemExtractor.php
index 7bda3f6bf3..774772be05 100644
--- a/src/CoreShop/Component/Core/Tracking/Extractor/OrderItemExtractor.php
+++ b/src/CoreShop/Component/Core/Tracking/Extractor/OrderItemExtractor.php
@@ -1,17 +1,21 @@
$object instanceof ProductInterface ? $object->getSku() : '',
'price' => $this->taxedPurchasablePriceCalculator->getPrice(
$object,
- $this->shopperContext->getContext()
+ $this->shopperContext->getContext(),
) / $this->decimalFactor,
'currency' => $this->shopperContext->getCurrency()->getIsoCode(),
'categories' => array_map(static function (CategoryInterface $category) {
diff --git a/src/CoreShop/Component/Core/Translation/TranslatableEntityPimcoreLocaleAssigner.php b/src/CoreShop/Component/Core/Translation/TranslatableEntityPimcoreLocaleAssigner.php
index a2b1e97722..446cfae2a2 100644
--- a/src/CoreShop/Component/Core/Translation/TranslatableEntityPimcoreLocaleAssigner.php
+++ b/src/CoreShop/Component/Core/Translation/TranslatableEntityPimcoreLocaleAssigner.php
@@ -1,17 +1,21 @@
*/
private PriorityQueue $currencyContexts;
diff --git a/src/CoreShop/Component/Currency/Context/CurrencyContextInterface.php b/src/CoreShop/Component/Currency/Context/CurrencyContextInterface.php
index fcf3ffb0dc..7355ef13ad 100644
--- a/src/CoreShop/Component/Currency/Context/CurrencyContextInterface.php
+++ b/src/CoreShop/Component/Currency/Context/CurrencyContextInterface.php
@@ -1,17 +1,21 @@
getFromCurrency()->getIsoCode() === $fromCurrencyCode) {
- return (int)round($value * $exchangeRate->getExchangeRate());
+ return (int) round($value * $exchangeRate->getExchangeRate());
}
- return (int)round($value / $exchangeRate->getExchangeRate());
+ return (int) round($value / $exchangeRate->getExchangeRate());
}
private function getExchangeRate(string $fromCode, string $toCode): ?ExchangeRateInterface
diff --git a/src/CoreShop/Component/Currency/Converter/CurrencyConverterInterface.php b/src/CoreShop/Component/Currency/Converter/CurrencyConverterInterface.php
index 1423ae1858..d373ed4b06 100644
--- a/src/CoreShop/Component/Currency/Converter/CurrencyConverterInterface.php
+++ b/src/CoreShop/Component/Currency/Converter/CurrencyConverterInterface.php
@@ -1,17 +1,21 @@
*/
private PriorityQueue $customerContexts;
diff --git a/src/CoreShop/Component/Customer/Context/CustomerContextInterface.php b/src/CoreShop/Component/Customer/Context/CustomerContextInterface.php
index 745250f5f6..980854822b 100644
--- a/src/CoreShop/Component/Customer/Context/CustomerContextInterface.php
+++ b/src/CoreShop/Component/Customer/Context/CustomerContextInterface.php
@@ -1,17 +1,21 @@
*/
private PriorityQueue $requestResolvers;
diff --git a/src/CoreShop/Component/Customer/Context/RequestBased/CustomerContext.php b/src/CoreShop/Component/Customer/Context/RequestBased/CustomerContext.php
index 01910e16c9..1643db333a 100644
--- a/src/CoreShop/Component/Customer/Context/RequestBased/CustomerContext.php
+++ b/src/CoreShop/Component/Customer/Context/RequestBased/CustomerContext.php
@@ -1,17 +1,21 @@
conditions = $conditions;
}
diff --git a/src/CoreShop/Component/Index/Condition/ConditionInterface.php b/src/CoreShop/Component/Index/Condition/ConditionInterface.php
index 68ec3d41c9..5c3cea9258 100644
--- a/src/CoreShop/Component/Index/Condition/ConditionInterface.php
+++ b/src/CoreShop/Component/Index/Condition/ConditionInterface.php
@@ -1,17 +1,21 @@
', $value);
}
}
diff --git a/src/CoreShop/Component/Index/Condition/GreaterThanEqualCondition.php b/src/CoreShop/Component/Index/Condition/GreaterThanEqualCondition.php
index 8438be1888..6c44534990 100644
--- a/src/CoreShop/Component/Index/Condition/GreaterThanEqualCondition.php
+++ b/src/CoreShop/Component/Index/Condition/GreaterThanEqualCondition.php
@@ -1,23 +1,29 @@
=', $value);
}
}
diff --git a/src/CoreShop/Component/Index/Condition/InCondition.php b/src/CoreShop/Component/Index/Condition/InCondition.php
index 85a31266ab..c0b23a9ee9 100644
--- a/src/CoreShop/Component/Index/Condition/InCondition.php
+++ b/src/CoreShop/Component/Index/Condition/InCondition.php
@@ -1,17 +1,21 @@
fieldName = $fieldName;
$this->values = $values;
}
diff --git a/src/CoreShop/Component/Index/Condition/IsCondition.php b/src/CoreShop/Component/Index/Condition/IsCondition.php
index ccd5f64419..adaf2fe6fb 100644
--- a/src/CoreShop/Component/Index/Condition/IsCondition.php
+++ b/src/CoreShop/Component/Index/Condition/IsCondition.php
@@ -1,23 +1,29 @@
allowedPatterns, true)) {
throw new \InvalidArgumentException(sprintf('Pattern %s not allowed, allowed are %s', $pattern, implode(', ', $this->allowedPatterns)));
}
diff --git a/src/CoreShop/Component/Index/Condition/LowerThanCondition.php b/src/CoreShop/Component/Index/Condition/LowerThanCondition.php
index 70d9443837..32e6102879 100644
--- a/src/CoreShop/Component/Index/Condition/LowerThanCondition.php
+++ b/src/CoreShop/Component/Index/Condition/LowerThanCondition.php
@@ -1,23 +1,29 @@
', $value);
}
}
diff --git a/src/CoreShop/Component/Index/Condition/RangeCondition.php b/src/CoreShop/Component/Index/Condition/RangeCondition.php
index c7560f72bd..766552e98f 100644
--- a/src/CoreShop/Component/Index/Condition/RangeCondition.php
+++ b/src/CoreShop/Component/Index/Condition/RangeCondition.php
@@ -1,23 +1,30 @@
getConfiguration()['field'];
@@ -49,7 +53,7 @@ public function addCondition(
ListingInterface $list,
array $currentFilter,
ParameterBag $parameterBag,
- bool $isPrecondition = false
+ bool $isPrecondition = false,
): array {
$field = $condition->getConfiguration()['field'];
$value = $parameterBag->get($field);
@@ -59,16 +63,16 @@ public function addCondition(
}
if (!empty($value)) {
- $value = filter_var($value, FILTER_VALIDATE_BOOLEAN, FILTER_NULL_ON_FAILURE);
+ $value = filter_var($value, \FILTER_VALIDATE_BOOLEAN, \FILTER_NULL_ON_FAILURE);
$currentFilter[$field] = $value;
$fieldName = $field;
if ($isPrecondition) {
- $fieldName = 'PRECONDITION_'.$fieldName;
+ $fieldName = 'PRECONDITION_' . $fieldName;
}
- $list->addCondition(new MatchCondition($field, (string)$value), $fieldName);
+ $list->addCondition(new MatchCondition($field, (string) $value), $fieldName);
}
return $currentFilter;
diff --git a/src/CoreShop/Component/Index/Filter/CategoryMultiSelectConditionProcessor.php b/src/CoreShop/Component/Index/Filter/CategoryMultiSelectConditionProcessor.php
index e40e3830d4..ffa5f17d0a 100644
--- a/src/CoreShop/Component/Index/Filter/CategoryMultiSelectConditionProcessor.php
+++ b/src/CoreShop/Component/Index/Filter/CategoryMultiSelectConditionProcessor.php
@@ -1,17 +1,21 @@
$e, 'count' => $count];
@@ -57,7 +61,7 @@ public function prepareValuesForRendering(FilterConditionInterface $condition, F
$objects = [];
foreach ($values as $value) {
- $object = Concrete::getById((int)$value['value']);
+ $object = Concrete::getById((int) $value['value']);
if ($object instanceof Concrete) {
$objects[] = $object;
}
@@ -106,7 +110,7 @@ public function addCondition(FilterConditionInterface $condition, FilterInterfac
}
unset($v);
-
+
$concatenator = $condition->getConfiguration()['concatenator'] ?: 'OR';
$list->addCondition(new ConcatCondition($field, $concatenator, $likeConditions), $fieldName);
diff --git a/src/CoreShop/Component/Index/Filter/CategorySelectConditionProcessor.php b/src/CoreShop/Component/Index/Filter/CategorySelectConditionProcessor.php
index f5a0516e71..0deff06c10 100644
--- a/src/CoreShop/Component/Index/Filter/CategorySelectConditionProcessor.php
+++ b/src/CoreShop/Component/Index/Filter/CategorySelectConditionProcessor.php
@@ -1,17 +1,21 @@
$e, 'count' => $count];
@@ -55,7 +59,7 @@ public function prepareValuesForRendering(FilterConditionInterface $condition, F
$objects = [];
foreach ($values as $value) {
- $object = Concrete::getById((int)$value['value']);
+ $object = Concrete::getById((int) $value['value']);
if ($object instanceof Concrete) {
$objects[] = $object;
}
@@ -94,7 +98,7 @@ public function addCondition(FilterConditionInterface $condition, FilterInterfac
}
if (!empty($value)) {
- $value = '%,' . trim((string)$value) . ',%';
+ $value = '%,' . trim((string) $value) . ',%';
$fieldName = $isPrecondition ? 'PRECONDITION_' . $field : $field;
$list->addCondition(new LikeCondition($field, 'both', $value), $fieldName);
}
diff --git a/src/CoreShop/Component/Index/Filter/FilterConditionProcessorInterface.php b/src/CoreShop/Component/Index/Filter/FilterConditionProcessorInterface.php
index f858a2e26c..f0fd9a165b 100644
--- a/src/CoreShop/Component/Index/Filter/FilterConditionProcessorInterface.php
+++ b/src/CoreShop/Component/Index/Filter/FilterConditionProcessorInterface.php
@@ -1,17 +1,21 @@
0 ? $rawValues[count($rawValues) - 1]['value'] : 0;
$currentValueMin = $minValue;
- if (isset($currentFilter["$field-min"]) && ('' !== (string)$currentFilter["$field-min"])) {
+ if (isset($currentFilter["$field-min"]) && ('' !== (string) $currentFilter["$field-min"])) {
$currentValueMin = $currentFilter["$field-min"];
}
$currentValueMax = $maxValue;
- if (isset($currentFilter["$field-max"]) && ('' !== (string)$currentFilter["$field-max"])) {
+ if (isset($currentFilter["$field-max"]) && ('' !== (string) $currentFilter["$field-max"])) {
$currentValueMax = $currentFilter["$field-max"];
}
@@ -95,7 +99,7 @@ public function addCondition(FilterConditionInterface $condition, FilterInterfac
$fieldName = 'PRECONDITION_' . $fieldName;
}
- $list->addCondition(new RangeCondition($field, (float)$valueMin, (float)$valueMax), $fieldName);
+ $list->addCondition(new RangeCondition($field, (float) $valueMin, (float) $valueMax), $fieldName);
}
return $currentFilter;
diff --git a/src/CoreShop/Component/Index/Filter/RelationalMultiselectConditionProcessor.php b/src/CoreShop/Component/Index/Filter/RelationalMultiselectConditionProcessor.php
index 95b6230187..4c244d82de 100644
--- a/src/CoreShop/Component/Index/Filter/RelationalMultiselectConditionProcessor.php
+++ b/src/CoreShop/Component/Index/Filter/RelationalMultiselectConditionProcessor.php
@@ -1,17 +1,21 @@
addRelationCondition(new MatchCondition('dest', (string)$value), $fieldName);
+ $list->addRelationCondition(new MatchCondition('dest', (string) $value), $fieldName);
}
return $currentFilter;
diff --git a/src/CoreShop/Component/Index/Filter/SearchConditionProcessor.php b/src/CoreShop/Component/Index/Filter/SearchConditionProcessor.php
index 163176f698..dd6f6f455f 100644
--- a/src/CoreShop/Component/Index/Filter/SearchConditionProcessor.php
+++ b/src/CoreShop/Component/Index/Filter/SearchConditionProcessor.php
@@ -1,17 +1,21 @@
getConfiguration()['pattern'];
diff --git a/src/CoreShop/Component/Index/Filter/SelectFilterConditionFromMultiselectProcessor.php b/src/CoreShop/Component/Index/Filter/SelectFilterConditionFromMultiselectProcessor.php
index 236dd15ead..8c5b30469d 100644
--- a/src/CoreShop/Component/Index/Filter/SelectFilterConditionFromMultiselectProcessor.php
+++ b/src/CoreShop/Component/Index/Filter/SelectFilterConditionFromMultiselectProcessor.php
@@ -1,17 +1,21 @@
addCondition(new MatchCondition($field, (string)$value), $fieldName);
+ $list->addCondition(new MatchCondition($field, (string) $value), $fieldName);
}
return $currentFilter;
diff --git a/src/CoreShop/Component/Index/Getter/BrickGetter.php b/src/CoreShop/Component/Index/Getter/BrickGetter.php
index 0715e63781..6a112ec6e7 100644
--- a/src/CoreShop/Component/Index/Getter/BrickGetter.php
+++ b/src/CoreShop/Component/Index/Getter/BrickGetter.php
@@ -1,17 +1,21 @@
getObjectKey());
- return LocaleFallbackHelper::useFallbackValues(function() use ($brick, $getter) {
+ return LocaleFallbackHelper::useFallbackValues(function () use ($brick, $getter) {
$values = [];
foreach ($this->localeProvider->getDefinedLocalesCodes() as $locale) {
$values[$locale] = $brick->$getter($locale);
diff --git a/src/CoreShop/Component/Index/Getter/ClassificationStoreGetter.php b/src/CoreShop/Component/Index/Getter/ClassificationStoreGetter.php
index 099ef85419..e4ba389fc7 100644
--- a/src/CoreShop/Component/Index/Getter/ClassificationStoreGetter.php
+++ b/src/CoreShop/Component/Index/Getter/ClassificationStoreGetter.php
@@ -1,17 +1,21 @@
localeProvider->getDefinedLocalesCodes() as $locale) {
$fieldValues[$locale][] = $item->$fieldGetter($locale);
}
});
+
continue;
}
diff --git a/src/CoreShop/Component/Index/Getter/GetterInterface.php b/src/CoreShop/Component/Index/Getter/GetterInterface.php
index 17a64cf97f..34ee41bced 100644
--- a/src/CoreShop/Component/Index/Getter/GetterInterface.php
+++ b/src/CoreShop/Component/Index/Getter/GetterInterface.php
@@ -1,17 +1,21 @@
getObjectKey());
- return LocaleFallbackHelper::useFallbackValues(function() use($object, $getter) {
+ return LocaleFallbackHelper::useFallbackValues(function () use ($object, $getter) {
$values = [];
foreach ($this->localeProvider->getDefinedLocalesCodes() as $locale) {
diff --git a/src/CoreShop/Component/Index/Interpreter/ExpressionInterpreter.php b/src/CoreShop/Component/Index/Interpreter/ExpressionInterpreter.php
index 9a2f26afe5..e98833719c 100644
--- a/src/CoreShop/Component/Index/Interpreter/ExpressionInterpreter.php
+++ b/src/CoreShop/Component/Index/Interpreter/ExpressionInterpreter.php
@@ -1,17 +1,21 @@
assert($interpreterConfig);
diff --git a/src/CoreShop/Component/Index/Interpreter/NestedInterpreter.php b/src/CoreShop/Component/Index/Interpreter/NestedInterpreter.php
index 23c5a1fd69..4cbeaccfd0 100644
--- a/src/CoreShop/Component/Index/Interpreter/NestedInterpreter.php
+++ b/src/CoreShop/Component/Index/Interpreter/NestedInterpreter.php
@@ -1,17 +1,21 @@
assert($interpreterConfig);
diff --git a/src/CoreShop/Component/Index/Interpreter/NestedTrait.php b/src/CoreShop/Component/Index/Interpreter/NestedTrait.php
index 2c67a094d3..b8aa961f96 100644
--- a/src/CoreShop/Component/Index/Interpreter/NestedTrait.php
+++ b/src/CoreShop/Component/Index/Interpreter/NestedTrait.php
@@ -1,17 +1,21 @@
getId();
diff --git a/src/CoreShop/Component/Index/Interpreter/ObjectIdSumInterpreter.php b/src/CoreShop/Component/Index/Interpreter/ObjectIdSumInterpreter.php
index 55d2435279..293c77a14b 100644
--- a/src/CoreShop/Component/Index/Interpreter/ObjectIdSumInterpreter.php
+++ b/src/CoreShop/Component/Index/Interpreter/ObjectIdSumInterpreter.php
@@ -1,17 +1,21 @@
getValue();
diff --git a/src/CoreShop/Component/Index/Interpreter/RelationInterpreterInterface.php b/src/CoreShop/Component/Index/Interpreter/RelationInterpreterInterface.php
index 253c90d356..e3baa30f1e 100644
--- a/src/CoreShop/Component/Index/Interpreter/RelationInterpreterInterface.php
+++ b/src/CoreShop/Component/Index/Interpreter/RelationInterpreterInterface.php
@@ -1,17 +1,21 @@
assert($interpreterConfig);
@@ -48,7 +52,7 @@ public function interpret(
mixed $value,
IndexableInterface $indexable,
IndexColumnInterface $config,
- array $interpreterConfig = []
+ array $interpreterConfig = [],
): mixed {
$this->assert($interpreterConfig);
diff --git a/src/CoreShop/Component/Index/Interpreter/RelationalValue.php b/src/CoreShop/Component/Index/Interpreter/RelationalValue.php
index edbcaa7b9c..aec5b01569 100644
--- a/src/CoreShop/Component/Index/Interpreter/RelationalValue.php
+++ b/src/CoreShop/Component/Index/Interpreter/RelationalValue.php
@@ -1,25 +1,32 @@
params = $params;
}
diff --git a/src/CoreShop/Component/Index/Interpreter/RelationalValueInterface.php b/src/CoreShop/Component/Index/Interpreter/RelationalValueInterface.php
index 20d960cedd..565ea72525 100644
--- a/src/CoreShop/Component/Index/Interpreter/RelationalValueInterface.php
+++ b/src/CoreShop/Component/Index/Interpreter/RelationalValueInterface.php
@@ -1,17 +1,21 @@
getGroupByRelationValues($field);
foreach ($values as &$id) {
- $id = (int)$id;
+ $id = (int) $id;
$obj = Concrete::getById($id);
if ($obj) {
diff --git a/src/CoreShop/Component/Index/Worker/FilterGroupHelperInterface.php b/src/CoreShop/Component/Index/Worker/FilterGroupHelperInterface.php
index dd2a3d6d14..f021e378aa 100644
--- a/src/CoreShop/Component/Index/Worker/FilterGroupHelperInterface.php
+++ b/src/CoreShop/Component/Index/Worker/FilterGroupHelperInterface.php
@@ -1,17 +1,21 @@
*/
private PriorityQueue $localeContexts;
diff --git a/src/CoreShop/Component/Locale/Context/FixedLocaleContext.php b/src/CoreShop/Component/Locale/Context/FixedLocaleContext.php
index 0329ab0b53..67b0f791df 100644
--- a/src/CoreShop/Component/Locale/Context/FixedLocaleContext.php
+++ b/src/CoreShop/Component/Locale/Context/FixedLocaleContext.php
@@ -1,17 +1,21 @@
pimcoreLocaleService->findLocale();
diff --git a/src/CoreShop/Component/Locale/Model/LocaleAwareInterface.php b/src/CoreShop/Component/Locale/Model/LocaleAwareInterface.php
index 24df2d0281..9123e8176e 100644
--- a/src/CoreShop/Component/Locale/Model/LocaleAwareInterface.php
+++ b/src/CoreShop/Component/Locale/Model/LocaleAwareInterface.php
@@ -1,17 +1,21 @@
eventDispatcher->dispatch(
new GenericEvent($storageList, ['item' => $item]),
- CartEvents::PRE_REMOVE_ITEM
+ CartEvents::PRE_REMOVE_ITEM,
);
$storageList->removeItem($item);
@@ -54,7 +61,7 @@ public function removeFromList(StorageListInterface $storageList, StorageListIte
$this->eventDispatcher->dispatch(
new GenericEvent($storageList, ['item' => $item]),
- CartEvents::POST_REMOVE_ITEM
+ CartEvents::POST_REMOVE_ITEM,
);
}
@@ -64,7 +71,7 @@ private function resolveItem(StorageListInterface $storageList, StorageListItemI
if ($this->cartItemResolver->equals($item, $storageListItem)) {
$this->cartItemQuantityModifier->modify(
$item,
- $item->getQuantity() + $storageListItem->getQuantity()
+ $item->getQuantity() + $storageListItem->getQuantity(),
);
return;
@@ -73,14 +80,14 @@ private function resolveItem(StorageListInterface $storageList, StorageListItemI
$this->eventDispatcher->dispatch(
new GenericEvent($storageList, ['item' => $storageListItem]),
- CartEvents::PRE_ADD_ITEM
+ CartEvents::PRE_ADD_ITEM,
);
$storageList->addItem($storageListItem);
$this->eventDispatcher->dispatch(
new GenericEvent($storageList, ['item' => $storageListItem]),
- CartEvents::POST_ADD_ITEM
+ CartEvents::POST_ADD_ITEM,
);
}
}
diff --git a/src/CoreShop/Component/Order/Cart/CartModifierInterface.php b/src/CoreShop/Component/Order/Cart/CartModifierInterface.php
index 2c1a506360..62a1cb0445 100644
--- a/src/CoreShop/Component/Order/Cart/CartModifierInterface.php
+++ b/src/CoreShop/Component/Order/Cart/CartModifierInterface.php
@@ -1,17 +1,21 @@
getItems() as $item) {
$voucher = $cartPriceRuleItem->getVoucherCode() ? $this->voucherRepository->findByCode($cartPriceRuleItem->getVoucherCode()) : null;
$priceRuleItem = $item->getPriceRuleByCartPriceRule($cartPriceRuleItem->getCartPriceRule(), $voucher);
$params = [
'voucher' => $voucher,
- 'cartPriceRule' => $cartPriceRuleItem->getCartPriceRule()
+ 'cartPriceRule' => $cartPriceRuleItem->getCartPriceRule(),
];
$existingPriceRule = null !== $priceRuleItem;
@@ -70,6 +73,7 @@ public function applyRule(OrderInterface $cart, array $configuration, PriceRuleI
if (!$this->isValid($item, $cartPriceRuleItem, $configuration['conditions'], $params)) {
$item->removePriceRule($priceRuleItem);
+
continue;
}
@@ -112,8 +116,8 @@ public function applyRule(OrderInterface $cart, array $configuration, PriceRuleI
AdjustmentInterface::CART_PRICE_RULE,
$cartPriceRuleItem->getCartPriceRule()->getName(),
$cartPriceRuleItem->getDiscount(true),
- $cartPriceRuleItem->getDiscount(false)
- )
+ $cartPriceRuleItem->getDiscount(false),
+ ),
);
return $overallResult;
@@ -145,7 +149,7 @@ public function unApplyRule(OrderInterface $cart, array $configuration, PriceRul
$item->removePriceRule($priceRuleItem);
}
-
+
return true;
}
diff --git a/src/CoreShop/Component/Order/Cart/Rule/Action/CartPriceRuleActionProcessorInterface.php b/src/CoreShop/Component/Order/Cart/Rule/Action/CartPriceRuleActionProcessorInterface.php
index 0a7105df2a..c0c16069fa 100644
--- a/src/CoreShop/Component/Order/Cart/Rule/Action/CartPriceRuleActionProcessorInterface.php
+++ b/src/CoreShop/Component/Order/Cart/Rule/Action/CartPriceRuleActionProcessorInterface.php
@@ -1,17 +1,21 @@
getConditions(),
- $params
+ $params,
);
}
}
diff --git a/src/CoreShop/Component/Order/Cart/Rule/CartPriceRuleValidationProcessorInterface.php b/src/CoreShop/Component/Order/Cart/Rule/CartPriceRuleValidationProcessorInterface.php
index 37003816fe..4e95df95db 100644
--- a/src/CoreShop/Component/Order/Cart/Rule/CartPriceRuleValidationProcessorInterface.php
+++ b/src/CoreShop/Component/Order/Cart/Rule/CartPriceRuleValidationProcessorInterface.php
@@ -1,17 +1,21 @@
getAmount(),
- $instruction->getLength()
+ $instruction->getLength(),
);
parent::__construct($message, $exceptionCode, $previousException);
diff --git a/src/CoreShop/Component/Order/Exception/NoPurchasableDiscountPriceFoundException.php b/src/CoreShop/Component/Order/Exception/NoPurchasableDiscountPriceFoundException.php
index 79508d76e5..8a3fbbe266 100644
--- a/src/CoreShop/Component/Order/Exception/NoPurchasableDiscountPriceFoundException.php
+++ b/src/CoreShop/Component/Order/Exception/NoPurchasableDiscountPriceFoundException.php
@@ -1,23 +1,29 @@
voucherCodeRepository->countCodes(
$length,
$generator->getPrefix(),
- $generator->getSuffix()
+ $generator->getSuffix(),
);
$letters = $this->letterResolver->findLetters($generator);
@@ -60,6 +67,6 @@ private function calculatePossibleGenerationAmount(CartPriceRuleVoucherGenerator
return \PHP_INT_MAX - $generatedAmount;
}
- return (int)$codeCombination - $generatedAmount;
+ return (int) $codeCombination - $generatedAmount;
}
}
diff --git a/src/CoreShop/Component/Order/Generator/CodeGeneratorCheckerInterface.php b/src/CoreShop/Component/Order/Generator/CodeGeneratorCheckerInterface.php
index 93e436325c..67fbfcfce6 100644
--- a/src/CoreShop/Component/Order/Generator/CodeGeneratorCheckerInterface.php
+++ b/src/CoreShop/Component/Order/Generator/CodeGeneratorCheckerInterface.php
@@ -1,17 +1,21 @@
getTypeIdentifier();
- }
+ },
);
}
diff --git a/src/CoreShop/Component/Order/Model/Adjustment.php b/src/CoreShop/Component/Order/Model/Adjustment.php
index a0ef6c8b9a..ee94bd994a 100644
--- a/src/CoreShop/Component/Order/Model/Adjustment.php
+++ b/src/CoreShop/Component/Order/Model/Adjustment.php
@@ -1,17 +1,21 @@
getPimcoreNeutral();
+ return (bool) $this->getPimcoreNeutral();
}
public function setNeutral(bool $neutral)
diff --git a/src/CoreShop/Component/Order/Model/AdjustmentInterface.php b/src/CoreShop/Component/Order/Model/AdjustmentInterface.php
index ec87850d21..ef5c8db64c 100644
--- a/src/CoreShop/Component/Order/Model/AdjustmentInterface.php
+++ b/src/CoreShop/Component/Order/Model/AdjustmentInterface.php
@@ -1,17 +1,21 @@
getTypeIdentifier();
- }
+ },
);
}
diff --git a/src/CoreShop/Component/Order/Model/Order.php b/src/CoreShop/Component/Order/Model/Order.php
index 664353bee7..50158f7f53 100644
--- a/src/CoreShop/Component/Order/Model/Order.php
+++ b/src/CoreShop/Component/Order/Model/Order.php
@@ -1,17 +1,21 @@
getIsGiftItem()) {
@@ -118,7 +120,7 @@ public function getConvertedItemRetailPrice(bool $withTax = true): int
public function setConvertedItemRetailPrice(int $itemRetailPrice, bool $withTax = true)
{
$withTax ? $this->setConvertedItemRetailPriceGross($itemRetailPrice) : $this->setConvertedItemRetailPriceNet(
- $itemRetailPrice
+ $itemRetailPrice,
);
}
diff --git a/src/CoreShop/Component/Order/Model/OrderItemInterface.php b/src/CoreShop/Component/Order/Model/OrderItemInterface.php
index 5e4bfced8f..24949840ae 100644
--- a/src/CoreShop/Component/Order/Model/OrderItemInterface.php
+++ b/src/CoreShop/Component/Order/Model/OrderItemInterface.php
@@ -1,17 +1,21 @@
getCartPriceRule()->getId() === $priceRule->getCartPriceRule()->getId()
- && $item->getVoucherCode() === $priceRule->getVoucherCode()) {
+ if ($item->getCartPriceRule()->getId() === $priceRule->getCartPriceRule()->getId() &&
+ $item->getVoucherCode() === $priceRule->getVoucherCode()) {
$items->remove($i);
break;
@@ -135,8 +139,8 @@ public function hasPriceRule(PriceRuleItemInterface $priceRule): bool
continue;
}
- if ($item->getCartPriceRule()->getId() === $priceRule->getCartPriceRule()->getId()
- && $item->getVoucherCode() === $priceRule->getVoucherCode()) {
+ if ($item->getCartPriceRule()->getId() === $priceRule->getCartPriceRule()->getId() &&
+ $item->getVoucherCode() === $priceRule->getVoucherCode()) {
return true;
}
}
@@ -147,14 +151,14 @@ public function hasPriceRule(PriceRuleItemInterface $priceRule): bool
public function hasCartPriceRule(
CartPriceRuleInterface $cartPriceRule,
- CartPriceRuleVoucherCodeInterface $voucherCode = null
+ CartPriceRuleVoucherCodeInterface $voucherCode = null,
): bool {
return null !== $this->getPriceRuleByCartPriceRule($cartPriceRule, $voucherCode);
}
public function getPriceRuleByCartPriceRule(
CartPriceRuleInterface $cartPriceRule,
- CartPriceRuleVoucherCodeInterface $voucherCode = null
+ CartPriceRuleVoucherCodeInterface $voucherCode = null,
): ?PriceRuleItemInterface {
$items = $this->getPriceRuleItems();
diff --git a/src/CoreShop/Component/Order/Model/PurchasableInterface.php b/src/CoreShop/Component/Order/Model/PurchasableInterface.php
index 3994adc0a3..49f7a188e6 100644
--- a/src/CoreShop/Component/Order/Model/PurchasableInterface.php
+++ b/src/CoreShop/Component/Order/Model/PurchasableInterface.php
@@ -1,17 +1,21 @@
sequenceNumberGenerator->getNextSequenceForType($this->type);
+ return (string) $this->sequenceNumberGenerator->getNextSequenceForType($this->type);
}
}
diff --git a/src/CoreShop/Component/Order/OrderInvoiceStates.php b/src/CoreShop/Component/Order/OrderInvoiceStates.php
index 1803382ec0..e5e8688635 100644
--- a/src/CoreShop/Component/Order/OrderInvoiceStates.php
+++ b/src/CoreShop/Component/Order/OrderInvoiceStates.php
@@ -1,17 +1,21 @@
getOrderNumber())
+ str_replace(' ', '_', $order->getOrderNumber()),
) . '_' . $uniqueId;
/**
@@ -59,7 +67,7 @@ public function provideOrderPayment(OrderInterface $order): PaymentInterface
[
'%items%' => count($order->getItems()),
'%total%' => round($order->getTotal() / $this->decimalFactor, $this->decimalPrecision),
- ]
+ ],
);
$payment->setDescription($description);
diff --git a/src/CoreShop/Component/Order/Payment/OrderPaymentProviderInterface.php b/src/CoreShop/Component/Order/Payment/OrderPaymentProviderInterface.php
index 39cf77be61..c508098684 100644
--- a/src/CoreShop/Component/Order/Payment/OrderPaymentProviderInterface.php
+++ b/src/CoreShop/Component/Order/Payment/OrderPaymentProviderInterface.php
@@ -1,17 +1,21 @@
$orderItem->getOrder(),
'order_item' => $orderItem,
'options' => $options,
- ]
+ ],
);
$itemFolder = $this->folderCreationService->createFolderForResource($documentItem, ['prefix' => $orderDocument->getFullPath()]);
@@ -75,7 +81,7 @@ public function transform(
'order' => $orderItem->getOrder(),
'order_item' => $orderItem,
'options' => $options,
- ]
+ ],
);
return $documentItem;
diff --git a/src/CoreShop/Component/Order/Transformer/OrderItemToShipmentItemTransformer.php b/src/CoreShop/Component/Order/Transformer/OrderItemToShipmentItemTransformer.php
index 1776dee63a..c2f0e18bb6 100644
--- a/src/CoreShop/Component/Order/Transformer/OrderItemToShipmentItemTransformer.php
+++ b/src/CoreShop/Component/Order/Transformer/OrderItemToShipmentItemTransformer.php
@@ -1,17 +1,21 @@
$orderItem->getOrder(),
'order_item' => $orderItem,
'options' => $options,
- ]
+ ],
);
$itemFolder = $this->folderCreationService->createFolderForResource($documentItem, ['prefix' => $orderDocument->getFullPath()]);
@@ -74,7 +80,7 @@ public function transform(
'order' => $orderItem->getOrder(),
'order_item' => $orderItem,
'options' => $options,
- ]
+ ],
);
return $documentItem;
diff --git a/src/CoreShop/Component/Order/Transformer/OrderToInvoiceTransformer.php b/src/CoreShop/Component/Order/Transformer/OrderToInvoiceTransformer.php
index d425bc23b4..b4fc0fbb5d 100644
--- a/src/CoreShop/Component/Order/Transformer/OrderToInvoiceTransformer.php
+++ b/src/CoreShop/Component/Order/Transformer/OrderToInvoiceTransformer.php
@@ -1,17 +1,21 @@
eventDispatcher->dispatch(
$event,
- sprintf('%s.%s.pre_%s', 'coreshop', $modelName, 'transform')
+ sprintf('%s.%s.pre_%s', 'coreshop', $modelName, 'transform'),
);
}
@@ -40,7 +44,7 @@ public function dispatchPostEvent(string $modelName, ResourceInterface $model, a
$this->eventDispatcher->dispatch(
$event,
- sprintf('%s.%s.post_%s', 'coreshop', $modelName, 'transform')
+ sprintf('%s.%s.post_%s', 'coreshop', $modelName, 'transform'),
);
}
diff --git a/src/CoreShop/Component/Order/Transformer/TransformerEventDispatcherInterface.php b/src/CoreShop/Component/Order/Transformer/TransformerEventDispatcherInterface.php
index 4cc391bd46..2fc6853b0f 100644
--- a/src/CoreShop/Component/Order/Transformer/TransformerEventDispatcherInterface.php
+++ b/src/CoreShop/Component/Order/Transformer/TransformerEventDispatcherInterface.php
@@ -1,17 +1,21 @@
list->setLimit($batchSize);
}
diff --git a/src/CoreShop/Component/Pimcore/BatchProcessing/DataObjectBatchListing.php b/src/CoreShop/Component/Pimcore/BatchProcessing/DataObjectBatchListing.php
index 379eac73f6..64da1b0c34 100644
--- a/src/CoreShop/Component/Pimcore/BatchProcessing/DataObjectBatchListing.php
+++ b/src/CoreShop/Component/Pimcore/BatchProcessing/DataObjectBatchListing.php
@@ -1,17 +1,21 @@
list::class
+ $this->list::class,
));
}
@@ -103,8 +109,8 @@ private function load(): void
throw new \InvalidArgumentException(
sprintf(
'%s listing class does not support loadIdList.',
- $this->list::class
- )
+ $this->list::class,
+ ),
);
}
diff --git a/src/CoreShop/Component/Pimcore/DataObject/AbstractDefinitionUpdate.php b/src/CoreShop/Component/Pimcore/DataObject/AbstractDefinitionUpdate.php
index ad6fa1c7c1..09390a92c4 100644
--- a/src/CoreShop/Component/Pimcore/DataObject/AbstractDefinitionUpdate.php
+++ b/src/CoreShop/Component/Pimcore/DataObject/AbstractDefinitionUpdate.php
@@ -1,17 +1,21 @@
childrenPath][$index]);
- }
+ },
);
}
@@ -88,7 +94,7 @@ function (array &$foundField, int $index, array &$parent) use ($jsonFieldDefinit
array_splice($childs, $index, 0, [$jsonFieldDefinition]);
$parent[$this->childrenPath] = $childs;
- }
+ },
);
}
@@ -103,7 +109,7 @@ function (array &$foundField, int $index, array &$parent) use ($jsonFieldDefinit
array_splice($childs, $index + 1, 0, [$jsonFieldDefinition]);
$parent[$this->childrenPath] = $childs;
- }
+ },
);
}
@@ -116,7 +122,7 @@ function (array &$foundField, int $index, array &$parent) use ($keyValues) {
foreach ($keyValues as $key => $value) {
$foundField[$key] = $value;
}
- }
+ },
);
}
@@ -127,7 +133,7 @@ public function replaceField(string $fieldName, array $jsonFieldDefinition): voi
false,
function (array &$foundField, int $index, array &$parent) use ($jsonFieldDefinition) {
$foundField = $jsonFieldDefinition;
- }
+ },
);
}
@@ -146,7 +152,7 @@ function (array &$foundField, int $index, array &$parent) use ($jsonFieldDefinit
array_splice($childs, $index, 0, [$jsonFieldDefinition]);
$parent[$this->childrenPath] = $childs;
- }
+ },
);
}
@@ -161,7 +167,7 @@ function (array &$foundField, int $index, array &$parent) use ($jsonFieldDefinit
array_splice($childs, $index + 1, 0, [$jsonFieldDefinition]);
$parent[$this->childrenPath] = $childs;
- }
+ },
);
}
@@ -172,7 +178,7 @@ public function replaceLayout(string $fieldName, array $jsonFieldDefinition): vo
true,
function (array &$foundField, int $index, array &$parent) use ($jsonFieldDefinition) {
$foundField = $jsonFieldDefinition;
- }
+ },
);
}
@@ -185,7 +191,7 @@ function (array &$foundField, int $index, array &$parent) use ($keyValues) {
foreach ($keyValues as $key => $value) {
$foundField[$key] = $value;
}
- }
+ },
);
}
@@ -196,7 +202,7 @@ public function removeLayout(string $fieldName): void
true,
function (array &$foundField, int $index, array &$parent) {
unset($parent[$this->childrenPath][$index]);
- }
+ },
);
}
diff --git a/src/CoreShop/Component/Pimcore/DataObject/AbstractSluggableLinkGenerator.php b/src/CoreShop/Component/Pimcore/DataObject/AbstractSluggableLinkGenerator.php
index c70273b470..e2eaceafeb 100644
--- a/src/CoreShop/Component/Pimcore/DataObject/AbstractSluggableLinkGenerator.php
+++ b/src/CoreShop/Component/Pimcore/DataObject/AbstractSluggableLinkGenerator.php
@@ -1,17 +1,21 @@
fieldDefinitions = $this->classDefinition->getFieldDefinitions();
$this->jsonDefinition = json_decode(
DataObject\ClassDefinition\Service::generateClassDefinitionJson($this->classDefinition),
- true
+ true,
);
}
public function save(): bool
{
return null !== DataObject\ClassDefinition\Service::importClassDefinitionFromJson(
- $this->classDefinition,
- json_encode($this->jsonDefinition),
- true
- );
+ $this->classDefinition,
+ json_encode($this->jsonDefinition),
+ true,
+ );
}
}
diff --git a/src/CoreShop/Component/Pimcore/DataObject/ClassUpdateInterface.php b/src/CoreShop/Component/Pimcore/DataObject/ClassUpdateInterface.php
index 7c30ba7a8f..aad5a5e54f 100644
--- a/src/CoreShop/Component/Pimcore/DataObject/ClassUpdateInterface.php
+++ b/src/CoreShop/Component/Pimcore/DataObject/ClassUpdateInterface.php
@@ -1,17 +1,21 @@
eventDispatcher->dispatch(
new GenericEvent($note, $eventParams),
- sprintf('coreshop.note.%s.post_add', $note->getType())
+ sprintf('coreshop.note.%s.post_add', $note->getType()),
);
return $note;
@@ -109,7 +113,7 @@ public function deleteNote(int $noteId, array $eventParams = []): void
$this->eventDispatcher->dispatch(
new GenericEvent($note, $eventParams),
- sprintf('coreshop.note.%s.pot_delete', $noteType)
+ sprintf('coreshop.note.%s.pot_delete', $noteType),
);
}
}
diff --git a/src/CoreShop/Component/Pimcore/DataObject/NoteServiceInterface.php b/src/CoreShop/Component/Pimcore/DataObject/NoteServiceInterface.php
index b643a89d0c..88aaf253b2 100644
--- a/src/CoreShop/Component/Pimcore/DataObject/NoteServiceInterface.php
+++ b/src/CoreShop/Component/Pimcore/DataObject/NoteServiceInterface.php
@@ -1,17 +1,21 @@
getFullPath(),
- SluggableInterface::class
+ SluggableInterface::class,
));
}
diff --git a/src/CoreShop/Component/Pimcore/Slug/SluggableSlugger.php b/src/CoreShop/Component/Pimcore/Slug/SluggableSlugger.php
index 6ef6268fc0..dc714be859 100644
--- a/src/CoreShop/Component/Pimcore/Slug/SluggableSlugger.php
+++ b/src/CoreShop/Component/Pimcore/Slug/SluggableSlugger.php
@@ -1,17 +1,21 @@
getNameForSlug($locale) ?: (string)$sluggable->getId();
+ $name = $sluggable->getNameForSlug($locale) ?: (string) $sluggable->getId();
if (!$name) {
throw new SlugNotPossibleException('name is empty');
@@ -36,14 +40,14 @@ public function slug(SluggableInterface $sluggable, string $locale, string $suff
'/%s/%s-%s',
$locale,
strtolower($this->slugger->slug($name, '-', $locale)->toString()),
- $suffix
+ $suffix,
);
}
return sprintf(
'/%s/%s',
$locale,
- strtolower($this->slugger->slug($name, '-', $locale)->toString())
+ strtolower($this->slugger->slug($name, '-', $locale)->toString()),
);
}
}
diff --git a/src/CoreShop/Component/Pimcore/Slug/SluggableSluggerInterface.php b/src/CoreShop/Component/Pimcore/Slug/SluggableSluggerInterface.php
index 96eab49175..49fec4a331 100644
--- a/src/CoreShop/Component/Pimcore/Slug/SluggableSluggerInterface.php
+++ b/src/CoreShop/Component/Pimcore/Slug/SluggableSluggerInterface.php
@@ -1,17 +1,21 @@
inner->getPrice($product, $context, $withDiscount);
}
- $identifier = sprintf('%s%s', $product->getId(), (string)$withDiscount);
+ $identifier = sprintf('%s%s', $product->getId(), (string) $withDiscount);
if (!isset($this->cachedPrice[$identifier])) {
$this->cachedPrice[$identifier] = $this->inner->getPrice($product, $context, $withDiscount);
diff --git a/src/CoreShop/Component/Product/Calculator/ProductDiscountCalculatorInterface.php b/src/CoreShop/Component/Product/Calculator/ProductDiscountCalculatorInterface.php
index 982332fec4..fbef8357de 100644
--- a/src/CoreShop/Component/Product/Calculator/ProductDiscountCalculatorInterface.php
+++ b/src/CoreShop/Component/Product/Calculator/ProductDiscountCalculatorInterface.php
@@ -1,17 +1,21 @@
getUnit()->getId() !== $defaultDefinition->getUnit()->getId();
- });
+ })
+ ;
return new ArrayCollection(array_values($additionalDefinitions->toArray()));
}
diff --git a/src/CoreShop/Component/Product/Model/ProductUnitDefinitionsInterface.php b/src/CoreShop/Component/Product/Model/ProductUnitDefinitionsInterface.php
index a87a8957bf..89920a0e62 100644
--- a/src/CoreShop/Component/Product/Model/ProductUnitDefinitionsInterface.php
+++ b/src/CoreShop/Component/Product/Model/ProductUnitDefinitionsInterface.php
@@ -1,17 +1,21 @@
locate($quantityPriceRule->getRanges(), $quantity);
@@ -48,7 +52,7 @@ public function calculateForRange(
QuantityRangeInterface $range,
QuantityRangePriceAwareInterface $subject,
int $originalPrice,
- array $context
+ array $context,
): int {
return $this->calculateRangePrice($range, $subject, $originalPrice, $context);
}
diff --git a/src/CoreShop/Component/ProductQuantityPriceRules/Detector/QuantityReferenceDetector.php b/src/CoreShop/Component/ProductQuantityPriceRules/Detector/QuantityReferenceDetector.php
index e6786a6e3e..32ba4e0b7f 100644
--- a/src/CoreShop/Component/ProductQuantityPriceRules/Detector/QuantityReferenceDetector.php
+++ b/src/CoreShop/Component/ProductQuantityPriceRules/Detector/QuantityReferenceDetector.php
@@ -1,17 +1,21 @@
getPercentage() / 100) * $realItemPrice)), 0);
+ return max($realItemPrice - ((int) round(($range->getPercentage() / 100) * $realItemPrice)), 0);
}
}
diff --git a/src/CoreShop/Component/ProductQuantityPriceRules/Rule/Action/PercentageIncreaseAction.php b/src/CoreShop/Component/ProductQuantityPriceRules/Rule/Action/PercentageIncreaseAction.php
index 161a0465a0..fe208a11b0 100644
--- a/src/CoreShop/Component/ProductQuantityPriceRules/Rule/Action/PercentageIncreaseAction.php
+++ b/src/CoreShop/Component/ProductQuantityPriceRules/Rule/Action/PercentageIncreaseAction.php
@@ -1,17 +1,21 @@
getPercentage() / 100) * $realItemPrice));
+ return $realItemPrice + ((int) round(($range->getPercentage() / 100) * $realItemPrice));
}
}
diff --git a/src/CoreShop/Component/ProductQuantityPriceRules/Rule/Action/ProductQuantityPriceRuleActionInterface.php b/src/CoreShop/Component/ProductQuantityPriceRules/Rule/Action/ProductQuantityPriceRuleActionInterface.php
index a5b044a8bd..ffd6c5b21a 100644
--- a/src/CoreShop/Component/ProductQuantityPriceRules/Rule/Action/ProductQuantityPriceRuleActionInterface.php
+++ b/src/CoreShop/Component/ProductQuantityPriceRules/Rule/Action/ProductQuantityPriceRuleActionInterface.php
@@ -1,17 +1,21 @@
priortyMap = new PriorityMap();
}
@@ -36,7 +42,7 @@ public function register(string $identifier, int $priority, object $service): vo
if (!in_array($this->interface, class_implements($service), true)) {
throw new \InvalidArgumentException(
- sprintf('%s needs to implement "%s", "%s" given.', ucfirst($this->context), $this->interface, $service::class)
+ sprintf('%s needs to implement "%s", "%s" given.', ucfirst($this->context), $this->interface, $service::class),
);
}
diff --git a/src/CoreShop/Component/Registry/PrioritizedServiceRegistryInterface.php b/src/CoreShop/Component/Registry/PrioritizedServiceRegistryInterface.php
index 353bfd9cd5..e017c9eb40 100644
--- a/src/CoreShop/Component/Registry/PrioritizedServiceRegistryInterface.php
+++ b/src/CoreShop/Component/Registry/PrioritizedServiceRegistryInterface.php
@@ -1,17 +1,21 @@
addMethodCall('add', [$tag['type'], 'default', $tag['form-type']]);
+ ->addMethodCall('add', [$tag['type'], 'default', $tag['form-type']])
+ ;
}
}
}
diff --git a/src/CoreShop/Component/Registry/RegisterSimpleRegistryTypePass.php b/src/CoreShop/Component/Registry/RegisterSimpleRegistryTypePass.php
index 7e73038775..a30f52cdbe 100644
--- a/src/CoreShop/Component/Registry/RegisterSimpleRegistryTypePass.php
+++ b/src/CoreShop/Component/Registry/RegisterSimpleRegistryTypePass.php
@@ -1,17 +1,21 @@
interface, class_implements($service), true)) {
throw new \InvalidArgumentException(
- sprintf('%s needs to implement "%s", "%s" given.', ucfirst($this->context), $this->interface, $service::class)
+ sprintf('%s needs to implement "%s", "%s" given.', ucfirst($this->context), $this->interface, $service::class),
);
}
diff --git a/src/CoreShop/Component/Registry/ServiceRegistryInterface.php b/src/CoreShop/Component/Registry/ServiceRegistryInterface.php
index 5e09d458cc..acd5de5d24 100644
--- a/src/CoreShop/Component/Registry/ServiceRegistryInterface.php
+++ b/src/CoreShop/Component/Registry/ServiceRegistryInterface.php
@@ -1,17 +1,21 @@
doctrineProvider = $doctrineProvider;
@@ -44,7 +51,7 @@ public function getGraphQlFieldConfig($attribute, Data $fieldDefinition, $class
'type' => $this->getFieldType($fieldDefinition, $class, $container),
'resolve' => $this->getResolver($attribute, $fieldDefinition, $class),
],
- $container
+ $container,
);
}
diff --git a/src/CoreShop/Component/Resource/DataHub/QueryType/ResourceList.php b/src/CoreShop/Component/Resource/DataHub/QueryType/ResourceList.php
index a38b603a84..8cc03dac34 100644
--- a/src/CoreShop/Component/Resource/DataHub/QueryType/ResourceList.php
+++ b/src/CoreShop/Component/Resource/DataHub/QueryType/ResourceList.php
@@ -1,17 +1,21 @@
repositoryClassName(
$objectManager,
- $objectManager->getMetadataFactory()->getMetadataFor($this->className)
+ $objectManager->getMetadataFactory()->getMetadataFor($this->className),
);
}
}
diff --git a/src/CoreShop/Component/Resource/Factory/RepositoryFactoryInterface.php b/src/CoreShop/Component/Resource/Factory/RepositoryFactoryInterface.php
index 840ba733ee..878b0b50db 100644
--- a/src/CoreShop/Component/Resource/Factory/RepositoryFactoryInterface.php
+++ b/src/CoreShop/Component/Resource/Factory/RepositoryFactoryInterface.php
@@ -1,17 +1,21 @@
driver = $parameters['driver'];
$this->templatesNamespace = array_key_exists('templates', $parameters) ? $parameters['templates'] : null;
diff --git a/src/CoreShop/Component/Resource/Metadata/MetadataInterface.php b/src/CoreShop/Component/Resource/Metadata/MetadataInterface.php
index 7574b1b9e6..c0df6ccb0e 100644
--- a/src/CoreShop/Component/Resource/Metadata/MetadataInterface.php
+++ b/src/CoreShop/Component/Resource/Metadata/MetadataInterface.php
@@ -1,17 +1,21 @@
objectService->createFolderByPath(
- sprintf('%s%s%s', $options['prefix'], $path, $options['suffix'])
+ sprintf('%s%s%s', $options['prefix'], $path, $options['suffix']),
);
}
}
diff --git a/src/CoreShop/Component/Resource/Service/FolderCreationServiceInterface.php b/src/CoreShop/Component/Resource/Service/FolderCreationServiceInterface.php
index 6f096cbfef..8985a460a9 100644
--- a/src/CoreShop/Component/Resource/Service/FolderCreationServiceInterface.php
+++ b/src/CoreShop/Component/Resource/Service/FolderCreationServiceInterface.php
@@ -1,17 +1,21 @@
processed[$subject->getId()])) {
$this->processed[$subject->getId()] = [
diff --git a/src/CoreShop/Component/Rule/Condition/TraceableRuleConditionsValidationProcessorInterface.php b/src/CoreShop/Component/Rule/Condition/TraceableRuleConditionsValidationProcessorInterface.php
index 88673d8d87..f5b0ebdf1b 100644
--- a/src/CoreShop/Component/Rule/Condition/TraceableRuleConditionsValidationProcessorInterface.php
+++ b/src/CoreShop/Component/Rule/Condition/TraceableRuleConditionsValidationProcessorInterface.php
@@ -1,17 +1,21 @@
shippingRuleProcessor->getModification(
$shippingRule,
@@ -49,7 +55,7 @@ public function getPrice(CarrierInterface $carrier, ShippableInterface $shippabl
$shippable,
$address,
$price,
- $context
+ $context,
);
return $price + $modifications;
diff --git a/src/CoreShop/Component/Shipping/Calculator/CompositePriceCalculator.php b/src/CoreShop/Component/Shipping/Calculator/CompositePriceCalculator.php
index 14d5d51bab..105bcac251 100644
--- a/src/CoreShop/Component/Shipping/Calculator/CompositePriceCalculator.php
+++ b/src/CoreShop/Component/Shipping/Calculator/CompositePriceCalculator.php
@@ -1,17 +1,21 @@
getShippingRules();
diff --git a/src/CoreShop/Component/Shipping/Checker/CarrierShippingRuleCheckerInterface.php b/src/CoreShop/Component/Shipping/Checker/CarrierShippingRuleCheckerInterface.php
index ff71724ff9..311dbd77a7 100644
--- a/src/CoreShop/Component/Shipping/Checker/CarrierShippingRuleCheckerInterface.php
+++ b/src/CoreShop/Component/Shipping/Checker/CarrierShippingRuleCheckerInterface.php
@@ -1,17 +1,21 @@
hideFromCheckout = $hideFromCheckout;
}
-
+
public function getLogo()
{
return $this->logo;
diff --git a/src/CoreShop/Component/Shipping/Model/CarrierAwareInterface.php b/src/CoreShop/Component/Shipping/Model/CarrierAwareInterface.php
index 4f06c741d9..9a4047aa04 100644
--- a/src/CoreShop/Component/Shipping/Model/CarrierAwareInterface.php
+++ b/src/CoreShop/Component/Shipping/Model/CarrierAwareInterface.php
@@ -1,17 +1,21 @@
getConfiguration(),
- $context
+ $context,
);
}
}
@@ -61,7 +65,7 @@ public function getModification(
ShippableInterface $shippable,
AddressInterface $address,
int $price,
- array $context
+ array $context,
): int {
$modifications = 0;
@@ -75,7 +79,7 @@ public function getModification(
$address,
$price,
$action->getConfiguration(),
- $context
+ $context,
);
}
}
diff --git a/src/CoreShop/Component/Shipping/Resolver/CarriersResolver.php b/src/CoreShop/Component/Shipping/Resolver/CarriersResolver.php
index e5d201f838..895fcce1df 100644
--- a/src/CoreShop/Component/Shipping/Resolver/CarriersResolver.php
+++ b/src/CoreShop/Component/Shipping/Resolver/CarriersResolver.php
@@ -1,17 +1,21 @@
shippingRuleRepository->find($configuration['shippingRule']);
@@ -49,7 +55,7 @@ public function getModification(
AddressInterface $address,
int $price,
array $configuration,
- array $context
+ array $context,
): int {
$shippingRule = $this->shippingRuleRepository->find($configuration['shippingRule']);
diff --git a/src/CoreShop/Component/Shipping/Rule/Condition/AbstractConditionChecker.php b/src/CoreShop/Component/Shipping/Rule/Condition/AbstractConditionChecker.php
index e2cc9a18ee..1dfd808245 100644
--- a/src/CoreShop/Component/Shipping/Rule/Condition/AbstractConditionChecker.php
+++ b/src/CoreShop/Component/Shipping/Rule/Condition/AbstractConditionChecker.php
@@ -1,17 +1,21 @@
*/
protected PriorityQueue $contexts;
diff --git a/src/CoreShop/Component/StorageList/Context/StorageListContextInterface.php b/src/CoreShop/Component/StorageList/Context/StorageListContextInterface.php
index 1df4f4840d..4bf8a5dd61 100644
--- a/src/CoreShop/Component/StorageList/Context/StorageListContextInterface.php
+++ b/src/CoreShop/Component/StorageList/Context/StorageListContextInterface.php
@@ -1,17 +1,21 @@
addToWishlistClass($storageList, $storageListItem);
if (!in_array(AddToStorageListInterface::class, class_implements($class), true)) {
throw new \InvalidArgumentException(
- sprintf('%s needs to implement "%s".', $class::class, AddToStorageListInterface::class)
+ sprintf('%s needs to implement "%s".', $class::class, AddToStorageListInterface::class),
);
}
diff --git a/src/CoreShop/Component/StorageList/Factory/AddToStorageListFactoryInterface.php b/src/CoreShop/Component/StorageList/Factory/AddToStorageListFactoryInterface.php
index ae885b7f33..45cf605d90 100644
--- a/src/CoreShop/Component/StorageList/Factory/AddToStorageListFactoryInterface.php
+++ b/src/CoreShop/Component/StorageList/Factory/AddToStorageListFactoryInterface.php
@@ -1,17 +1,21 @@
setParent(
$this->folderCreationService->createFolderForResource(
$item,
- ['prefix' => $storageList->getFullPath()]
- )
+ ['prefix' => $storageList->getFullPath()],
+ ),
);
$item->setPublished(true);
$item->setKey($index + 1);
diff --git a/src/CoreShop/Component/StorageList/Model/StorageList.php b/src/CoreShop/Component/StorageList/Model/StorageList.php
index ed646a34da..39ab4e50aa 100644
--- a/src/CoreShop/Component/StorageList/Model/StorageList.php
+++ b/src/CoreShop/Component/StorageList/Model/StorageList.php
@@ -1,17 +1,21 @@
storageListItemFinder->equals($item, $storageListItem)) {
$this->storageListItemQuantityModifier->modify(
$item,
- $item->getQuantity() + $storageListItem->getQuantity()
+ $item->getQuantity() + $storageListItem->getQuantity(),
);
return;
diff --git a/src/CoreShop/Component/StorageList/StorageListItemModelEqualsResolver.php b/src/CoreShop/Component/StorageList/StorageListItemModelEqualsResolver.php
index 86203f14bc..c1d3f26ae7 100644
--- a/src/CoreShop/Component/StorageList/StorageListItemModelEqualsResolver.php
+++ b/src/CoreShop/Component/StorageList/StorageListItemModelEqualsResolver.php
@@ -1,17 +1,21 @@
*/
private PriorityQueue $storeContexts;
diff --git a/src/CoreShop/Component/Store/Context/FixedStoreContext.php b/src/CoreShop/Component/Store/Context/FixedStoreContext.php
index ceb6c36ffb..4e1e02ec68 100644
--- a/src/CoreShop/Component/Store/Context/FixedStoreContext.php
+++ b/src/CoreShop/Component/Store/Context/FixedStoreContext.php
@@ -1,17 +1,21 @@
request->get('id');
if ($id) {
- $document = Document::getById((int)$id);
+ $document = Document::getById((int) $id);
}
}
diff --git a/src/CoreShop/Component/Store/Context/RequestBased/PimcoreAreaBrickRenderResolver.php b/src/CoreShop/Component/Store/Context/RequestBased/PimcoreAreaBrickRenderResolver.php
index 5a8111dbff..e8a188d760 100644
--- a/src/CoreShop/Component/Store/Context/RequestBased/PimcoreAreaBrickRenderResolver.php
+++ b/src/CoreShop/Component/Store/Context/RequestBased/PimcoreAreaBrickRenderResolver.php
@@ -1,17 +1,21 @@
request->get('documentId');
if ($documentId) {
- $document = Document::getById((int)$documentId);
+ $document = Document::getById((int) $documentId);
if ($document) {
$site = Frontend::getSiteForDocument($document);
diff --git a/src/CoreShop/Component/Store/Context/RequestBased/RequestResolverInterface.php b/src/CoreShop/Component/Store/Context/RequestBased/RequestResolverInterface.php
index f65ff93417..02341bfc9b 100644
--- a/src/CoreShop/Component/Store/Context/RequestBased/RequestResolverInterface.php
+++ b/src/CoreShop/Component/Store/Context/RequestBased/RequestResolverInterface.php
@@ -1,17 +1,21 @@
taxRates = $taxRates;
- $this->computationMethod = (int)$computationMethod;
+ $this->computationMethod = (int) $computationMethod;
}
public function applyTaxes(int $price): int
{
- return (int)round($price * (1 + ($this->getTotalRate() / 100)));
+ return (int) round($price * (1 + ($this->getTotalRate() / 100)));
}
public function removeTaxes(int $price): int
{
- return (int)round($price / (1 + $this->getTotalRate() / 100));
+ return (int) round($price / (1 + $this->getTotalRate() / 100));
}
public function getTotalRate(): float
@@ -58,7 +64,7 @@ public function getTotalRate(): float
}
}
- return (float)$taxes;
+ return (float) $taxes;
}
public function getTaxesAmountFromGross(int $price): int
@@ -72,10 +78,10 @@ public function getTaxesAmountFromGrossAsArray(int $price): array
foreach ($this->getTaxRates() as $tax) {
if ($this->computationMethod === self::ONE_AFTER_ANOTHER_METHOD) {
- $taxesAmounts[$tax->getId()] = (int)round($price - ($price / (1 + ($tax->getRate() / 100))));
+ $taxesAmounts[$tax->getId()] = (int) round($price - ($price / (1 + ($tax->getRate() / 100))));
$price -= $taxesAmounts[$tax->getId()];
} else {
- $taxesAmounts[$tax->getId()] = (int)round($price - ($price / (1 + ($tax->getRate() / 100))));
+ $taxesAmounts[$tax->getId()] = (int) round($price - ($price / (1 + ($tax->getRate() / 100))));
}
}
@@ -84,7 +90,7 @@ public function getTaxesAmountFromGrossAsArray(int $price): array
public function getTaxesAmount(int $price): int
{
- return (int)array_sum($this->getTaxesAmountAsArray($price));
+ return (int) array_sum($this->getTaxesAmountAsArray($price));
}
public function getTaxesAmountAsArray(int $price): array
@@ -93,10 +99,10 @@ public function getTaxesAmountAsArray(int $price): array
foreach ($this->getTaxRates() as $tax) {
if ($this->computationMethod === self::ONE_AFTER_ANOTHER_METHOD) {
- $taxesAmounts[$tax->getId()] = (int)round($price * (abs($tax->getRate()) / 100));
+ $taxesAmounts[$tax->getId()] = (int) round($price * (abs($tax->getRate()) / 100));
$price += $taxesAmounts[$tax->getId()];
} else {
- $taxesAmounts[$tax->getId()] = (int)round(($price * (abs($tax->getRate()) / 100)));
+ $taxesAmounts[$tax->getId()] = (int) round(($price * (abs($tax->getRate()) / 100)));
}
}
diff --git a/src/CoreShop/Component/Taxation/Collector/TaxCollector.php b/src/CoreShop/Component/Taxation/Collector/TaxCollector.php
index eeafdafcd0..3a0c0036df 100644
--- a/src/CoreShop/Component/Taxation/Collector/TaxCollector.php
+++ b/src/CoreShop/Component/Taxation/Collector/TaxCollector.php
@@ -1,17 +1,21 @@
$a->getGroup()->getSorting() <=> $b->getGroup()->getSorting());
+ usort($resolvedGroups, static fn (ResolvedAttributeGroup $a, ResolvedAttributeGroup $b) => $a->getGroup()->getSorting() <=> $b->getGroup()->getSorting());
return $resolvedGroups;
}
diff --git a/src/CoreShop/Component/Variant/AttributeCollectorInterface.php b/src/CoreShop/Component/Variant/AttributeCollectorInterface.php
index 688b39fb4e..8c240b7748 100644
--- a/src/CoreShop/Component/Variant/AttributeCollectorInterface.php
+++ b/src/CoreShop/Component/Variant/AttributeCollectorInterface.php
@@ -1,17 +1,21 @@
setObjectTypes([AbstractObject::OBJECT_TYPE_VARIANT]);
$variants = $list->getObjects();
- }
- else {
+ } else {
$variants = $this->getChildren([AbstractObject::OBJECT_TYPE_VARIANT]);
}
@@ -79,24 +82,26 @@ public function findMainVariant(): ?ProductVariantAwareInterface
$attributesA = $a->getAttributes();
$attributesB = $b->getAttributes();
- usort($attributesA,
- static fn(
+ usort(
+ $attributesA,
+ static fn (
AttributeInterface $attributeA,
- AttributeInterface $attributeB
- ) => $attributeA->getAttributeGroup()->getSorting() <=> $attributeB->getAttributeGroup()->getSorting()
+ AttributeInterface $attributeB,
+ ) => $attributeA->getAttributeGroup()->getSorting() <=> $attributeB->getAttributeGroup()->getSorting(),
);
- usort($attributesB,
- static fn(
+ usort(
+ $attributesB,
+ static fn (
AttributeInterface $attributeA,
- AttributeInterface $attributeB
- ) => $attributeA->getAttributeGroup()->getSorting() <=> $attributeB->getAttributeGroup()->getSorting()
+ AttributeInterface $attributeB,
+ ) => $attributeA->getAttributeGroup()->getSorting() <=> $attributeB->getAttributeGroup()->getSorting(),
);
return
- array_map(static fn(AttributeInterface $aa): ?float => $aa->getSorting(), $attributesA)
+ array_map(static fn (AttributeInterface $aa): ?float => $aa->getSorting(), $attributesA)
<=>
- array_map(static fn(AttributeInterface $bb): ?float => $bb->getSorting(), $attributesB);
+ array_map(static fn (AttributeInterface $bb): ?float => $bb->getSorting(), $attributesB);
});
if (count($variants) > 0) {
diff --git a/src/CoreShop/Component/Variant/Model/Resolved/ResolvedAttribute.php b/src/CoreShop/Component/Variant/Model/Resolved/ResolvedAttribute.php
index 18013e721b..1fcd3ef89d 100644
--- a/src/CoreShop/Component/Variant/Model/Resolved/ResolvedAttribute.php
+++ b/src/CoreShop/Component/Variant/Model/Resolved/ResolvedAttribute.php
@@ -1,17 +1,21 @@
products->contains($product);
}
-}
\ No newline at end of file
+}
diff --git a/src/CoreShop/Component/Variant/Model/Resolved/ResolvedAttributeGroup.php b/src/CoreShop/Component/Variant/Model/Resolved/ResolvedAttributeGroup.php
index a9bd8fe481..baca46a989 100644
--- a/src/CoreShop/Component/Variant/Model/Resolved/ResolvedAttributeGroup.php
+++ b/src/CoreShop/Component/Variant/Model/Resolved/ResolvedAttributeGroup.php
@@ -1,17 +1,21 @@
attributes->toArray();
- usort($attributes, static fn(ResolvedAttribute $a, ResolvedAttribute $b) => $a->getAttribute()->getSorting() <=> $b->getAttribute()->getSorting());
+ usort($attributes, static fn (ResolvedAttribute $a, ResolvedAttribute $b) => $a->getAttribute()->getSorting() <=> $b->getAttribute()->getSorting());
return $attributes;
}
diff --git a/src/CoreShop/Component/Variant/Model/Resolved/ResolvedIndex.php b/src/CoreShop/Component/Variant/Model/Resolved/ResolvedIndex.php
index e97137aa0b..70f765fc9b 100644
--- a/src/CoreShop/Component/Variant/Model/Resolved/ResolvedIndex.php
+++ b/src/CoreShop/Component/Variant/Model/Resolved/ResolvedIndex.php
@@ -1,17 +1,21 @@
url = $url;
}
-}
\ No newline at end of file
+}
diff --git a/src/CoreShop/Component/Wishlist/Model/Wishlist.php b/src/CoreShop/Component/Wishlist/Model/Wishlist.php
index 14cab6e849..a345b4f201 100644
--- a/src/CoreShop/Component/Wishlist/Model/Wishlist.php
+++ b/src/CoreShop/Component/Wishlist/Model/Wishlist.php
@@ -1,17 +1,21 @@
eventDispatcher->dispatch(
new GenericEvent($storageList, ['item' => $item]),
- WishlistEvents::PRE_REMOVE_ITEM
+ WishlistEvents::PRE_REMOVE_ITEM,
);
$storageList->removeItem($item);
@@ -57,7 +61,7 @@ public function removeFromList(StorageListInterface $storageList, StorageListIte
$this->eventDispatcher->dispatch(
new GenericEvent($storageList, ['item' => $item]),
- WishlistEvents::POST_REMOVE_ITEM
+ WishlistEvents::POST_REMOVE_ITEM,
);
}
@@ -71,14 +75,14 @@ private function resolveItem(StorageListInterface $storageList, StorageListItemI
$this->eventDispatcher->dispatch(
new GenericEvent($storageList, ['item' => $storageListItem]),
- WishlistEvents::PRE_ADD_ITEM
+ WishlistEvents::PRE_ADD_ITEM,
);
$storageList->addItem($storageListItem);
$this->eventDispatcher->dispatch(
new GenericEvent($storageList, ['item' => $storageListItem]),
- WishlistEvents::POST_ADD_ITEM
+ WishlistEvents::POST_ADD_ITEM,
);
}
}
diff --git a/src/CoreShop/Component/Wishlist/WishlistEvents.php b/src/CoreShop/Component/Wishlist/WishlistEvents.php
index 6ff7ce086f..f5e3375e9b 100644
--- a/src/CoreShop/Component/Wishlist/WishlistEvents.php
+++ b/src/CoreShop/Component/Wishlist/WishlistEvents.php
@@ -1,17 +1,21 @@