diff --git a/UPGRADE-1.13.md b/UPGRADE-1.13.md index 2741b9cd22..d24830da2e 100644 --- a/UPGRADE-1.13.md +++ b/UPGRADE-1.13.md @@ -182,7 +182,7 @@ To ease the update process, we have grouped the changes into the following categ `Sylius\Bundle\CoreBundle\Fixture\Factory\PromotionExampleFactory` ```diff - use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; + use Sylius\Component\Resource\Repository\RepositoryInterface; public function __construct( FactoryInterface $promotionFactory, @@ -285,7 +285,7 @@ To ease the update process, we have grouped the changes into the following categ `Sylius\Component\Addressing\Matcher\ZoneMatcher` ```diff use Sylius\Component\Addressing\Repository\ZoneRepositoryInterface; - use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; + use Sylius\Component\Resource\Repository\RepositoryInterface; public function __construct( - private RepositoryInterface $zoneRepository, diff --git a/phpstan.neon.dist b/phpstan.neon.dist index 253c24712f..a030e9ccf6 100644 --- a/phpstan.neon.dist +++ b/phpstan.neon.dist @@ -34,35 +34,6 @@ parameters: # To investigate, occurs after release of doctrine/orm 2.14, the processing of these classes ends with exit code 143 - 'src/Sylius/Bundle/CoreBundle/Doctrine/DQL/**.php' - 'src/Sylius/Bundle/CoreBundle/Doctrine/ORM/SqlWalker/**.php' - - # To support both sylius/resource-bundle 1.11 and older versions - - 'src/Sylius/Bundle/AdminBundle/Controller/RedirectHandler.php' - - 'src/Sylius/Bundle/ApiBundle/OpenApi/Documentation/AcceptLanguageHeaderDocumentationModifier.php' - - 'src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Handler/ResourceDeleteHandler.php' - - 'src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Handler/ResourceUpdateHandler.php' - - 'src/Sylius/Bundle/CoreBundle/Fixture/Factory/PromotionExampleFactory.php' - - 'src/Sylius/Bundle/CoreBundle/Resource/StateMachine/Controller/CompositeStateMachine.php' - - 'src/Sylius/Bundle/CoreBundle/Validator/Constraints/ChannelCodeCollectionValidator.php' - - 'src/Sylius/Bundle/CoreBundle/Validator/Constraints/CountryCodeExistsValidator.php' - - 'src/Sylius/Bundle/CoreBundle/Validator/Constraints/ResendOrderConfirmationEmailWithValidOrderStateValidator.php' - - 'src/Sylius/Bundle/CoreBundle/Validator/Constraints/ResendShipmentConfirmationEmailWithValidShipmentStateValidator.php' - - 'src/Sylius/Bundle/PromotionBundle/Form/Type/PromotionCouponToCodeType.php' - - 'src/Sylius/Bundle/TaxonomyBundle/Controller/TaxonSlugController.php' - - 'src/Sylius/Bundle/UserBundle/Factory/UserWithEncoderFactory.php' - - 'src/Sylius/Component/Addressing/Matcher/ZoneMatcher.php' - - 'src/Sylius/Component/Core/Customer/Statistics/CustomerStatisticsProvider.php' - - 'src/Sylius/Component/Core/Factory/ChannelFactory.php' - - 'src/Sylius/Component/Core/Factory/PaymentMethodFactory.php' - - 'src/Sylius/Component/Core/Factory/PromotionActionFactory.php' - - 'src/Sylius/Component/Core/Promotion/Checker/ProductInPromotionRuleChecker.php' - - 'src/Sylius/Component/Core/Promotion/Checker/TaxonInPromotionRuleChecker.php' - - 'src/Sylius/Component/Core/Provider/TranslationLocaleProvider.php' - - 'src/Sylius/Component/Core/Test/Tests/Taxation/Applicator/OrderItemUnitsTaxesApplicatorTest.php' - - 'src/Sylius/Component/Core/Test/Tests/Taxation/Applicator/OrderItemsTaxesApplicatorTest.php' - - 'src/Sylius/Component/Core/Translation/TranslatableEntityLocaleAssigner.php' - - 'src/Sylius/Component/Locale/Provider/LocaleCollectionProvider.php' - - 'src/Sylius/Component/Locale/Provider/LocaleProvider.php' - ignoreErrors: - '/(Interface|Class) [a-zA-Z\\]+ specifies template type (\w+) of interface [a-zA-Z\\]+ as [a-zA-Z\\]+ (of [a-zA-Z\\]+ )?but it''s already specified as/' # turns off a weird generics check behavior, we are basing on Psalm for generics checks - '/Access to an undefined property Doctrine\\Common\\Collections\\ArrayCollection/' @@ -74,12 +45,4 @@ parameters: - '/Method Sylius\\Component\\(\w+)\\Model\\(\w+)\:\:getId\(\) has no return type specified./' - '/Method [a-zA-z\\]+Filter\:\:filterProperty\(\) has parameter \$value with no type specified./' - '/Method [a-zA-z\\]+Persister\:\:(persist|remove|supports)\(\) has parameter \$data with no type specified./' - - # To support both sylius/resource-bundle 1.11 and older versions - - '/Call to an undefined method Sylius\\Resource\\Model\\ResourceInterface::\w+\(\)\./' - - '/Method Sylius\\Component\\Payment\\Resolver\\PaymentMethodsResolver::getSupportedMethods\(\) should return array but returns array\./' - - '/Method Sylius\\Component\\Taxation\\Resolver\\TaxRateResolver::resolve\(\) should return Sylius\\Component\\Taxation\\Model\\TaxRateInterface\|null but returns Sylius\\Resource\\Model\\ResourceInterface\|null\./' - - '/Parameter #\d+ \$(\w+) \(Sylius\\Component\\\w+\\Model\\\w+(\|null)?\) of method Sylius\\Bundle\\\w+\\Controller\\\w+::\w+\(\) is not contravariant with parameter #\d+ \$(\w+) \(Sylius\\Resource\\Model\\\w+(\|null)?\) of method Sylius\\Bundle\\\w+\\Controller\\\w+\::\w+\(\)\./' - - '/PHPDoc tag @extends contains generic type Sylius\\Component\\Resource\\\w+\\\w+ but interface Sylius\\Component\\Resource\\\w+\\\w+ is not generic\./' - - '/PHPDoc tag @param for parameter \$(\w+) contains generic type Sylius\\Component\\Resource\\\w+\\\w+ but interface Sylius\\Component\\Resource\\\w+\\\w+ is not generic\./' - - '/PHPDoc type for property Sylius\\Bundle\\\w+\\\w+\\\w+::\$(\w+) contains generic type Sylius\\Component\\Resource\\\w+\\\w+ but interface Sylius\\Component\\Resource\\\w+\\\w+ is not generic\./' + - '/Method Sylius\\Bundle\\CoreBundle\\Fixture\\OptionsResolver\\LazyOption\:\:(\w+)\(\) has parameter \$repository with generic interface Sylius\\Resource\\Doctrine\\Persistence\\RepositoryInterface but does not specify its types\: T/' diff --git a/src/Sylius/Bundle/AddressingBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/AddressingBundle/DependencyInjection/Configuration.php index 4f741c772c..03638df0d3 100644 --- a/src/Sylius/Bundle/AddressingBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/AddressingBundle/DependencyInjection/Configuration.php @@ -33,7 +33,7 @@ use Sylius\Component\Addressing\Model\Zone; use Sylius\Component\Addressing\Model\ZoneInterface; use Sylius\Component\Addressing\Model\ZoneMember; use Sylius\Component\Addressing\Model\ZoneMemberInterface; -use Sylius\Component\Resource\Factory\Factory; +use Sylius\Resource\Factory\Factory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; diff --git a/src/Sylius/Bundle/AddressingBundle/Form/Type/CountryChoiceType.php b/src/Sylius/Bundle/AddressingBundle/Form/Type/CountryChoiceType.php index b547c55b03..2eadd48ad8 100644 --- a/src/Sylius/Bundle/AddressingBundle/Form/Type/CountryChoiceType.php +++ b/src/Sylius/Bundle/AddressingBundle/Form/Type/CountryChoiceType.php @@ -24,6 +24,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class CountryChoiceType extends AbstractType { + /** @param RepositoryInterface $countryRepository */ public function __construct(private RepositoryInterface $countryRepository) { } diff --git a/src/Sylius/Bundle/AddressingBundle/Form/Type/CountryCodeChoiceType.php b/src/Sylius/Bundle/AddressingBundle/Form/Type/CountryCodeChoiceType.php index 7abb8435c0..a7009b87d0 100644 --- a/src/Sylius/Bundle/AddressingBundle/Form/Type/CountryCodeChoiceType.php +++ b/src/Sylius/Bundle/AddressingBundle/Form/Type/CountryCodeChoiceType.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Sylius\Bundle\AddressingBundle\Form\Type; use Sylius\Bundle\ResourceBundle\Form\DataTransformer\ResourceToIdentifierTransformer; +use Sylius\Component\Addressing\Model\CountryInterface; use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; @@ -21,6 +22,7 @@ use Symfony\Component\Form\ReversedTransformer; final class CountryCodeChoiceType extends AbstractType { + /** @param RepositoryInterface $countryRepository */ public function __construct(private RepositoryInterface $countryRepository) { } diff --git a/src/Sylius/Bundle/AddressingBundle/Form/Type/ProvinceChoiceType.php b/src/Sylius/Bundle/AddressingBundle/Form/Type/ProvinceChoiceType.php index 9580fc0e73..a72343fc1b 100644 --- a/src/Sylius/Bundle/AddressingBundle/Form/Type/ProvinceChoiceType.php +++ b/src/Sylius/Bundle/AddressingBundle/Form/Type/ProvinceChoiceType.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Sylius\Bundle\AddressingBundle\Form\Type; use Sylius\Component\Addressing\Model\CountryInterface; +use Sylius\Component\Addressing\Model\ProvinceInterface; use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; @@ -22,6 +23,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class ProvinceChoiceType extends AbstractType { + /** @param RepositoryInterface $provinceRepository */ public function __construct(private RepositoryInterface $provinceRepository) { } diff --git a/src/Sylius/Bundle/AddressingBundle/Form/Type/ProvinceCodeChoiceType.php b/src/Sylius/Bundle/AddressingBundle/Form/Type/ProvinceCodeChoiceType.php index 8ca853025b..ba039e5204 100644 --- a/src/Sylius/Bundle/AddressingBundle/Form/Type/ProvinceCodeChoiceType.php +++ b/src/Sylius/Bundle/AddressingBundle/Form/Type/ProvinceCodeChoiceType.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Sylius\Bundle\AddressingBundle\Form\Type; use Sylius\Bundle\ResourceBundle\Form\DataTransformer\ResourceToIdentifierTransformer; +use Sylius\Component\Addressing\Model\ProvinceInterface; use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; @@ -21,6 +22,7 @@ use Symfony\Component\Form\ReversedTransformer; final class ProvinceCodeChoiceType extends AbstractType { + /** @param RepositoryInterface $provinceRepository */ public function __construct(private RepositoryInterface $provinceRepository) { } diff --git a/src/Sylius/Bundle/AddressingBundle/Form/Type/ZoneChoiceType.php b/src/Sylius/Bundle/AddressingBundle/Form/Type/ZoneChoiceType.php index abaf35ad7f..6d4b1d2a96 100644 --- a/src/Sylius/Bundle/AddressingBundle/Form/Type/ZoneChoiceType.php +++ b/src/Sylius/Bundle/AddressingBundle/Form/Type/ZoneChoiceType.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Sylius\Bundle\AddressingBundle\Form\Type; use Sylius\Component\Addressing\Model\Scope as AddressingScope; +use Sylius\Component\Addressing\Model\ZoneInterface; use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; @@ -22,6 +23,10 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class ZoneChoiceType extends AbstractType { + /** + * @param RepositoryInterface $zoneRepository + * @param array $scopeTypes + */ public function __construct(private RepositoryInterface $zoneRepository, private array $scopeTypes = []) { if (count($scopeTypes) === 0) { diff --git a/src/Sylius/Bundle/AddressingBundle/Form/Type/ZoneCodeChoiceType.php b/src/Sylius/Bundle/AddressingBundle/Form/Type/ZoneCodeChoiceType.php index b91eb5f10d..b1f93d2041 100644 --- a/src/Sylius/Bundle/AddressingBundle/Form/Type/ZoneCodeChoiceType.php +++ b/src/Sylius/Bundle/AddressingBundle/Form/Type/ZoneCodeChoiceType.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Sylius\Bundle\AddressingBundle\Form\Type; use Sylius\Bundle\ResourceBundle\Form\DataTransformer\ResourceToIdentifierTransformer; +use Sylius\Component\Addressing\Model\ZoneInterface; use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\Extension\Core\Type\ChoiceType; @@ -24,6 +25,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class ZoneCodeChoiceType extends AbstractType { + /** @param RepositoryInterface $zoneRepository */ public function __construct(private RepositoryInterface $zoneRepository) { } diff --git a/src/Sylius/Bundle/AddressingBundle/Validator/Constraints/ProvinceAddressConstraintValidator.php b/src/Sylius/Bundle/AddressingBundle/Validator/Constraints/ProvinceAddressConstraintValidator.php index 73c3a24fb8..e69566d95a 100644 --- a/src/Sylius/Bundle/AddressingBundle/Validator/Constraints/ProvinceAddressConstraintValidator.php +++ b/src/Sylius/Bundle/AddressingBundle/Validator/Constraints/ProvinceAddressConstraintValidator.php @@ -23,6 +23,10 @@ use Webmozart\Assert\Assert; class ProvinceAddressConstraintValidator extends ConstraintValidator { + /** + * @param RepositoryInterface $countryRepository + * @param RepositoryInterface $provinceRepository + */ public function __construct(private RepositoryInterface $countryRepository, private RepositoryInterface $provinceRepository) { } diff --git a/src/Sylius/Bundle/AdminBundle/Controller/CustomerStatisticsController.php b/src/Sylius/Bundle/AdminBundle/Controller/CustomerStatisticsController.php index 4eaa08b153..8d7d662539 100644 --- a/src/Sylius/Bundle/AdminBundle/Controller/CustomerStatisticsController.php +++ b/src/Sylius/Bundle/AdminBundle/Controller/CustomerStatisticsController.php @@ -23,6 +23,7 @@ use Twig\Environment; final class CustomerStatisticsController { + /** @param RepositoryInterface $customerRepository */ public function __construct( private CustomerStatisticsProviderInterface $statisticsProvider, private RepositoryInterface $customerRepository, diff --git a/src/Sylius/Bundle/ApiBundle/CommandHandler/Account/RegisterShopUserHandler.php b/src/Sylius/Bundle/ApiBundle/CommandHandler/Account/RegisterShopUserHandler.php index ea078d3b96..de3d791564 100644 --- a/src/Sylius/Bundle/ApiBundle/CommandHandler/Account/RegisterShopUserHandler.php +++ b/src/Sylius/Bundle/ApiBundle/CommandHandler/Account/RegisterShopUserHandler.php @@ -29,6 +29,7 @@ use Symfony\Component\Messenger\Stamp\DispatchAfterCurrentBusStamp; final class RegisterShopUserHandler implements MessageHandlerInterface { + /** @param FactoryInterface $shopUserFactory */ public function __construct( private FactoryInterface $shopUserFactory, private ObjectManager $shopUserManager, diff --git a/src/Sylius/Bundle/ApiBundle/CommandHandler/Account/VerifyCustomerAccountHandler.php b/src/Sylius/Bundle/ApiBundle/CommandHandler/Account/VerifyCustomerAccountHandler.php index dfdba4c671..cee7f147f1 100644 --- a/src/Sylius/Bundle/ApiBundle/CommandHandler/Account/VerifyCustomerAccountHandler.php +++ b/src/Sylius/Bundle/ApiBundle/CommandHandler/Account/VerifyCustomerAccountHandler.php @@ -25,6 +25,7 @@ use Symfony\Component\Messenger\Stamp\DispatchAfterCurrentBusStamp; final class VerifyCustomerAccountHandler implements MessageHandlerInterface { + /** @param RepositoryInterface $shopUserRepository */ public function __construct( private RepositoryInterface $shopUserRepository, private DateTimeProviderInterface $calendar, diff --git a/src/Sylius/Bundle/ApiBundle/CommandHandler/Catalog/AddProductReviewHandler.php b/src/Sylius/Bundle/ApiBundle/CommandHandler/Catalog/AddProductReviewHandler.php index afe683451a..de34523a98 100644 --- a/src/Sylius/Bundle/ApiBundle/CommandHandler/Catalog/AddProductReviewHandler.php +++ b/src/Sylius/Bundle/ApiBundle/CommandHandler/Catalog/AddProductReviewHandler.php @@ -16,8 +16,8 @@ namespace Sylius\Bundle\ApiBundle\CommandHandler\Catalog; use Sylius\Bundle\ApiBundle\Command\Catalog\AddProductReview; use Sylius\Bundle\ApiBundle\Exception\ProductNotFoundException; use Sylius\Bundle\CoreBundle\Resolver\CustomerResolverInterface; -use Sylius\Component\Core\Model\CustomerInterface; use Sylius\Component\Core\Model\ProductInterface; +use Sylius\Component\Core\Model\ProductReviewInterface; use Sylius\Component\Core\Repository\ProductRepositoryInterface; use Sylius\Resource\Factory\FactoryInterface; use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; @@ -27,6 +27,10 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface; final class AddProductReviewHandler implements MessageHandlerInterface { + /** + * @param FactoryInterface $productReviewFactory + * @param RepositoryInterface $productReviewRepository + */ public function __construct( private FactoryInterface $productReviewFactory, private RepositoryInterface $productReviewRepository, @@ -51,7 +55,6 @@ final class AddProductReviewHandler implements MessageHandlerInterface throw new \InvalidArgumentException('Visitor should provide an email'); } - /** @var CustomerInterface $customer */ $customer = $this->customerResolver->resolve($email); /** @var ReviewInterface $review */ diff --git a/src/Sylius/Bundle/ApiBundle/Controller/UploadAvatarImageAction.php b/src/Sylius/Bundle/ApiBundle/Controller/UploadAvatarImageAction.php index f0d29d887b..8b21f4343d 100644 --- a/src/Sylius/Bundle/ApiBundle/Controller/UploadAvatarImageAction.php +++ b/src/Sylius/Bundle/ApiBundle/Controller/UploadAvatarImageAction.php @@ -26,6 +26,7 @@ use Webmozart\Assert\Assert; final class UploadAvatarImageAction { + /** @param FactoryInterface $avatarImageFactory */ public function __construct( private FactoryInterface $avatarImageFactory, private AvatarImageRepositoryInterface $avatarImageRepository, diff --git a/src/Sylius/Bundle/ApiBundle/OpenApi/Documentation/AcceptLanguageHeaderDocumentationModifier.php b/src/Sylius/Bundle/ApiBundle/OpenApi/Documentation/AcceptLanguageHeaderDocumentationModifier.php index 9e19f68ec8..54de803fce 100644 --- a/src/Sylius/Bundle/ApiBundle/OpenApi/Documentation/AcceptLanguageHeaderDocumentationModifier.php +++ b/src/Sylius/Bundle/ApiBundle/OpenApi/Documentation/AcceptLanguageHeaderDocumentationModifier.php @@ -21,9 +21,7 @@ use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class AcceptLanguageHeaderDocumentationModifier implements DocumentationModifierInterface { - /** - * @param RepositoryInterface $localeRepository - */ + /** @param RepositoryInterface $localeRepository */ public function __construct(private RepositoryInterface $localeRepository) { } diff --git a/src/Sylius/Bundle/ApiBundle/Serializer/ChannelPriceHistoryConfigDenormalizer.php b/src/Sylius/Bundle/ApiBundle/Serializer/ChannelPriceHistoryConfigDenormalizer.php index 201f5cd6ad..f8e16cd8a4 100644 --- a/src/Sylius/Bundle/ApiBundle/Serializer/ChannelPriceHistoryConfigDenormalizer.php +++ b/src/Sylius/Bundle/ApiBundle/Serializer/ChannelPriceHistoryConfigDenormalizer.php @@ -29,6 +29,10 @@ final class ChannelPriceHistoryConfigDenormalizer implements ContextAwareDenorma private const ALREADY_CALLED = 'sylius_channel_price_history_config_denormalizer_already_called'; + /** + * @param FactoryInterface $channelPriceHistoryConfigFactory + * @param array $validationGroups + */ public function __construct( private IriConverterInterface $iriConverter, private FactoryInterface $channelPriceHistoryConfigFactory, diff --git a/src/Sylius/Bundle/ApiBundle/Validator/Constraints/AccountVerificationTokenEligibilityValidator.php b/src/Sylius/Bundle/ApiBundle/Validator/Constraints/AccountVerificationTokenEligibilityValidator.php index acae6ba1bb..a61f4fe041 100644 --- a/src/Sylius/Bundle/ApiBundle/Validator/Constraints/AccountVerificationTokenEligibilityValidator.php +++ b/src/Sylius/Bundle/ApiBundle/Validator/Constraints/AccountVerificationTokenEligibilityValidator.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Sylius\Bundle\ApiBundle\Validator\Constraints; use Sylius\Bundle\ApiBundle\Command\Account\VerifyCustomerAccount; +use Sylius\Component\Core\Model\ShopUserInterface; use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Sylius\Component\User\Model\UserInterface; use Symfony\Component\Validator\Constraint; @@ -22,6 +23,7 @@ use Webmozart\Assert\Assert; final class AccountVerificationTokenEligibilityValidator extends ConstraintValidator { + /** @param RepositoryInterface $shopUserRepository */ public function __construct(private RepositoryInterface $shopUserRepository) { } diff --git a/src/Sylius/Bundle/ApiBundle/Validator/Constraints/CorrectOrderAddressValidator.php b/src/Sylius/Bundle/ApiBundle/Validator/Constraints/CorrectOrderAddressValidator.php index 01444db569..3ac0e09bb6 100644 --- a/src/Sylius/Bundle/ApiBundle/Validator/Constraints/CorrectOrderAddressValidator.php +++ b/src/Sylius/Bundle/ApiBundle/Validator/Constraints/CorrectOrderAddressValidator.php @@ -23,6 +23,7 @@ use Webmozart\Assert\Assert; final class CorrectOrderAddressValidator extends ConstraintValidator { + /** @param RepositoryInterface $countryRepository */ public function __construct(private RepositoryInterface $countryRepository) { } diff --git a/src/Sylius/Bundle/AttributeBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/AttributeBundle/DependencyInjection/Configuration.php index f58a149b3c..0d2a758e4c 100644 --- a/src/Sylius/Bundle/AttributeBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/AttributeBundle/DependencyInjection/Configuration.php @@ -19,8 +19,8 @@ use Sylius\Component\Attribute\Model\Attribute; use Sylius\Component\Attribute\Model\AttributeInterface; use Sylius\Component\Attribute\Model\AttributeTranslation; use Sylius\Component\Attribute\Model\AttributeTranslationInterface; -use Sylius\Component\Resource\Factory\Factory; -use Sylius\Component\Resource\Factory\TranslatableFactory; +use Sylius\Resource\Factory\Factory; +use Sylius\Resource\Factory\TranslatableFactory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; diff --git a/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeChoiceType.php b/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeChoiceType.php index 33c43dffd2..f0fe3a46ff 100644 --- a/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeChoiceType.php +++ b/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeChoiceType.php @@ -13,6 +13,7 @@ declare(strict_types=1); namespace Sylius\Bundle\AttributeBundle\Form\Type; +use Sylius\Component\Attribute\Model\AttributeInterface; use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer; use Symfony\Component\Form\AbstractType; @@ -22,6 +23,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; abstract class AttributeChoiceType extends AbstractType { + /** @param RepositoryInterface $attributeRepository */ public function __construct(protected RepositoryInterface $attributeRepository) { } diff --git a/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeValueType.php b/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeValueType.php index 141e6b7599..e8ad0d0be2 100644 --- a/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeValueType.php +++ b/src/Sylius/Bundle/AttributeBundle/Form/Type/AttributeValueType.php @@ -33,6 +33,8 @@ abstract class AttributeValueType extends AbstractResourceType { /** * @param DataTransformerInterface|null $localeToCodeTransformer + * @param RepositoryInterface $attributeRepository + * @param RepositoryInterface $localeRepository */ public function __construct( string $dataClass, diff --git a/src/Sylius/Bundle/ChannelBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/ChannelBundle/DependencyInjection/Configuration.php index 873e3be2ec..087456f4ce 100644 --- a/src/Sylius/Bundle/ChannelBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/ChannelBundle/DependencyInjection/Configuration.php @@ -18,7 +18,7 @@ use Sylius\Bundle\ResourceBundle\Controller\ResourceController; use Sylius\Bundle\ResourceBundle\SyliusResourceBundle; use Sylius\Component\Channel\Model\Channel; use Sylius\Component\Channel\Model\ChannelInterface; -use Sylius\Component\Resource\Factory\Factory; +use Sylius\Resource\Factory\Factory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; diff --git a/src/Sylius/Bundle/ChannelBundle/Form/Type/ChannelChoiceType.php b/src/Sylius/Bundle/ChannelBundle/Form/Type/ChannelChoiceType.php index 7c45b00d06..45c9708b99 100644 --- a/src/Sylius/Bundle/ChannelBundle/Form/Type/ChannelChoiceType.php +++ b/src/Sylius/Bundle/ChannelBundle/Form/Type/ChannelChoiceType.php @@ -13,6 +13,7 @@ declare(strict_types=1); namespace Sylius\Bundle\ChannelBundle\Form\Type; +use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer; use Symfony\Component\Form\AbstractType; @@ -23,6 +24,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class ChannelChoiceType extends AbstractType { + /** @param RepositoryInterface $channelRepository */ public function __construct(private RepositoryInterface $channelRepository) { } diff --git a/src/Sylius/Bundle/CoreBundle/CatalogPromotion/CommandHandler/UpdateCatalogPromotionStateHandler.php b/src/Sylius/Bundle/CoreBundle/CatalogPromotion/CommandHandler/UpdateCatalogPromotionStateHandler.php index f25500d712..767d0cdfc4 100644 --- a/src/Sylius/Bundle/CoreBundle/CatalogPromotion/CommandHandler/UpdateCatalogPromotionStateHandler.php +++ b/src/Sylius/Bundle/CoreBundle/CatalogPromotion/CommandHandler/UpdateCatalogPromotionStateHandler.php @@ -20,6 +20,7 @@ use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class UpdateCatalogPromotionStateHandler { + /** @param RepositoryInterface $catalogPromotionRepository */ public function __construct( private CatalogPromotionStateProcessorInterface $catalogPromotionStateProcessor, private RepositoryInterface $catalogPromotionRepository, diff --git a/src/Sylius/Bundle/CoreBundle/CatalogPromotion/Listener/CatalogPromotionCreatedListener.php b/src/Sylius/Bundle/CoreBundle/CatalogPromotion/Listener/CatalogPromotionCreatedListener.php index 7b0d3f31df..8998b3072b 100644 --- a/src/Sylius/Bundle/CoreBundle/CatalogPromotion/Listener/CatalogPromotionCreatedListener.php +++ b/src/Sylius/Bundle/CoreBundle/CatalogPromotion/Listener/CatalogPromotionCreatedListener.php @@ -23,6 +23,7 @@ use Symfony\Component\Messenger\MessageBusInterface; final class CatalogPromotionCreatedListener { + /** @param RepositoryInterface $catalogPromotionRepository */ public function __construct( private AllProductVariantsCatalogPromotionsProcessorInterface $allProductVariantsCatalogPromotionsProcessor, private RepositoryInterface $catalogPromotionRepository, diff --git a/src/Sylius/Bundle/CoreBundle/CatalogPromotion/Listener/CatalogPromotionEndedListener.php b/src/Sylius/Bundle/CoreBundle/CatalogPromotion/Listener/CatalogPromotionEndedListener.php index 8879f8e899..80709632bd 100644 --- a/src/Sylius/Bundle/CoreBundle/CatalogPromotion/Listener/CatalogPromotionEndedListener.php +++ b/src/Sylius/Bundle/CoreBundle/CatalogPromotion/Listener/CatalogPromotionEndedListener.php @@ -23,6 +23,7 @@ use Symfony\Component\Messenger\MessageBusInterface; final class CatalogPromotionEndedListener { + /** @param RepositoryInterface $catalogPromotionRepository */ public function __construct( private AllProductVariantsCatalogPromotionsProcessorInterface $allProductVariantsCatalogPromotionsProcessor, private RepositoryInterface $catalogPromotionRepository, diff --git a/src/Sylius/Bundle/CoreBundle/CatalogPromotion/Listener/CatalogPromotionUpdatedListener.php b/src/Sylius/Bundle/CoreBundle/CatalogPromotion/Listener/CatalogPromotionUpdatedListener.php index 3f72b5ceea..b0a3540e75 100644 --- a/src/Sylius/Bundle/CoreBundle/CatalogPromotion/Listener/CatalogPromotionUpdatedListener.php +++ b/src/Sylius/Bundle/CoreBundle/CatalogPromotion/Listener/CatalogPromotionUpdatedListener.php @@ -23,6 +23,7 @@ use Symfony\Component\Messenger\MessageBusInterface; final class CatalogPromotionUpdatedListener { + /** @param RepositoryInterface $catalogPromotionRepository */ public function __construct( private AllProductVariantsCatalogPromotionsProcessorInterface $allProductVariantsCatalogPromotionsProcessor, private RepositoryInterface $catalogPromotionRepository, diff --git a/src/Sylius/Bundle/CoreBundle/Controller/ProductTaxonController.php b/src/Sylius/Bundle/CoreBundle/Controller/ProductTaxonController.php index 1b2f7692bb..60c5558afc 100644 --- a/src/Sylius/Bundle/CoreBundle/Controller/ProductTaxonController.php +++ b/src/Sylius/Bundle/CoreBundle/Controller/ProductTaxonController.php @@ -125,7 +125,7 @@ class ProductTaxonController extends ResourceController { $firstProductTaxonId = array_keys($productTaxonsPositions)[0]; - /** @var EntityRepository&RepositoryInterface $repository */ + /** @var EntityRepository&RepositoryInterface $repository */ $repository = $this->repository; /** @var ProductTaxonInterface $productTaxon */ diff --git a/src/Sylius/Bundle/CoreBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/CoreBundle/DependencyInjection/Configuration.php index e47bb8625f..e05acaa01a 100644 --- a/src/Sylius/Bundle/CoreBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/CoreBundle/DependencyInjection/Configuration.php @@ -37,7 +37,7 @@ use Sylius\Component\Core\Model\ShopBillingData; use Sylius\Component\Core\Model\ShopBillingDataInterface; use Sylius\Component\Core\Model\TaxonImage; use Sylius\Component\Core\Model\TaxonImageInterface; -use Sylius\Component\Resource\Factory\Factory; +use Sylius\Resource\Factory\Factory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; diff --git a/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Handler/ResourceDeleteHandler.php b/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Handler/ResourceDeleteHandler.php index a63a509b23..8117597b66 100644 --- a/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Handler/ResourceDeleteHandler.php +++ b/src/Sylius/Bundle/CoreBundle/Doctrine/ORM/Handler/ResourceDeleteHandler.php @@ -23,11 +23,15 @@ use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class ResourceDeleteHandler implements ResourceDeleteHandlerInterface { - public function __construct(private ResourceDeleteHandlerInterface $decoratedHandler, private EntityManagerInterface $entityManager) - { + public function __construct( + private ResourceDeleteHandlerInterface $decoratedHandler, + private EntityManagerInterface $entityManager + ) { } /** + * @param RepositoryInterface $repository + * * @throws DeleteHandlingException */ public function handle(ResourceInterface $resource, RepositoryInterface $repository): void diff --git a/src/Sylius/Bundle/CoreBundle/Factory/OrderFactory.php b/src/Sylius/Bundle/CoreBundle/Factory/OrderFactory.php index 401bd9a99e..71e0ccccb4 100644 --- a/src/Sylius/Bundle/CoreBundle/Factory/OrderFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Factory/OrderFactory.php @@ -20,10 +20,13 @@ use Sylius\Component\Core\Model\OrderInterface; use Sylius\Resource\Factory\FactoryInterface; /** - * @implements OrderFactoryInterface + * @template T of OrderInterface + * + * @implements OrderFactoryInterface */ final class OrderFactory implements OrderFactoryInterface { + /** @param FactoryInterface $decoratedFactory */ public function __construct( private FactoryInterface $decoratedFactory, ) { diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/CurrencyFixture.php b/src/Sylius/Bundle/CoreBundle/Fixture/CurrencyFixture.php index cc6bb6880d..860e29b2de 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/CurrencyFixture.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/CurrencyFixture.php @@ -21,6 +21,7 @@ use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; class CurrencyFixture extends AbstractFixture { + /** @param FactoryInterface $currencyFactory */ public function __construct(private FactoryInterface $currencyFactory, private ObjectManager $currencyManager) { } diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/AddressExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/AddressExampleFactory.php index 0bb689f97d..67fd98a194 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/AddressExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/AddressExampleFactory.php @@ -33,6 +33,11 @@ class AddressExampleFactory extends AbstractExampleFactory private OptionsResolver $optionsResolver; + /** + * @param FactoryInterface $addressFactory + * @param RepositoryInterface $countryRepository + * @param RepositoryInterface $customerRepository + */ public function __construct( private FactoryInterface $addressFactory, private RepositoryInterface $countryRepository, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/AdminUserExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/AdminUserExampleFactory.php index a2ee9fc588..7761c33a6a 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/AdminUserExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/AdminUserExampleFactory.php @@ -17,6 +17,7 @@ use Faker\Factory; use Faker\Generator; use Sylius\Component\Core\Model\AdminUserInterface; use Sylius\Component\Core\Model\AvatarImage; +use Sylius\Component\Core\Model\ImageInterface; use Sylius\Component\Core\Uploader\ImageUploaderInterface; use Sylius\Resource\Factory\FactoryInterface; use Symfony\Component\Config\FileLocatorInterface; @@ -30,6 +31,10 @@ class AdminUserExampleFactory extends AbstractExampleFactory implements ExampleF private OptionsResolver $optionsResolver; + /** + * @param FactoryInterface $userFactory + * @param FactoryInterface|null $avatarImageFactory + */ public function __construct( private FactoryInterface $userFactory, private string $localeCode, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CatalogPromotionActionExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CatalogPromotionActionExampleFactory.php index 36f44c20e3..09887fb798 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CatalogPromotionActionExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CatalogPromotionActionExampleFactory.php @@ -24,6 +24,7 @@ final class CatalogPromotionActionExampleFactory extends AbstractExampleFactory { private OptionsResolver $optionsResolver; + /** @param FactoryInterface $catalogPromotionActionFactory */ public function __construct(private FactoryInterface $catalogPromotionActionFactory) { $this->optionsResolver = new OptionsResolver(); diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CatalogPromotionExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CatalogPromotionExampleFactory.php index bc915d4e23..40a795b9af 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CatalogPromotionExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CatalogPromotionExampleFactory.php @@ -33,6 +33,10 @@ class CatalogPromotionExampleFactory extends AbstractExampleFactory implements E private OptionsResolver $optionsResolver; + /** + * @param FactoryInterface $catalogPromotionFactory + * @param RepositoryInterface $localeRepository + */ public function __construct( private FactoryInterface $catalogPromotionFactory, private RepositoryInterface $localeRepository, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CatalogPromotionScopeExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CatalogPromotionScopeExampleFactory.php index 4e4068986e..01630938ea 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CatalogPromotionScopeExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CatalogPromotionScopeExampleFactory.php @@ -22,6 +22,7 @@ final class CatalogPromotionScopeExampleFactory extends AbstractExampleFactory i { private OptionsResolver $optionsResolver; + /** @param FactoryInterface $catalogPromotionScopeFactory */ public function __construct(private FactoryInterface $catalogPromotionScopeFactory) { $this->optionsResolver = new OptionsResolver(); diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ChannelExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ChannelExampleFactory.php index 959ee1ee59..00434da9fb 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ChannelExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ChannelExampleFactory.php @@ -23,6 +23,7 @@ use Sylius\Component\Core\Formatter\StringInflector; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Core\Model\Scope; use Sylius\Component\Core\Model\ShopBillingData; +use Sylius\Component\Core\Model\ShopBillingDataInterface; use Sylius\Component\Core\Model\TaxonInterface; use Sylius\Component\Currency\Model\CurrencyInterface; use Sylius\Component\Locale\Model\LocaleInterface; @@ -40,8 +41,15 @@ class ChannelExampleFactory extends AbstractExampleFactory implements ExampleFac private ?TaxonRepositoryInterface $taxonRepository; + /** @var FactoryInterface|null */ private ?FactoryInterface $shopBillingDataFactory; + /** + * @param RepositoryInterface $localeRepository + * @param RepositoryInterface $currencyRepository + * @param RepositoryInterface $zoneRepository + * @param FactoryInterface|null $shopBillingDataFactory + */ public function __construct( private ChannelFactoryInterface $channelFactory, private RepositoryInterface $localeRepository, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CustomerGroupExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CustomerGroupExampleFactory.php index 3fae94226c..ab0360f128 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CustomerGroupExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/CustomerGroupExampleFactory.php @@ -27,6 +27,7 @@ class CustomerGroupExampleFactory extends AbstractExampleFactory implements Exam private OptionsResolver $optionsResolver; + /** @param FactoryInterface $customerGroupFactory */ public function __construct(private FactoryInterface $customerGroupFactory) { $this->faker = Factory::create(); diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/OrderExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/OrderExampleFactory.php index 6dc2c42b3e..e2fc8b9dc8 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/OrderExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/OrderExampleFactory.php @@ -51,6 +51,14 @@ class OrderExampleFactory extends AbstractExampleFactory implements ExampleFacto /** @var Generator */ protected $faker; + /** + * @param FactoryInterface $orderFactory + * @param FactoryInterface $orderItemFactory + * @param RepositoryInterface $channelRepository + * @param RepositoryInterface $customerRepository + * @param RepositoryInterface $countryRepository + * @param FactoryInterface $addressFactory + */ public function __construct( protected FactoryInterface $orderFactory, protected FactoryInterface $orderItemFactory, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PaymentMethodExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PaymentMethodExampleFactory.php index ede6aac08e..74aa7217d0 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PaymentMethodExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PaymentMethodExampleFactory.php @@ -33,6 +33,7 @@ class PaymentMethodExampleFactory extends AbstractExampleFactory implements Exam private OptionsResolver $optionsResolver; + /** @param RepositoryInterface $localeRepository */ public function __construct( private PaymentMethodFactoryInterface $paymentMethodFactory, private RepositoryInterface $localeRepository, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAssociationExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAssociationExampleFactory.php index e51eaf4362..c2b92fe644 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAssociationExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAssociationExampleFactory.php @@ -26,6 +26,7 @@ class ProductAssociationExampleFactory extends AbstractExampleFactory implements { private OptionsResolver $optionsResolver; + /** @param FactoryInterface $productAssociationFactory */ public function __construct( private FactoryInterface $productAssociationFactory, private ProductAssociationTypeRepositoryInterface $productAssociationTypeRepository, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAssociationTypeExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAssociationTypeExampleFactory.php index bde3cc64e5..c4541bd7c9 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAssociationTypeExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAssociationTypeExampleFactory.php @@ -29,6 +29,10 @@ class ProductAssociationTypeExampleFactory extends AbstractExampleFactory implem private OptionsResolver $optionsResolver; + /** + * @param FactoryInterface $productAssociationTypeFactory + * @param RepositoryInterface $localeRepository + */ public function __construct( private FactoryInterface $productAssociationTypeFactory, private RepositoryInterface $localeRepository, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAttributeExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAttributeExampleFactory.php index 6ed6eb420c..920d5e6896 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAttributeExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductAttributeExampleFactory.php @@ -29,6 +29,10 @@ class ProductAttributeExampleFactory extends AbstractExampleFactory implements E private OptionsResolver $optionsResolver; + /** + * @param RepositoryInterface $localeRepository + * @param array $attributeTypes + */ public function __construct( private AttributeFactoryInterface $productAttributeFactory, private RepositoryInterface $localeRepository, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductExampleFactory.php index b016233dc9..2d1278b319 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductExampleFactory.php @@ -21,6 +21,7 @@ use Sylius\Component\Core\Formatter\StringInflector; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Core\Model\ChannelPricingInterface; use Sylius\Component\Core\Model\ImageInterface; +use Sylius\Component\Core\Model\ProductImageInterface; use Sylius\Component\Core\Model\ProductInterface; use Sylius\Component\Core\Model\ProductTaxonInterface; use Sylius\Component\Core\Model\ProductVariantInterface; @@ -31,6 +32,7 @@ use Sylius\Component\Product\Generator\ProductVariantGeneratorInterface; use Sylius\Component\Product\Generator\SlugGeneratorInterface; use Sylius\Component\Product\Model\ProductAttributeInterface; use Sylius\Component\Product\Model\ProductAttributeValueInterface; +use Sylius\Component\Product\Model\ProductOptionInterface; use Sylius\Component\Product\Model\ProductOptionValueInterface; use Sylius\Resource\Factory\FactoryInterface; use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; @@ -47,6 +49,20 @@ class ProductExampleFactory extends AbstractExampleFactory implements ExampleFac private OptionsResolver $optionsResolver; + /** + * @param FactoryInterface $productFactory + * @param FactoryInterface $productVariantFactory + * @param FactoryInterface $channelPricingFactory + * @param FactoryInterface $productAttributeValueFactory + * @param FactoryInterface $productImageFactory + * @param FactoryInterface $productTaxonFactory + * @param RepositoryInterface $taxonRepository + * @param RepositoryInterface $productAttributeRepository + * @param RepositoryInterface $productOptionRepository + * @param RepositoryInterface $channelRepository + * @param RepositoryInterface $localeRepository + * @param RepositoryInterface|null $taxCategoryRepository + */ public function __construct( private FactoryInterface $productFactory, private FactoryInterface $productVariantFactory, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductOptionExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductOptionExampleFactory.php index c2d3002042..c84426769b 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductOptionExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ProductOptionExampleFactory.php @@ -30,6 +30,11 @@ class ProductOptionExampleFactory extends AbstractExampleFactory implements Exam private OptionsResolver $optionsResolver; + /** + * @param FactoryInterface $productOptionFactory + * @param FactoryInterface $productOptionValueFactory + * @param RepositoryInterface $localeRepository + */ public function __construct( private FactoryInterface $productOptionFactory, private FactoryInterface $productOptionValueFactory, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PromotionExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PromotionExampleFactory.php index fb2546fbae..d731ce5803 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PromotionExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/PromotionExampleFactory.php @@ -36,6 +36,8 @@ class PromotionExampleFactory extends AbstractExampleFactory implements ExampleF private OptionsResolver $optionsResolver; /** + * @param FactoryInterface $promotionFactory + * @param FactoryInterface|null $couponFactory * @param RepositoryInterface|null $localeRepository */ public function __construct( @@ -171,6 +173,7 @@ class PromotionExampleFactory extends AbstractExampleFactory implements ExampleF ; } + /** @param FactoryInterface|null $couponFactory */ private static function getCouponNormalizer(?FactoryInterface $couponFactory): \Closure { return function (Options $options, array $couponDefinitions) use ($couponFactory): array { diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShippingCategoryExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShippingCategoryExampleFactory.php index 2eb70d6dff..4edb1bfe18 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShippingCategoryExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShippingCategoryExampleFactory.php @@ -27,6 +27,7 @@ class ShippingCategoryExampleFactory extends AbstractExampleFactory implements E private OptionsResolver $optionsResolver; + /** @param FactoryInterface $shippingCategoryFactory */ public function __construct(private FactoryInterface $shippingCategoryFactory) { $this->faker = Factory::create(); diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShippingMethodExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShippingMethodExampleFactory.php index 8dcda5dd64..20d7036aa9 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShippingMethodExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShippingMethodExampleFactory.php @@ -36,6 +36,13 @@ class ShippingMethodExampleFactory extends AbstractExampleFactory implements Exa private OptionsResolver $optionsResolver; + /** + * @param FactoryInterface $shippingMethodFactory + * @param RepositoryInterface $zoneRepository + * @param RepositoryInterface $shippingCategoryRepository + * @param RepositoryInterface $localeRepository + * @param RepositoryInterface|null $taxCategoryRepository + */ public function __construct( private FactoryInterface $shippingMethodFactory, private RepositoryInterface $zoneRepository, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShopUserExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShopUserExampleFactory.php index d16018360a..f1dd2754fa 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShopUserExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/ShopUserExampleFactory.php @@ -31,6 +31,11 @@ class ShopUserExampleFactory extends AbstractExampleFactory implements ExampleFa private OptionsResolver $optionsResolver; + /** + * @param FactoryInterface $shopUserFactory + * @param FactoryInterface $customerFactory + * @param RepositoryInterface $customerGroupRepository + */ public function __construct( private FactoryInterface $shopUserFactory, private FactoryInterface $customerFactory, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxCategoryExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxCategoryExampleFactory.php index d20ece10b8..19424d0ce4 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxCategoryExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxCategoryExampleFactory.php @@ -27,6 +27,7 @@ class TaxCategoryExampleFactory extends AbstractExampleFactory implements Exampl private OptionsResolver $optionsResolver; + /** @param FactoryInterface $taxCategoryFactory */ public function __construct(private FactoryInterface $taxCategoryFactory) { $this->faker = Factory::create(); diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxRateExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxRateExampleFactory.php index e39909db24..115779e569 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxRateExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxRateExampleFactory.php @@ -31,6 +31,11 @@ class TaxRateExampleFactory extends AbstractExampleFactory implements ExampleFac private OptionsResolver $optionsResolver; + /** + * @param FactoryInterface $taxRateFactory + * @param RepositoryInterface $zoneRepository + * @param RepositoryInterface $taxCategoryRepository + */ public function __construct( private FactoryInterface $taxRateFactory, private RepositoryInterface $zoneRepository, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxonExampleFactory.php b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxonExampleFactory.php index c53d1a7352..1c2a737c83 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxonExampleFactory.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/Factory/TaxonExampleFactory.php @@ -31,6 +31,10 @@ class TaxonExampleFactory extends AbstractExampleFactory implements ExampleFacto private OptionsResolver $optionsResolver; + /** + * @param FactoryInterface $taxonFactory + * @param RepositoryInterface $localeRepository + */ public function __construct( private FactoryInterface $taxonFactory, private TaxonRepositoryInterface $taxonRepository, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/GeographicalFixture.php b/src/Sylius/Bundle/CoreBundle/Fixture/GeographicalFixture.php index 41255dc586..4550f6f0ae 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/GeographicalFixture.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/GeographicalFixture.php @@ -26,6 +26,11 @@ use Webmozart\Assert\Assert; class GeographicalFixture extends AbstractFixture { + /** + * @param FactoryInterface $countryFactory + * @param FactoryInterface $provinceFactory + * @param ZoneFactoryInterface $zoneFactory + */ public function __construct( private FactoryInterface $countryFactory, private ObjectManager $countryManager, diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/LocaleFixture.php b/src/Sylius/Bundle/CoreBundle/Fixture/LocaleFixture.php index 481466ffc3..054cc21733 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/LocaleFixture.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/LocaleFixture.php @@ -21,11 +21,12 @@ use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; class LocaleFixture extends AbstractFixture { - /** - * @param string $baseLocaleCode - */ - public function __construct(private FactoryInterface $localeFactory, private ObjectManager $localeManager, private $baseLocaleCode) - { + /** @param FactoryInterface $localeFactory */ + public function __construct( + private FactoryInterface $localeFactory, + private ObjectManager $localeManager, + private string $baseLocaleCode, + ) { } public function load(array $options): void diff --git a/src/Sylius/Bundle/CoreBundle/Fixture/OrderFixture.php b/src/Sylius/Bundle/CoreBundle/Fixture/OrderFixture.php index 4a16027a67..c174952b08 100644 --- a/src/Sylius/Bundle/CoreBundle/Fixture/OrderFixture.php +++ b/src/Sylius/Bundle/CoreBundle/Fixture/OrderFixture.php @@ -20,12 +20,19 @@ use SM\Factory\FactoryInterface as StateMachineFactoryInterface; use Sylius\Abstraction\StateMachine\StateMachineInterface; use Sylius\Bundle\CoreBundle\Fixture\Factory\OrderExampleFactory; use Sylius\Bundle\FixturesBundle\Fixture\AbstractFixture; +use Sylius\Component\Addressing\Model\CountryInterface; use Sylius\Component\Core\Checker\OrderPaymentMethodSelectionRequirementCheckerInterface; use Sylius\Component\Core\Checker\OrderShippingMethodSelectionRequirementCheckerInterface; +use Sylius\Component\Core\Model\AddressInterface; +use Sylius\Component\Core\Model\ChannelInterface; +use Sylius\Component\Core\Model\CustomerInterface; +use Sylius\Component\Core\Model\OrderInterface; +use Sylius\Component\Core\Model\OrderItemInterface; use Sylius\Component\Core\Repository\PaymentMethodRepositoryInterface; use Sylius\Component\Core\Repository\ProductRepositoryInterface; use Sylius\Component\Core\Repository\ShippingMethodRepositoryInterface; use Sylius\Component\Order\Modifier\OrderItemQuantityModifierInterface; +use Sylius\Component\Core\Model\ProductInterface; use Sylius\Resource\Factory\FactoryInterface; use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; @@ -41,6 +48,15 @@ class OrderFixture extends AbstractFixture private Generator $faker; + /** + * @param FactoryInterface $orderFactory + * @param FactoryInterface $orderItemFactory + * @param RepositoryInterface $channelRepository + * @param RepositoryInterface $customerRepository + * @param RepositoryInterface|ProductRepositoryInterface $productRepository + * @param RepositoryInterface $countryRepository + * @param FactoryInterface $addressFactory + */ public function __construct( FactoryInterface $orderFactory, FactoryInterface $orderItemFactory, @@ -48,7 +64,7 @@ class OrderFixture extends AbstractFixture ObjectManager $orderManager, RepositoryInterface $channelRepository, RepositoryInterface $customerRepository, - RepositoryInterface $productRepository, + RepositoryInterface|ProductRepositoryInterface $productRepository, RepositoryInterface $countryRepository, PaymentMethodRepositoryInterface $paymentMethodRepository, ShippingMethodRepositoryInterface $shippingMethodRepository, diff --git a/src/Sylius/Bundle/CoreBundle/Form/DataTransformer/ProductTaxonToTaxonTransformer.php b/src/Sylius/Bundle/CoreBundle/Form/DataTransformer/ProductTaxonToTaxonTransformer.php index a4a87d9ac5..e196a2bef7 100644 --- a/src/Sylius/Bundle/CoreBundle/Form/DataTransformer/ProductTaxonToTaxonTransformer.php +++ b/src/Sylius/Bundle/CoreBundle/Form/DataTransformer/ProductTaxonToTaxonTransformer.php @@ -23,6 +23,10 @@ use Symfony\Component\Form\Exception\TransformationFailedException; final class ProductTaxonToTaxonTransformer implements DataTransformerInterface { + /** + * @param FactoryInterface $productTaxonFactory + * @param RepositoryInterface $productTaxonRepository + */ public function __construct( private FactoryInterface $productTaxonFactory, private RepositoryInterface $productTaxonRepository, diff --git a/src/Sylius/Bundle/CoreBundle/Form/EventSubscriber/CustomerRegistrationFormSubscriber.php b/src/Sylius/Bundle/CoreBundle/Form/EventSubscriber/CustomerRegistrationFormSubscriber.php index 8ceb60259d..d6a514781e 100644 --- a/src/Sylius/Bundle/CoreBundle/Form/EventSubscriber/CustomerRegistrationFormSubscriber.php +++ b/src/Sylius/Bundle/CoreBundle/Form/EventSubscriber/CustomerRegistrationFormSubscriber.php @@ -22,6 +22,7 @@ use Webmozart\Assert\Assert; final class CustomerRegistrationFormSubscriber implements EventSubscriberInterface { + /** @param RepositoryInterface $customerRepository */ public function __construct(private RepositoryInterface $customerRepository) { } diff --git a/src/Sylius/Bundle/CoreBundle/Form/Extension/CountryTypeExtension.php b/src/Sylius/Bundle/CoreBundle/Form/Extension/CountryTypeExtension.php index c444a0efd9..bad92ebe1c 100644 --- a/src/Sylius/Bundle/CoreBundle/Form/Extension/CountryTypeExtension.php +++ b/src/Sylius/Bundle/CoreBundle/Form/Extension/CountryTypeExtension.php @@ -27,6 +27,7 @@ use Symfony\Component\Intl\Countries; final class CountryTypeExtension extends AbstractTypeExtension { + /** @param RepositoryInterface $countryRepository */ public function __construct(private RepositoryInterface $countryRepository) { } diff --git a/src/Sylius/Bundle/CoreBundle/Form/Extension/LocaleTypeExtension.php b/src/Sylius/Bundle/CoreBundle/Form/Extension/LocaleTypeExtension.php index d34824731d..82a24426de 100644 --- a/src/Sylius/Bundle/CoreBundle/Form/Extension/LocaleTypeExtension.php +++ b/src/Sylius/Bundle/CoreBundle/Form/Extension/LocaleTypeExtension.php @@ -32,6 +32,7 @@ trigger_deprecation( /** @deprecated since Sylius 1.14 and will be removed in Sylius 2.0. */ final class LocaleTypeExtension extends AbstractTypeExtension { + /** @param RepositoryInterface $localeRepository */ public function __construct(private RepositoryInterface $localeRepository) { } diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerCheckoutGuestType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerCheckoutGuestType.php index 7c104f224f..d0c01f849c 100644 --- a/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerCheckoutGuestType.php +++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerCheckoutGuestType.php @@ -25,6 +25,10 @@ use Symfony\Component\Form\FormEvents; final class CustomerCheckoutGuestType extends AbstractResourceType { + /** + * @param RepositoryInterface $customerRepository + * @param FactoryInterface $customerFactory + */ public function __construct( string $dataClass, array $validationGroups, diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerGuestType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerGuestType.php index 4a76fb7558..c0fabfc050 100644 --- a/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerGuestType.php +++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerGuestType.php @@ -25,6 +25,10 @@ use Symfony\Component\Form\FormEvents; final class CustomerGuestType extends AbstractResourceType { + /** + * @param RepositoryInterface $customerRepository + * @param FactoryInterface $customerFactory + */ public function __construct( string $dataClass, array $validationGroups, diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerSimpleRegistrationType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerSimpleRegistrationType.php index 3881cfab9b..f02629dd90 100644 --- a/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerSimpleRegistrationType.php +++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Customer/CustomerSimpleRegistrationType.php @@ -16,6 +16,7 @@ namespace Sylius\Bundle\CoreBundle\Form\Type\Customer; use Sylius\Bundle\CoreBundle\Form\EventSubscriber\CustomerRegistrationFormSubscriber; use Sylius\Bundle\CoreBundle\Form\Type\User\ShopUserRegistrationType; use Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType; +use Sylius\Component\Core\Model\CustomerInterface; use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Form\Extension\Core\Type\EmailType; use Symfony\Component\Form\FormBuilderInterface; @@ -24,8 +25,12 @@ use Symfony\Component\Validator\Constraints\Valid; final class CustomerSimpleRegistrationType extends AbstractResourceType { - public function __construct(string $dataClass, array $validationGroups, private RepositoryInterface $customerRepository) - { + /** @param RepositoryInterface $customerRepository */ + public function __construct( + string $dataClass, + array $validationGroups, + private RepositoryInterface $customerRepository, + ) { parent::__construct($dataClass, $validationGroups); } diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/Product/ChannelPricingType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Product/ChannelPricingType.php index 6dbeeb2eea..cb005c49d9 100644 --- a/src/Sylius/Bundle/CoreBundle/Form/Type/Product/ChannelPricingType.php +++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Product/ChannelPricingType.php @@ -18,6 +18,7 @@ use Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType; use Sylius\Component\Core\Model\ChannelInterface; use Sylius\Component\Core\Model\ChannelPricingInterface; use Sylius\Component\Core\Model\ProductVariantInterface; +use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Form\FormBuilderInterface; use Symfony\Component\Form\FormEvent; use Symfony\Component\Form\FormEvents; @@ -26,10 +27,11 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class ChannelPricingType extends AbstractResourceType { + /** @param RepositoryInterface|null $channelPricingRepository */ public function __construct( string $dataClass, array $validationGroups, - private ?\Sylius\Resource\Doctrine\Persistence\RepositoryInterface $channelPricingRepository = null, + private ?RepositoryInterface $channelPricingRepository = null, ) { parent::__construct($dataClass, $validationGroups); } diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Rule/ContainsProductConfigurationType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Rule/ContainsProductConfigurationType.php index 7fcc4711b2..b8975a42a4 100644 --- a/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Rule/ContainsProductConfigurationType.php +++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Rule/ContainsProductConfigurationType.php @@ -15,6 +15,7 @@ namespace Sylius\Bundle\CoreBundle\Form\Type\Promotion\Rule; use Sylius\Bundle\ProductBundle\Form\Type\ProductAutocompleteChoiceType; use Sylius\Bundle\ResourceBundle\Form\DataTransformer\ResourceToIdentifierTransformer; +use Sylius\Component\Core\Model\ProductInterface; use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; @@ -22,6 +23,7 @@ use Symfony\Component\Form\ReversedTransformer; final class ContainsProductConfigurationType extends AbstractType { + /** @param RepositoryInterface $productRepository */ public function __construct(private RepositoryInterface $productRepository) { } diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Rule/TotalOfItemsFromTaxonConfigurationType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Rule/TotalOfItemsFromTaxonConfigurationType.php index dd34b6dcf6..acedd0d083 100644 --- a/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Rule/TotalOfItemsFromTaxonConfigurationType.php +++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Promotion/Rule/TotalOfItemsFromTaxonConfigurationType.php @@ -16,6 +16,7 @@ namespace Sylius\Bundle\CoreBundle\Form\Type\Promotion\Rule; use Sylius\Bundle\MoneyBundle\Form\Type\MoneyType; use Sylius\Bundle\ResourceBundle\Form\DataTransformer\ResourceToIdentifierTransformer; use Sylius\Bundle\TaxonomyBundle\Form\Type\TaxonAutocompleteChoiceType; +use Sylius\Component\Core\Model\TaxonInterface; use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; @@ -24,6 +25,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class TotalOfItemsFromTaxonConfigurationType extends AbstractType { + /** @param RepositoryInterface $taxonRepository */ public function __construct(private RepositoryInterface $taxonRepository) { } diff --git a/src/Sylius/Bundle/CoreBundle/Form/Type/Taxon/ProductTaxonAutocompleteChoiceType.php b/src/Sylius/Bundle/CoreBundle/Form/Type/Taxon/ProductTaxonAutocompleteChoiceType.php index ce17198254..e6eba1e902 100644 --- a/src/Sylius/Bundle/CoreBundle/Form/Type/Taxon/ProductTaxonAutocompleteChoiceType.php +++ b/src/Sylius/Bundle/CoreBundle/Form/Type/Taxon/ProductTaxonAutocompleteChoiceType.php @@ -17,6 +17,7 @@ use Sylius\Bundle\CoreBundle\Form\DataTransformer\ProductTaxonToTaxonTransformer use Sylius\Bundle\ResourceBundle\Form\DataTransformer\RecursiveTransformer; use Sylius\Bundle\ResourceBundle\Form\Type\ResourceAutocompleteChoiceType; use Sylius\Component\Core\Model\ProductInterface; +use Sylius\Component\Core\Model\ProductTaxonInterface; use Sylius\Resource\Factory\FactoryInterface; use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Form\AbstractType; @@ -25,8 +26,14 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class ProductTaxonAutocompleteChoiceType extends AbstractType { - public function __construct(private FactoryInterface $productTaxonFactory, private RepositoryInterface $productTaxonRepository) - { + /** + * @param FactoryInterface $productTaxonFactory + * @param RepositoryInterface $productTaxonRepository + */ + public function __construct( + private FactoryInterface $productTaxonFactory, + private RepositoryInterface $productTaxonRepository, + ) { } public function buildForm(FormBuilderInterface $builder, array $options): void diff --git a/src/Sylius/Bundle/CoreBundle/Installer/Setup/ChannelSetup.php b/src/Sylius/Bundle/CoreBundle/Installer/Setup/ChannelSetup.php index b4f71a51fa..040758cb8a 100644 --- a/src/Sylius/Bundle/CoreBundle/Installer/Setup/ChannelSetup.php +++ b/src/Sylius/Bundle/CoreBundle/Installer/Setup/ChannelSetup.php @@ -22,6 +22,10 @@ use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class ChannelSetup implements ChannelSetupInterface { + /** + * @param RepositoryInterface $channelRepository + * @param FactoryInterface $channelFactory + */ public function __construct( private RepositoryInterface $channelRepository, private FactoryInterface $channelFactory, diff --git a/src/Sylius/Bundle/CoreBundle/Installer/Setup/CurrencySetup.php b/src/Sylius/Bundle/CoreBundle/Installer/Setup/CurrencySetup.php index 8f1ea4e217..893af68745 100644 --- a/src/Sylius/Bundle/CoreBundle/Installer/Setup/CurrencySetup.php +++ b/src/Sylius/Bundle/CoreBundle/Installer/Setup/CurrencySetup.php @@ -27,6 +27,10 @@ final class CurrencySetup implements CurrencySetupInterface { private string $currency; + /** + * @param RepositoryInterface $currencyRepository + * @param FactoryInterface $currencyFactory + */ public function __construct( private RepositoryInterface $currencyRepository, private FactoryInterface $currencyFactory, diff --git a/src/Sylius/Bundle/CoreBundle/Installer/Setup/LocaleSetup.php b/src/Sylius/Bundle/CoreBundle/Installer/Setup/LocaleSetup.php index 541631c4eb..36cfafe9a3 100644 --- a/src/Sylius/Bundle/CoreBundle/Installer/Setup/LocaleSetup.php +++ b/src/Sylius/Bundle/CoreBundle/Installer/Setup/LocaleSetup.php @@ -27,6 +27,10 @@ use Symfony\Component\Yaml\Yaml; final class LocaleSetup implements LocaleSetupInterface { + /** + * @param RepositoryInterface $localeRepository + * @param FactoryInterface $localeFactory + */ public function __construct( private RepositoryInterface $localeRepository, private FactoryInterface $localeFactory, diff --git a/src/Sylius/Bundle/CoreBundle/MessageHandler/ResendOrderConfirmationEmailHandler.php b/src/Sylius/Bundle/CoreBundle/MessageHandler/ResendOrderConfirmationEmailHandler.php index 6deee16864..412e8fc075 100644 --- a/src/Sylius/Bundle/CoreBundle/MessageHandler/ResendOrderConfirmationEmailHandler.php +++ b/src/Sylius/Bundle/CoreBundle/MessageHandler/ResendOrderConfirmationEmailHandler.php @@ -22,9 +22,7 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface; final class ResendOrderConfirmationEmailHandler implements MessageHandlerInterface { - /** - * @param RepositoryInterface $orderRepository - */ + /** @param RepositoryInterface $orderRepository */ public function __construct( private OrderEmailManagerInterface $orderEmailManager, private RepositoryInterface $orderRepository, diff --git a/src/Sylius/Bundle/CoreBundle/MessageHandler/ResendShipmentConfirmationEmailHandler.php b/src/Sylius/Bundle/CoreBundle/MessageHandler/ResendShipmentConfirmationEmailHandler.php index f0fc5b0f64..cdcbb33eb9 100644 --- a/src/Sylius/Bundle/CoreBundle/MessageHandler/ResendShipmentConfirmationEmailHandler.php +++ b/src/Sylius/Bundle/CoreBundle/MessageHandler/ResendShipmentConfirmationEmailHandler.php @@ -22,9 +22,7 @@ use Symfony\Component\Messenger\Handler\MessageHandlerInterface; final class ResendShipmentConfirmationEmailHandler implements MessageHandlerInterface { - /** - * @param RepositoryInterface $shipmentRepository - */ + /** @param RepositoryInterface $shipmentRepository */ public function __construct( private RepositoryInterface $shipmentRepository, private ShipmentEmailManagerInterface $shipmentEmailManager, diff --git a/src/Sylius/Bundle/CoreBundle/OAuth/UserProvider.php b/src/Sylius/Bundle/CoreBundle/OAuth/UserProvider.php index 5a1e449646..1176534fc0 100644 --- a/src/Sylius/Bundle/CoreBundle/OAuth/UserProvider.php +++ b/src/Sylius/Bundle/CoreBundle/OAuth/UserProvider.php @@ -35,6 +35,12 @@ use Webmozart\Assert\Assert; */ class UserProvider extends BaseUserProvider implements AccountConnectorInterface, OAuthAwareUserProviderInterface { + /** + * @param FactoryInterface $customerFactory + * @param FactoryInterface $userFactory + * @param FactoryInterface $oauthFactory + * @param RepositoryInterface $oauthRepository + */ public function __construct( string $supportedUserClass, private FactoryInterface $customerFactory, diff --git a/src/Sylius/Bundle/CoreBundle/Order/NumberGenerator/SequentialOrderNumberGenerator.php b/src/Sylius/Bundle/CoreBundle/Order/NumberGenerator/SequentialOrderNumberGenerator.php index dc693c127a..c86ed67bc1 100644 --- a/src/Sylius/Bundle/CoreBundle/Order/NumberGenerator/SequentialOrderNumberGenerator.php +++ b/src/Sylius/Bundle/CoreBundle/Order/NumberGenerator/SequentialOrderNumberGenerator.php @@ -23,6 +23,10 @@ use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class SequentialOrderNumberGenerator implements OrderNumberGeneratorInterface { + /** + * @param RepositoryInterface $sequenceRepository + * @param FactoryInterface $sequenceFactory + */ public function __construct( private RepositoryInterface $sequenceRepository, private FactoryInterface $sequenceFactory, diff --git a/src/Sylius/Bundle/CoreBundle/PriceHistory/CommandDispatcher/BatchedApplyLowestPriceOnChannelPricingsCommandDispatcher.php b/src/Sylius/Bundle/CoreBundle/PriceHistory/CommandDispatcher/BatchedApplyLowestPriceOnChannelPricingsCommandDispatcher.php index 66a796add0..027bad61fb 100644 --- a/src/Sylius/Bundle/CoreBundle/PriceHistory/CommandDispatcher/BatchedApplyLowestPriceOnChannelPricingsCommandDispatcher.php +++ b/src/Sylius/Bundle/CoreBundle/PriceHistory/CommandDispatcher/BatchedApplyLowestPriceOnChannelPricingsCommandDispatcher.php @@ -22,6 +22,7 @@ use Symfony\Component\Messenger\MessageBusInterface; final class BatchedApplyLowestPriceOnChannelPricingsCommandDispatcher implements ApplyLowestPriceOnChannelPricingsCommandDispatcherInterface { + /** @param RepositoryInterface $channelPricingRepository */ public function __construct( private RepositoryInterface $channelPricingRepository, private MessageBusInterface $commandBus, diff --git a/src/Sylius/Bundle/CoreBundle/PriceHistory/CommandHandler/ApplyLowestPriceOnChannelPricingsHandler.php b/src/Sylius/Bundle/CoreBundle/PriceHistory/CommandHandler/ApplyLowestPriceOnChannelPricingsHandler.php index 4daa1c0ab6..a9c33bf9fc 100644 --- a/src/Sylius/Bundle/CoreBundle/PriceHistory/CommandHandler/ApplyLowestPriceOnChannelPricingsHandler.php +++ b/src/Sylius/Bundle/CoreBundle/PriceHistory/CommandHandler/ApplyLowestPriceOnChannelPricingsHandler.php @@ -20,6 +20,7 @@ use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class ApplyLowestPriceOnChannelPricingsHandler { + /** @param RepositoryInterface $channelPricingRepository */ public function __construct( private ProductLowestPriceBeforeDiscountProcessorInterface $productLowestPriceBeforeDiscountProcessor, private RepositoryInterface $channelPricingRepository, diff --git a/src/Sylius/Bundle/CoreBundle/Resolver/CustomerResolver.php b/src/Sylius/Bundle/CoreBundle/Resolver/CustomerResolver.php index 93feeceb4e..d454074031 100644 --- a/src/Sylius/Bundle/CoreBundle/Resolver/CustomerResolver.php +++ b/src/Sylius/Bundle/CoreBundle/Resolver/CustomerResolver.php @@ -20,6 +20,7 @@ use Sylius\Resource\Factory\FactoryInterface; final class CustomerResolver implements CustomerResolverInterface { + /** @param FactoryInterface $customerFactory */ public function __construct( private FactoryInterface $customerFactory, private CustomerProviderInterface $customerProvider, diff --git a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/RegisteredUserValidator.php b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/RegisteredUserValidator.php index 9e2829fda5..54e0444de4 100644 --- a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/RegisteredUserValidator.php +++ b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/RegisteredUserValidator.php @@ -21,6 +21,7 @@ use Webmozart\Assert\Assert; final class RegisteredUserValidator extends ConstraintValidator { + /** @param RepositoryInterface $customerRepository */ public function __construct(private RepositoryInterface $customerRepository) { } diff --git a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/ResendShipmentConfirmationEmailWithValidShipmentStateValidator.php b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/ResendShipmentConfirmationEmailWithValidShipmentStateValidator.php index f613bd8e04..969273de79 100644 --- a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/ResendShipmentConfirmationEmailWithValidShipmentStateValidator.php +++ b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/ResendShipmentConfirmationEmailWithValidShipmentStateValidator.php @@ -22,9 +22,7 @@ use Symfony\Component\Validator\Exception\UnexpectedTypeException; final class ResendShipmentConfirmationEmailWithValidShipmentStateValidator extends ConstraintValidator { - /** - * @param RepositoryInterface $shipmentRepository - */ + /** @param RepositoryInterface $shipmentRepository */ public function __construct(private RepositoryInterface $shipmentRepository) { } diff --git a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/TranslationForExistingLocalesValidator.php b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/TranslationForExistingLocalesValidator.php index 53d41c4a27..a14c29466c 100644 --- a/src/Sylius/Bundle/CoreBundle/Validator/Constraints/TranslationForExistingLocalesValidator.php +++ b/src/Sylius/Bundle/CoreBundle/Validator/Constraints/TranslationForExistingLocalesValidator.php @@ -23,6 +23,7 @@ use Webmozart\Assert\Assert; final class TranslationForExistingLocalesValidator extends ConstraintValidator { + /** @param RepositoryInterface $localeRepository */ public function __construct(private RepositoryInterface $localeRepository) { } diff --git a/src/Sylius/Bundle/CurrencyBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/CurrencyBundle/DependencyInjection/Configuration.php index 5957869d97..4fad375b06 100644 --- a/src/Sylius/Bundle/CurrencyBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/CurrencyBundle/DependencyInjection/Configuration.php @@ -21,7 +21,7 @@ use Sylius\Component\Currency\Model\Currency; use Sylius\Component\Currency\Model\CurrencyInterface; use Sylius\Component\Currency\Model\ExchangeRate; use Sylius\Component\Currency\Model\ExchangeRateInterface; -use Sylius\Component\Resource\Factory\Factory; +use Sylius\Resource\Factory\Factory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; diff --git a/src/Sylius/Bundle/CurrencyBundle/Form/Type/CurrencyChoiceType.php b/src/Sylius/Bundle/CurrencyBundle/Form/Type/CurrencyChoiceType.php index 36ad844937..9a7de99f22 100644 --- a/src/Sylius/Bundle/CurrencyBundle/Form/Type/CurrencyChoiceType.php +++ b/src/Sylius/Bundle/CurrencyBundle/Form/Type/CurrencyChoiceType.php @@ -13,6 +13,7 @@ declare(strict_types=1); namespace Sylius\Bundle\CurrencyBundle\Form\Type; +use Sylius\Component\Currency\Model\CurrencyInterface; use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer; use Symfony\Component\Form\AbstractType; @@ -23,6 +24,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class CurrencyChoiceType extends AbstractType { + /** @param RepositoryInterface $currencyRepository */ public function __construct(private RepositoryInterface $currencyRepository) { } diff --git a/src/Sylius/Bundle/CustomerBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/CustomerBundle/DependencyInjection/Configuration.php index 382b78bcbd..daa16ec214 100644 --- a/src/Sylius/Bundle/CustomerBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/CustomerBundle/DependencyInjection/Configuration.php @@ -22,7 +22,7 @@ use Sylius\Component\Customer\Model\Customer; use Sylius\Component\Customer\Model\CustomerGroup; use Sylius\Component\Customer\Model\CustomerGroupInterface; use Sylius\Component\Customer\Model\CustomerInterface; -use Sylius\Component\Resource\Factory\Factory; +use Sylius\Resource\Factory\Factory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; diff --git a/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerChoiceType.php b/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerChoiceType.php index 37b8ddcf3c..30c730165d 100644 --- a/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerChoiceType.php +++ b/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerChoiceType.php @@ -24,6 +24,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class CustomerChoiceType extends AbstractType { + /** @param RepositoryInterface $customerRepository */ public function __construct(private RepositoryInterface $customerRepository) { } diff --git a/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerGroupChoiceType.php b/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerGroupChoiceType.php index 0c918328cb..a99214bc21 100644 --- a/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerGroupChoiceType.php +++ b/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerGroupChoiceType.php @@ -13,6 +13,7 @@ declare(strict_types=1); namespace Sylius\Bundle\CustomerBundle\Form\Type; +use Sylius\Component\Customer\Model\CustomerGroupInterface; use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer; use Symfony\Component\Form\AbstractType; @@ -23,6 +24,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class CustomerGroupChoiceType extends AbstractType { + /** @param RepositoryInterface $customerGroupRepository */ public function __construct(private RepositoryInterface $customerGroupRepository) { } diff --git a/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerGroupCodeChoiceType.php b/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerGroupCodeChoiceType.php index 8e88cc0561..4e2b3acd2b 100644 --- a/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerGroupCodeChoiceType.php +++ b/src/Sylius/Bundle/CustomerBundle/Form/Type/CustomerGroupCodeChoiceType.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Sylius\Bundle\CustomerBundle\Form\Type; use Sylius\Bundle\ResourceBundle\Form\DataTransformer\ResourceToIdentifierTransformer; +use Sylius\Component\Customer\Model\CustomerGroupInterface; use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; @@ -21,6 +22,7 @@ use Symfony\Component\Form\ReversedTransformer; final class CustomerGroupCodeChoiceType extends AbstractType { + /** @param RepositoryInterface $customerGroupRepository */ public function __construct(private RepositoryInterface $customerGroupRepository) { } diff --git a/src/Sylius/Bundle/InventoryBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/InventoryBundle/DependencyInjection/Configuration.php index 297861e3b8..e7bd9fb8bc 100644 --- a/src/Sylius/Bundle/InventoryBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/InventoryBundle/DependencyInjection/Configuration.php @@ -17,7 +17,7 @@ use Sylius\Bundle\ResourceBundle\Controller\ResourceController; use Sylius\Bundle\ResourceBundle\SyliusResourceBundle; use Sylius\Component\Inventory\Model\InventoryUnit; use Sylius\Component\Inventory\Model\InventoryUnitInterface; -use Sylius\Component\Resource\Factory\Factory; +use Sylius\Resource\Factory\Factory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; diff --git a/src/Sylius/Bundle/LocaleBundle/Checker/LocaleUsageChecker.php b/src/Sylius/Bundle/LocaleBundle/Checker/LocaleUsageChecker.php index e6849f535d..e91f660a9c 100644 --- a/src/Sylius/Bundle/LocaleBundle/Checker/LocaleUsageChecker.php +++ b/src/Sylius/Bundle/LocaleBundle/Checker/LocaleUsageChecker.php @@ -23,9 +23,7 @@ use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class LocaleUsageChecker implements LocaleUsageCheckerInterface { - /** - * @param RepositoryInterface $localeRepository - */ + /** @param RepositoryInterface $localeRepository */ public function __construct( private RepositoryInterface $localeRepository, private RegistryInterface $resourceRegistry, diff --git a/src/Sylius/Bundle/LocaleBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/LocaleBundle/DependencyInjection/Configuration.php index 5402fe93c4..3d717e98d0 100644 --- a/src/Sylius/Bundle/LocaleBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/LocaleBundle/DependencyInjection/Configuration.php @@ -18,7 +18,7 @@ use Sylius\Bundle\ResourceBundle\Controller\ResourceController; use Sylius\Bundle\ResourceBundle\SyliusResourceBundle; use Sylius\Component\Locale\Model\Locale; use Sylius\Component\Locale\Model\LocaleInterface; -use Sylius\Component\Resource\Factory\Factory; +use Sylius\Resource\Factory\Factory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; diff --git a/src/Sylius/Bundle/LocaleBundle/Form/Type/LocaleChoiceType.php b/src/Sylius/Bundle/LocaleBundle/Form/Type/LocaleChoiceType.php index 258c546fbd..8d5465abea 100644 --- a/src/Sylius/Bundle/LocaleBundle/Form/Type/LocaleChoiceType.php +++ b/src/Sylius/Bundle/LocaleBundle/Form/Type/LocaleChoiceType.php @@ -13,6 +13,7 @@ declare(strict_types=1); namespace Sylius\Bundle\LocaleBundle\Form\Type; +use Sylius\Component\Locale\Model\LocaleInterface; use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer; use Symfony\Component\Form\AbstractType; @@ -23,6 +24,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class LocaleChoiceType extends AbstractType { + /** @param RepositoryInterface $localeRepository */ public function __construct(private RepositoryInterface $localeRepository) { } diff --git a/src/Sylius/Bundle/OrderBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/OrderBundle/DependencyInjection/Configuration.php index 3d86a0b60d..4edf388353 100644 --- a/src/Sylius/Bundle/OrderBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/OrderBundle/DependencyInjection/Configuration.php @@ -29,7 +29,7 @@ use Sylius\Component\Order\Model\OrderItemUnit; use Sylius\Component\Order\Model\OrderItemUnitInterface; use Sylius\Component\Order\Model\OrderSequence; use Sylius\Component\Order\Model\OrderSequenceInterface; -use Sylius\Component\Resource\Factory\Factory; +use Sylius\Resource\Factory\Factory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; diff --git a/src/Sylius/Bundle/OrderBundle/NumberGenerator/SequentialOrderNumberGenerator.php b/src/Sylius/Bundle/OrderBundle/NumberGenerator/SequentialOrderNumberGenerator.php index ccc17b3dbb..6cc1bcfaca 100644 --- a/src/Sylius/Bundle/OrderBundle/NumberGenerator/SequentialOrderNumberGenerator.php +++ b/src/Sylius/Bundle/OrderBundle/NumberGenerator/SequentialOrderNumberGenerator.php @@ -20,6 +20,10 @@ use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class SequentialOrderNumberGenerator implements OrderNumberGeneratorInterface { + /** + * @param RepositoryInterface $sequenceRepository + * @param FactoryInterface $sequenceFactory + */ public function __construct( private RepositoryInterface $sequenceRepository, private FactoryInterface $sequenceFactory, diff --git a/src/Sylius/Bundle/PaymentBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/PaymentBundle/DependencyInjection/Configuration.php index 6c26b7a571..f8c4d88ded 100644 --- a/src/Sylius/Bundle/PaymentBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/PaymentBundle/DependencyInjection/Configuration.php @@ -24,8 +24,8 @@ use Sylius\Component\Payment\Model\PaymentMethod; use Sylius\Component\Payment\Model\PaymentMethodInterface; use Sylius\Component\Payment\Model\PaymentMethodTranslation; use Sylius\Component\Payment\Model\PaymentMethodTranslationInterface; -use Sylius\Component\Resource\Factory\Factory; -use Sylius\Component\Resource\Factory\TranslatableFactory; +use Sylius\Resource\Factory\Factory; +use Sylius\Resource\Factory\TranslatableFactory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; diff --git a/src/Sylius/Bundle/PaymentBundle/Form/Type/PaymentMethodChoiceType.php b/src/Sylius/Bundle/PaymentBundle/Form/Type/PaymentMethodChoiceType.php index f5f9db6e7f..3ebbf73301 100644 --- a/src/Sylius/Bundle/PaymentBundle/Form/Type/PaymentMethodChoiceType.php +++ b/src/Sylius/Bundle/PaymentBundle/Form/Type/PaymentMethodChoiceType.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Sylius\Bundle\PaymentBundle\Form\Type; use Sylius\Component\Payment\Model\PaymentInterface; +use Sylius\Component\Payment\Model\PaymentMethodInterface; use Sylius\Component\Payment\Resolver\PaymentMethodsResolverInterface; use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer; @@ -25,6 +26,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class PaymentMethodChoiceType extends AbstractType { + /** @param RepositoryInterface $paymentMethodRepository */ public function __construct( private PaymentMethodsResolverInterface $paymentMethodsResolver, private RepositoryInterface $paymentMethodRepository, diff --git a/src/Sylius/Bundle/PayumBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/PayumBundle/DependencyInjection/Configuration.php index 4522b2f1f4..d64c8eff84 100644 --- a/src/Sylius/Bundle/PayumBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/PayumBundle/DependencyInjection/Configuration.php @@ -20,7 +20,7 @@ use Sylius\Bundle\PayumBundle\Model\PaymentSecurityToken; use Sylius\Bundle\PayumBundle\Model\PaymentSecurityTokenInterface; use Sylius\Bundle\ResourceBundle\Controller\ResourceController; use Sylius\Bundle\ResourceBundle\SyliusResourceBundle; -use Sylius\Component\Resource\Factory\Factory; +use Sylius\Resource\Factory\Factory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; diff --git a/src/Sylius/Bundle/ProductBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/ProductBundle/DependencyInjection/Configuration.php index 411fddd75c..cc06a40875 100644 --- a/src/Sylius/Bundle/ProductBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/ProductBundle/DependencyInjection/Configuration.php @@ -48,8 +48,8 @@ use Sylius\Component\Product\Model\ProductVariant; use Sylius\Component\Product\Model\ProductVariantInterface; use Sylius\Component\Product\Model\ProductVariantTranslation; use Sylius\Component\Product\Model\ProductVariantTranslationInterface; -use Sylius\Component\Resource\Factory\Factory; -use Sylius\Component\Resource\Factory\TranslatableFactory; +use Sylius\Resource\Factory\Factory; +use Sylius\Resource\Factory\TranslatableFactory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; diff --git a/src/Sylius/Bundle/ProductBundle/Form/DataTransformer/ProductsToProductAssociationsTransformer.php b/src/Sylius/Bundle/ProductBundle/Form/DataTransformer/ProductsToProductAssociationsTransformer.php index b25c8f3371..bc4d07cbd7 100644 --- a/src/Sylius/Bundle/ProductBundle/Form/DataTransformer/ProductsToProductAssociationsTransformer.php +++ b/src/Sylius/Bundle/ProductBundle/Form/DataTransformer/ProductsToProductAssociationsTransformer.php @@ -29,6 +29,10 @@ final class ProductsToProductAssociationsTransformer implements DataTransformerI /** @var Collection */ private ?Collection $productAssociations = null; + /** + * @param FactoryInterface $productAssociationFactory + * @param RepositoryInterface $productAssociationTypeRepository + */ public function __construct( private FactoryInterface $productAssociationFactory, private ProductRepositoryInterface $productRepository, diff --git a/src/Sylius/Bundle/ProductBundle/Form/EventSubscriber/BuildAttributesFormSubscriber.php b/src/Sylius/Bundle/ProductBundle/Form/EventSubscriber/BuildAttributesFormSubscriber.php index 99b7a0c9d1..25f2359f34 100644 --- a/src/Sylius/Bundle/ProductBundle/Form/EventSubscriber/BuildAttributesFormSubscriber.php +++ b/src/Sylius/Bundle/ProductBundle/Form/EventSubscriber/BuildAttributesFormSubscriber.php @@ -26,6 +26,7 @@ use Webmozart\Assert\Assert; final class BuildAttributesFormSubscriber implements EventSubscriberInterface { + /** @param FactoryInterface $attributeValueFactory */ public function __construct( private FactoryInterface $attributeValueFactory, private TranslationLocaleProviderInterface $localeProvider, diff --git a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductAssociationTypeChoiceType.php b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductAssociationTypeChoiceType.php index c84935ff4f..f0e12434a8 100644 --- a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductAssociationTypeChoiceType.php +++ b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductAssociationTypeChoiceType.php @@ -13,6 +13,7 @@ declare(strict_types=1); namespace Sylius\Bundle\ProductBundle\Form\Type; +use Sylius\Component\Product\Model\ProductAssociationTypeInterface; use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer; use Symfony\Component\Form\AbstractType; @@ -23,6 +24,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class ProductAssociationTypeChoiceType extends AbstractType { + /** @param RepositoryInterface $productAssociationTypeRepository */ public function __construct(private RepositoryInterface $productAssociationTypeRepository) { } diff --git a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductAssociationsType.php b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductAssociationsType.php index 6dba31ae61..92e58b0d5e 100644 --- a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductAssociationsType.php +++ b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductAssociationsType.php @@ -24,6 +24,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class ProductAssociationsType extends AbstractType { + /** @param RepositoryInterface $productAssociationTypeRepository */ public function __construct( private RepositoryInterface $productAssociationTypeRepository, private DataTransformerInterface $productsToProductAssociationsTransformer, diff --git a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductChoiceType.php b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductChoiceType.php index 73758f9a29..4e6f58b391 100644 --- a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductChoiceType.php +++ b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductChoiceType.php @@ -13,6 +13,7 @@ declare(strict_types=1); namespace Sylius\Bundle\ProductBundle\Form\Type; +use Sylius\Component\Product\Model\ProductInterface; use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer; use Symfony\Component\Form\AbstractType; @@ -23,6 +24,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class ProductChoiceType extends AbstractType { + /** @param RepositoryInterface $productRepository */ public function __construct(private RepositoryInterface $productRepository) { } diff --git a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductCodeChoiceType.php b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductCodeChoiceType.php index eb20918952..a239bc8520 100644 --- a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductCodeChoiceType.php +++ b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductCodeChoiceType.php @@ -14,6 +14,7 @@ declare(strict_types=1); namespace Sylius\Bundle\ProductBundle\Form\Type; use Sylius\Bundle\ResourceBundle\Form\DataTransformer\ResourceToIdentifierTransformer; +use Sylius\Component\Product\Model\ProductInterface; use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Component\Form\AbstractType; use Symfony\Component\Form\FormBuilderInterface; @@ -21,6 +22,7 @@ use Symfony\Component\Form\ReversedTransformer; final class ProductCodeChoiceType extends AbstractType { + /** @param RepositoryInterface $productRepository */ public function __construct(private RepositoryInterface $productRepository) { } diff --git a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductOptionChoiceType.php b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductOptionChoiceType.php index 12e8c3f08c..4552f8ad15 100644 --- a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductOptionChoiceType.php +++ b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductOptionChoiceType.php @@ -13,6 +13,7 @@ declare(strict_types=1); namespace Sylius\Bundle\ProductBundle\Form\Type; +use Sylius\Component\Product\Model\ProductOptionInterface; use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer; use Symfony\Component\Form\AbstractType; @@ -26,6 +27,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; */ final class ProductOptionChoiceType extends AbstractType { + /** @param RepositoryInterface $productOptionRepository */ public function __construct(private RepositoryInterface $productOptionRepository) { trigger_deprecation( diff --git a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductType.php b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductType.php index ee0bf26ce4..8c288db8ca 100644 --- a/src/Sylius/Bundle/ProductBundle/Form/Type/ProductType.php +++ b/src/Sylius/Bundle/ProductBundle/Form/Type/ProductType.php @@ -19,6 +19,7 @@ use Sylius\Bundle\ProductBundle\Form\EventSubscriber\SimpleProductSubscriber; use Sylius\Bundle\ResourceBundle\Form\EventSubscriber\AddCodeFormSubscriber; use Sylius\Bundle\ResourceBundle\Form\Type\AbstractResourceType; use Sylius\Bundle\ResourceBundle\Form\Type\ResourceTranslationsType; +use Sylius\Component\Attribute\Model\AttributeValueInterface; use Sylius\Component\Product\Resolver\ProductVariantResolverInterface; use Sylius\Resource\Factory\FactoryInterface; use Sylius\Component\Resource\Translation\Provider\TranslationLocaleProviderInterface; @@ -30,6 +31,7 @@ final class ProductType extends AbstractResourceType { /** * @param array|string[] $validationGroups + * @param FactoryInterface $attributeValueFactory */ public function __construct( string $dataClass, diff --git a/src/Sylius/Bundle/PromotionBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/PromotionBundle/DependencyInjection/Configuration.php index a21a675bca..17372c83a5 100644 --- a/src/Sylius/Bundle/PromotionBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/PromotionBundle/DependencyInjection/Configuration.php @@ -42,7 +42,7 @@ use Sylius\Component\Promotion\Model\PromotionRule; use Sylius\Component\Promotion\Model\PromotionRuleInterface; use Sylius\Component\Promotion\Model\PromotionTranslation; use Sylius\Component\Promotion\Model\PromotionTranslationInterface; -use Sylius\Component\Resource\Factory\Factory; +use Sylius\Resource\Factory\Factory; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; use Symfony\Component\Config\Definition\Builder\TreeBuilder; use Symfony\Component\Config\Definition\ConfigurationInterface; diff --git a/src/Sylius/Bundle/PromotionBundle/Form/Type/PromotionCouponToCodeType.php b/src/Sylius/Bundle/PromotionBundle/Form/Type/PromotionCouponToCodeType.php index 59914c2b24..977f75085f 100644 --- a/src/Sylius/Bundle/PromotionBundle/Form/Type/PromotionCouponToCodeType.php +++ b/src/Sylius/Bundle/PromotionBundle/Form/Type/PromotionCouponToCodeType.php @@ -24,6 +24,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class PromotionCouponToCodeType extends AbstractType implements DataTransformerInterface { + /** @param RepositoryInterface $promotionCouponRepository */ public function __construct(private RepositoryInterface $promotionCouponRepository) { } diff --git a/src/Sylius/Bundle/ReviewBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/ReviewBundle/DependencyInjection/Configuration.php index a955cc5651..c2aa5e7dbd 100644 --- a/src/Sylius/Bundle/ReviewBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/ReviewBundle/DependencyInjection/Configuration.php @@ -16,7 +16,7 @@ namespace Sylius\Bundle\ReviewBundle\DependencyInjection; use Sylius\Bundle\ResourceBundle\Controller\ResourceController; use Sylius\Bundle\ResourceBundle\SyliusResourceBundle; use Sylius\Bundle\ReviewBundle\Form\Type\ReviewType; -use Sylius\Component\Resource\Factory\Factory; +use Sylius\Resource\Factory\Factory; use Sylius\Component\Review\Model\ReviewerInterface; use Sylius\Component\Review\Model\ReviewInterface; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; diff --git a/src/Sylius/Bundle/ShippingBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/ShippingBundle/DependencyInjection/Configuration.php index 0fd4a3d6e0..4674385fd2 100644 --- a/src/Sylius/Bundle/ShippingBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/ShippingBundle/DependencyInjection/Configuration.php @@ -20,8 +20,8 @@ use Sylius\Bundle\ShippingBundle\Form\Type\ShippingCategoryType; use Sylius\Bundle\ShippingBundle\Form\Type\ShippingMethodRuleType; use Sylius\Bundle\ShippingBundle\Form\Type\ShippingMethodTranslationType; use Sylius\Bundle\ShippingBundle\Form\Type\ShippingMethodType; -use Sylius\Component\Resource\Factory\Factory; -use Sylius\Component\Resource\Factory\TranslatableFactory; +use Sylius\Resource\Factory\Factory; +use Sylius\Resource\Factory\TranslatableFactory; use Sylius\Component\Shipping\Model\Shipment; use Sylius\Component\Shipping\Model\ShipmentInterface; use Sylius\Component\Shipping\Model\ShipmentUnit; diff --git a/src/Sylius/Bundle/ShippingBundle/Form/Type/ShippingCategoryChoiceType.php b/src/Sylius/Bundle/ShippingBundle/Form/Type/ShippingCategoryChoiceType.php index 197b9731a3..d656633acf 100644 --- a/src/Sylius/Bundle/ShippingBundle/Form/Type/ShippingCategoryChoiceType.php +++ b/src/Sylius/Bundle/ShippingBundle/Form/Type/ShippingCategoryChoiceType.php @@ -13,6 +13,7 @@ declare(strict_types=1); namespace Sylius\Bundle\ShippingBundle\Form\Type; +use Sylius\Component\Shipping\Model\ShippingCategoryInterface; use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer; use Symfony\Component\Form\AbstractType; @@ -23,6 +24,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class ShippingCategoryChoiceType extends AbstractType { + /** @param RepositoryInterface $shippingCategoryRepository */ public function __construct(private RepositoryInterface $shippingCategoryRepository) { } diff --git a/src/Sylius/Bundle/ShippingBundle/Form/Type/ShippingMethodChoiceType.php b/src/Sylius/Bundle/ShippingBundle/Form/Type/ShippingMethodChoiceType.php index 7af29a323e..d32e029595 100644 --- a/src/Sylius/Bundle/ShippingBundle/Form/Type/ShippingMethodChoiceType.php +++ b/src/Sylius/Bundle/ShippingBundle/Form/Type/ShippingMethodChoiceType.php @@ -31,6 +31,9 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class ShippingMethodChoiceType extends AbstractType { + /** + * @param RepositoryInterface $repository + */ public function __construct( private ShippingMethodsResolverInterface $shippingMethodsResolver, private ServiceRegistryInterface $calculators, diff --git a/src/Sylius/Bundle/TaxationBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/TaxationBundle/DependencyInjection/Configuration.php index 714d9dfb4d..7d0b7909b6 100644 --- a/src/Sylius/Bundle/TaxationBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/TaxationBundle/DependencyInjection/Configuration.php @@ -17,7 +17,7 @@ use Sylius\Bundle\ResourceBundle\Controller\ResourceController; use Sylius\Bundle\ResourceBundle\SyliusResourceBundle; use Sylius\Bundle\TaxationBundle\Form\Type\TaxCategoryType; use Sylius\Bundle\TaxationBundle\Form\Type\TaxRateType; -use Sylius\Component\Resource\Factory\Factory; +use Sylius\Resource\Factory\Factory; use Sylius\Component\Taxation\Model\TaxCategory; use Sylius\Component\Taxation\Model\TaxCategoryInterface; use Sylius\Component\Taxation\Model\TaxRate; diff --git a/src/Sylius/Bundle/TaxationBundle/Form/Type/TaxCategoryChoiceType.php b/src/Sylius/Bundle/TaxationBundle/Form/Type/TaxCategoryChoiceType.php index 1ccb12a826..8b2d77e90e 100644 --- a/src/Sylius/Bundle/TaxationBundle/Form/Type/TaxCategoryChoiceType.php +++ b/src/Sylius/Bundle/TaxationBundle/Form/Type/TaxCategoryChoiceType.php @@ -13,6 +13,7 @@ declare(strict_types=1); namespace Sylius\Bundle\TaxationBundle\Form\Type; +use Sylius\Component\Taxation\Model\TaxCategoryInterface; use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; use Symfony\Bridge\Doctrine\Form\DataTransformer\CollectionToArrayTransformer; use Symfony\Component\Form\AbstractType; @@ -23,6 +24,7 @@ use Symfony\Component\OptionsResolver\OptionsResolver; final class TaxCategoryChoiceType extends AbstractType { + /** @param RepositoryInterface $taxCategoryRepository */ public function __construct(private RepositoryInterface $taxCategoryRepository) { } diff --git a/src/Sylius/Bundle/TaxonomyBundle/Controller/TaxonSlugController.php b/src/Sylius/Bundle/TaxonomyBundle/Controller/TaxonSlugController.php index 138a2f459e..4d7926a74e 100644 --- a/src/Sylius/Bundle/TaxonomyBundle/Controller/TaxonSlugController.php +++ b/src/Sylius/Bundle/TaxonomyBundle/Controller/TaxonSlugController.php @@ -24,6 +24,10 @@ use Symfony\Component\HttpFoundation\Response; final class TaxonSlugController { + /** + * @param RepositoryInterface $taxonRepository + * @param FactoryInterface $taxonFactory + */ public function __construct( private TaxonSlugGeneratorInterface $taxonSlugGenerator, private RepositoryInterface $taxonRepository, diff --git a/src/Sylius/Bundle/TaxonomyBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/TaxonomyBundle/DependencyInjection/Configuration.php index 3dd3056584..aba087c4ed 100644 --- a/src/Sylius/Bundle/TaxonomyBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/TaxonomyBundle/DependencyInjection/Configuration.php @@ -17,8 +17,8 @@ use Sylius\Bundle\ResourceBundle\Controller\ResourceController; use Sylius\Bundle\ResourceBundle\SyliusResourceBundle; use Sylius\Bundle\TaxonomyBundle\Form\Type\TaxonTranslationType; use Sylius\Bundle\TaxonomyBundle\Form\Type\TaxonType; -use Sylius\Component\Resource\Factory\Factory; -use Sylius\Component\Resource\Factory\TranslatableFactory; +use Sylius\Resource\Factory\Factory; +use Sylius\Resource\Factory\TranslatableFactory; use Sylius\Component\Taxonomy\Model\Taxon; use Sylius\Component\Taxonomy\Model\TaxonInterface; use Sylius\Component\Taxonomy\Model\TaxonTranslation; diff --git a/src/Sylius/Bundle/UserBundle/DependencyInjection/Configuration.php b/src/Sylius/Bundle/UserBundle/DependencyInjection/Configuration.php index f42b9a2bdb..9b184df4d3 100644 --- a/src/Sylius/Bundle/UserBundle/DependencyInjection/Configuration.php +++ b/src/Sylius/Bundle/UserBundle/DependencyInjection/Configuration.php @@ -15,7 +15,7 @@ namespace Sylius\Bundle\UserBundle\DependencyInjection; use Sylius\Bundle\ResourceBundle\SyliusResourceBundle; use Sylius\Bundle\UserBundle\Controller\UserController; -use Sylius\Component\Resource\Factory\Factory; +use Sylius\Resource\Factory\Factory; use Sylius\Component\User\Model\User; use Sylius\Component\User\Model\UserInterface; use Symfony\Component\Config\Definition\Builder\ArrayNodeDefinition; diff --git a/src/Sylius/Bundle/UserBundle/Factory/UserWithEncoderFactory.php b/src/Sylius/Bundle/UserBundle/Factory/UserWithEncoderFactory.php index 68f0e18151..8bbbea677f 100644 --- a/src/Sylius/Bundle/UserBundle/Factory/UserWithEncoderFactory.php +++ b/src/Sylius/Bundle/UserBundle/Factory/UserWithEncoderFactory.php @@ -22,6 +22,7 @@ use Webmozart\Assert\Assert; */ final class UserWithEncoderFactory implements FactoryInterface { + /** @param FactoryInterface $decoratedUserFactory */ public function __construct(private FactoryInterface $decoratedUserFactory, private string $encoderName) { } diff --git a/src/Sylius/Bundle/UserBundle/Tests/DependencyInjection/SyliusUserExtensionTest.php b/src/Sylius/Bundle/UserBundle/Tests/DependencyInjection/SyliusUserExtensionTest.php index 8317f7ff94..d01273ee5c 100644 --- a/src/Sylius/Bundle/UserBundle/Tests/DependencyInjection/SyliusUserExtensionTest.php +++ b/src/Sylius/Bundle/UserBundle/Tests/DependencyInjection/SyliusUserExtensionTest.php @@ -19,7 +19,7 @@ use Sylius\Bundle\UserBundle\DependencyInjection\SyliusUserExtension; use Sylius\Bundle\UserBundle\EventListener\UpdateUserEncoderListener; use Sylius\Bundle\UserBundle\EventListener\UserLastLoginSubscriber; use Sylius\Bundle\UserBundle\Factory\UserWithEncoderFactory; -use Sylius\Component\Resource\Factory\Factory; +use Sylius\Resource\Factory\Factory; use Sylius\Component\User\Model\User; use Sylius\Component\User\Model\UserInterface; diff --git a/src/Sylius/Component/Addressing/Checker/CountryProvincesDeletionChecker.php b/src/Sylius/Component/Addressing/Checker/CountryProvincesDeletionChecker.php index c21ab17f1a..907005840f 100644 --- a/src/Sylius/Component/Addressing/Checker/CountryProvincesDeletionChecker.php +++ b/src/Sylius/Component/Addressing/Checker/CountryProvincesDeletionChecker.php @@ -16,10 +16,15 @@ namespace Sylius\Component\Addressing\Checker; use Doctrine\Common\Collections\ArrayCollection; use Sylius\Component\Addressing\Model\CountryInterface; use Sylius\Component\Addressing\Model\ProvinceInterface; +use Sylius\Component\Addressing\Model\ZoneMemberInterface; use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class CountryProvincesDeletionChecker implements CountryProvincesDeletionCheckerInterface { + /** + * @param RepositoryInterface $zoneMemberRepository + * @param RepositoryInterface $provinceRepository + */ public function __construct( private RepositoryInterface $zoneMemberRepository, private RepositoryInterface $provinceRepository, diff --git a/src/Sylius/Component/Addressing/Checker/ZoneDeletionChecker.php b/src/Sylius/Component/Addressing/Checker/ZoneDeletionChecker.php index 1765f82b8b..0692adc332 100644 --- a/src/Sylius/Component/Addressing/Checker/ZoneDeletionChecker.php +++ b/src/Sylius/Component/Addressing/Checker/ZoneDeletionChecker.php @@ -14,10 +14,12 @@ declare(strict_types=1); namespace Sylius\Component\Addressing\Checker; use Sylius\Component\Addressing\Model\ZoneInterface; +use Sylius\Component\Addressing\Model\ZoneMemberInterface; use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class ZoneDeletionChecker implements ZoneDeletionCheckerInterface { + /** @param RepositoryInterface $zoneMemberRepository */ public function __construct(private RepositoryInterface $zoneMemberRepository) { } diff --git a/src/Sylius/Component/Addressing/Factory/ZoneFactory.php b/src/Sylius/Component/Addressing/Factory/ZoneFactory.php index 1dd8a7fde2..2c065ce3f4 100644 --- a/src/Sylius/Component/Addressing/Factory/ZoneFactory.php +++ b/src/Sylius/Component/Addressing/Factory/ZoneFactory.php @@ -24,8 +24,14 @@ use Sylius\Resource\Factory\FactoryInterface; */ final class ZoneFactory implements ZoneFactoryInterface { - public function __construct(private FactoryInterface $factory, private FactoryInterface $zoneMemberFactory) - { + /** + * @param FactoryInterface $factory + * @param FactoryInterface $zoneMemberFactory + */ + public function __construct( + private FactoryInterface $factory, + private FactoryInterface $zoneMemberFactory, + ) { } public function createNew(): ZoneInterface diff --git a/src/Sylius/Component/Addressing/Provider/ProvinceNamingProvider.php b/src/Sylius/Component/Addressing/Provider/ProvinceNamingProvider.php index e9353cfae6..a70152778f 100644 --- a/src/Sylius/Component/Addressing/Provider/ProvinceNamingProvider.php +++ b/src/Sylius/Component/Addressing/Provider/ProvinceNamingProvider.php @@ -20,6 +20,7 @@ use Webmozart\Assert\Assert; class ProvinceNamingProvider implements ProvinceNamingProviderInterface { + /** @param RepositoryInterface $provinceRepository */ public function __construct(private RepositoryInterface $provinceRepository) { } diff --git a/src/Sylius/Component/Attribute/Factory/AttributeFactory.php b/src/Sylius/Component/Attribute/Factory/AttributeFactory.php index 739d96b9b1..30fabc8b35 100644 --- a/src/Sylius/Component/Attribute/Factory/AttributeFactory.php +++ b/src/Sylius/Component/Attribute/Factory/AttributeFactory.php @@ -25,8 +25,11 @@ use Sylius\Resource\Factory\FactoryInterface; */ final class AttributeFactory implements AttributeFactoryInterface { - public function __construct(private FactoryInterface $factory, private ServiceRegistryInterface $attributeTypesRegistry) - { + /** @param FactoryInterface $factory */ + public function __construct( + private FactoryInterface $factory, + private ServiceRegistryInterface $attributeTypesRegistry, + ) { } public function createNew(): AttributeInterface diff --git a/src/Sylius/Component/Channel/Factory/ChannelFactory.php b/src/Sylius/Component/Channel/Factory/ChannelFactory.php index f80afdbd5d..52f75660fb 100644 --- a/src/Sylius/Component/Channel/Factory/ChannelFactory.php +++ b/src/Sylius/Component/Channel/Factory/ChannelFactory.php @@ -23,6 +23,7 @@ use Sylius\Resource\Factory\FactoryInterface; */ final class ChannelFactory implements ChannelFactoryInterface { + /** @param FactoryInterface $defaultFactory */ public function __construct(private FactoryInterface $defaultFactory) { } diff --git a/src/Sylius/Component/Core/Customer/Statistics/CustomerStatisticsProvider.php b/src/Sylius/Component/Core/Customer/Statistics/CustomerStatisticsProvider.php index c6a44ddd98..03ef12e907 100644 --- a/src/Sylius/Component/Core/Customer/Statistics/CustomerStatisticsProvider.php +++ b/src/Sylius/Component/Core/Customer/Statistics/CustomerStatisticsProvider.php @@ -21,8 +21,13 @@ use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class CustomerStatisticsProvider implements CustomerStatisticsProviderInterface { - public function __construct(private OrderRepositoryInterface $orderRepository, private RepositoryInterface $channelRepository) - { + /** + * @param RepositoryInterface $channelRepository + */ + public function __construct( + private OrderRepositoryInterface $orderRepository, + private RepositoryInterface $channelRepository, + ) { } public function getCustomerStatistics(CustomerInterface $customer): CustomerStatistics diff --git a/src/Sylius/Component/Core/Factory/AddressFactory.php b/src/Sylius/Component/Core/Factory/AddressFactory.php index f03872f1b6..d87170a9e3 100644 --- a/src/Sylius/Component/Core/Factory/AddressFactory.php +++ b/src/Sylius/Component/Core/Factory/AddressFactory.php @@ -24,6 +24,7 @@ use Sylius\Resource\Factory\FactoryInterface; */ class AddressFactory implements AddressFactoryInterface { + /** @param FactoryInterface $decoratedFactory */ public function __construct(private FactoryInterface $decoratedFactory) { } diff --git a/src/Sylius/Component/Core/Factory/CartItemFactory.php b/src/Sylius/Component/Core/Factory/CartItemFactory.php index 52222f922e..abd5de002c 100644 --- a/src/Sylius/Component/Core/Factory/CartItemFactory.php +++ b/src/Sylius/Component/Core/Factory/CartItemFactory.php @@ -28,8 +28,11 @@ use Webmozart\Assert\Assert; */ final class CartItemFactory implements CartItemFactoryInterface { - public function __construct(private FactoryInterface $decoratedFactory, private ProductVariantResolverInterface $variantResolver) - { + /** @param FactoryInterface $decoratedFactory */ + public function __construct( + private FactoryInterface $decoratedFactory, + private ProductVariantResolverInterface $variantResolver, + ) { } public function createNew(): OrderItemInterface diff --git a/src/Sylius/Component/Core/Factory/CustomerAfterCheckoutFactory.php b/src/Sylius/Component/Core/Factory/CustomerAfterCheckoutFactory.php index 42dac5509e..5f284bcacf 100644 --- a/src/Sylius/Component/Core/Factory/CustomerAfterCheckoutFactory.php +++ b/src/Sylius/Component/Core/Factory/CustomerAfterCheckoutFactory.php @@ -24,6 +24,7 @@ use Sylius\Resource\Factory\FactoryInterface; */ final class CustomerAfterCheckoutFactory implements CustomerAfterCheckoutFactoryInterface { + /** @param FactoryInterface $baseCustomerFactory */ public function __construct(private FactoryInterface $baseCustomerFactory) { } diff --git a/src/Sylius/Component/Core/Factory/PromotionActionFactory.php b/src/Sylius/Component/Core/Factory/PromotionActionFactory.php index a8942fa4c8..cfbab690bf 100644 --- a/src/Sylius/Component/Core/Factory/PromotionActionFactory.php +++ b/src/Sylius/Component/Core/Factory/PromotionActionFactory.php @@ -22,12 +22,14 @@ use Sylius\Component\Promotion\Model\PromotionActionInterface; use Sylius\Resource\Factory\FactoryInterface; /** + * @template T of PromotionActionInterface + * * @implements PromotionActionFactoryInterface */ final class PromotionActionFactory implements PromotionActionFactoryInterface { /** - * @param FactoryInterface $decoratedFactory + * @param FactoryInterface $decoratedFactory */ public function __construct(private FactoryInterface $decoratedFactory) { diff --git a/src/Sylius/Component/Core/Factory/PromotionRuleFactory.php b/src/Sylius/Component/Core/Factory/PromotionRuleFactory.php index 6d14cd7c48..783e718689 100644 --- a/src/Sylius/Component/Core/Factory/PromotionRuleFactory.php +++ b/src/Sylius/Component/Core/Factory/PromotionRuleFactory.php @@ -23,10 +23,13 @@ use Sylius\Component\Promotion\Model\PromotionRuleInterface; use Sylius\Resource\Factory\FactoryInterface; /** + * @template T of PromotionRuleInterface + * * @implements PromotionRuleFactoryInterface */ final class PromotionRuleFactory implements PromotionRuleFactoryInterface { + /** @param FactoryInterface $decoratedFactory */ public function __construct(private FactoryInterface $decoratedFactory) { } diff --git a/src/Sylius/Component/Core/OrderProcessing/OrderShipmentProcessor.php b/src/Sylius/Component/Core/OrderProcessing/OrderShipmentProcessor.php index d12a22a397..4c7456704b 100644 --- a/src/Sylius/Component/Core/OrderProcessing/OrderShipmentProcessor.php +++ b/src/Sylius/Component/Core/OrderProcessing/OrderShipmentProcessor.php @@ -25,6 +25,7 @@ use Webmozart\Assert\Assert; final class OrderShipmentProcessor implements OrderProcessorInterface { + /** @param FactoryInterface $shipmentFactory */ public function __construct( private DefaultShippingMethodResolverInterface $defaultShippingMethodResolver, private FactoryInterface $shipmentFactory, diff --git a/src/Sylius/Component/Core/OrderProcessing/ShippingChargesProcessor.php b/src/Sylius/Component/Core/OrderProcessing/ShippingChargesProcessor.php index aca3e98fd8..76d469b335 100644 --- a/src/Sylius/Component/Core/OrderProcessing/ShippingChargesProcessor.php +++ b/src/Sylius/Component/Core/OrderProcessing/ShippingChargesProcessor.php @@ -24,8 +24,11 @@ use Webmozart\Assert\Assert; final class ShippingChargesProcessor implements OrderProcessorInterface { - public function __construct(private FactoryInterface $adjustmentFactory, private DelegatingCalculatorInterface $shippingChargesCalculator) - { + /** @param FactoryInterface $adjustmentFactory */ + public function __construct( + private FactoryInterface $adjustmentFactory, + private DelegatingCalculatorInterface $shippingChargesCalculator, + ) { } public function process(BaseOrderInterface $order): void diff --git a/src/Sylius/Component/Core/Promotion/Action/ShippingPercentageDiscountPromotionActionCommand.php b/src/Sylius/Component/Core/Promotion/Action/ShippingPercentageDiscountPromotionActionCommand.php index ad7e808969..d176ee3224 100644 --- a/src/Sylius/Component/Core/Promotion/Action/ShippingPercentageDiscountPromotionActionCommand.php +++ b/src/Sylius/Component/Core/Promotion/Action/ShippingPercentageDiscountPromotionActionCommand.php @@ -28,6 +28,7 @@ final class ShippingPercentageDiscountPromotionActionCommand implements Promotio { public const TYPE = 'shipping_percentage_discount'; + /** @param FactoryInterface $adjustmentFactory */ public function __construct(private FactoryInterface $adjustmentFactory) { } diff --git a/src/Sylius/Component/Core/Promotion/Action/UnitDiscountPromotionActionCommand.php b/src/Sylius/Component/Core/Promotion/Action/UnitDiscountPromotionActionCommand.php index f0057f286d..b9c464447b 100644 --- a/src/Sylius/Component/Core/Promotion/Action/UnitDiscountPromotionActionCommand.php +++ b/src/Sylius/Component/Core/Promotion/Action/UnitDiscountPromotionActionCommand.php @@ -27,6 +27,7 @@ use Sylius\Resource\Factory\FactoryInterface; abstract class UnitDiscountPromotionActionCommand implements PromotionActionCommandInterface { + /** @param FactoryInterface $adjustmentFactory */ public function __construct(protected FactoryInterface $adjustmentFactory) { } diff --git a/src/Sylius/Component/Core/Promotion/Action/UnitFixedDiscountPromotionActionCommand.php b/src/Sylius/Component/Core/Promotion/Action/UnitFixedDiscountPromotionActionCommand.php index ff5c839468..210caf0ea5 100644 --- a/src/Sylius/Component/Core/Promotion/Action/UnitFixedDiscountPromotionActionCommand.php +++ b/src/Sylius/Component/Core/Promotion/Action/UnitFixedDiscountPromotionActionCommand.php @@ -13,6 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Core\Promotion\Action; +use Sylius\Component\Core\Model\AdjustmentInterface; use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Model\OrderItemInterface; use Sylius\Component\Core\Model\OrderItemUnitInterface; @@ -26,6 +27,7 @@ final class UnitFixedDiscountPromotionActionCommand extends UnitDiscountPromotio { public const TYPE = 'unit_fixed_discount'; + /** @param FactoryInterface $adjustmentFactory */ public function __construct( FactoryInterface $adjustmentFactory, private FilterInterface $priceRangeFilter, diff --git a/src/Sylius/Component/Core/Promotion/Action/UnitPercentageDiscountPromotionActionCommand.php b/src/Sylius/Component/Core/Promotion/Action/UnitPercentageDiscountPromotionActionCommand.php index 733fcc5bf5..78e72b6e2b 100644 --- a/src/Sylius/Component/Core/Promotion/Action/UnitPercentageDiscountPromotionActionCommand.php +++ b/src/Sylius/Component/Core/Promotion/Action/UnitPercentageDiscountPromotionActionCommand.php @@ -13,6 +13,7 @@ declare(strict_types=1); namespace Sylius\Component\Core\Promotion\Action; +use Sylius\Component\Core\Model\AdjustmentInterface; use Sylius\Component\Core\Model\OrderInterface; use Sylius\Component\Core\Model\OrderItemInterface; use Sylius\Component\Core\Model\OrderItemUnitInterface; @@ -26,6 +27,7 @@ final class UnitPercentageDiscountPromotionActionCommand extends UnitDiscountPro { public const TYPE = 'unit_percentage_discount'; + /** @param FactoryInterface $adjustmentFactory */ public function __construct( FactoryInterface $adjustmentFactory, private FilterInterface $priceRangeFilter, diff --git a/src/Sylius/Component/Core/Promotion/Checker/ProductInPromotionRuleChecker.php b/src/Sylius/Component/Core/Promotion/Checker/ProductInPromotionRuleChecker.php index 7d138f79c4..4d70dfad9b 100644 --- a/src/Sylius/Component/Core/Promotion/Checker/ProductInPromotionRuleChecker.php +++ b/src/Sylius/Component/Core/Promotion/Checker/ProductInPromotionRuleChecker.php @@ -20,9 +20,7 @@ use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class ProductInPromotionRuleChecker implements ProductInPromotionRuleCheckerInterface { - /** - * @param RepositoryInterface $promotionRuleRepository - */ + /** @param RepositoryInterface $promotionRuleRepository */ public function __construct(private RepositoryInterface $promotionRuleRepository) { } diff --git a/src/Sylius/Component/Core/Promotion/Checker/Rule/ShippingCountryRuleChecker.php b/src/Sylius/Component/Core/Promotion/Checker/Rule/ShippingCountryRuleChecker.php index 17554d9405..a089de5d3b 100644 --- a/src/Sylius/Component/Core/Promotion/Checker/Rule/ShippingCountryRuleChecker.php +++ b/src/Sylius/Component/Core/Promotion/Checker/Rule/ShippingCountryRuleChecker.php @@ -24,6 +24,7 @@ final class ShippingCountryRuleChecker implements RuleCheckerInterface { public const TYPE = 'shipping_country'; + /** @param RepositoryInterface $countryRepository */ public function __construct(private RepositoryInterface $countryRepository) { } diff --git a/src/Sylius/Component/Core/Promotion/Checker/TaxonInPromotionRuleChecker.php b/src/Sylius/Component/Core/Promotion/Checker/TaxonInPromotionRuleChecker.php index ef53dfca5d..74856fe42e 100644 --- a/src/Sylius/Component/Core/Promotion/Checker/TaxonInPromotionRuleChecker.php +++ b/src/Sylius/Component/Core/Promotion/Checker/TaxonInPromotionRuleChecker.php @@ -20,9 +20,7 @@ use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class TaxonInPromotionRuleChecker implements TaxonInPromotionRuleCheckerInterface { - /** - * @param RepositoryInterface $promotionRuleRepository - */ + /** @param RepositoryInterface $promotionRuleRepository */ public function __construct(private RepositoryInterface $promotionRuleRepository) { } diff --git a/src/Sylius/Component/Core/Promotion/Updater/Rule/ContainsProductRuleUpdater.php b/src/Sylius/Component/Core/Promotion/Updater/Rule/ContainsProductRuleUpdater.php index 89265fdcd7..3cd5574bf6 100644 --- a/src/Sylius/Component/Core/Promotion/Updater/Rule/ContainsProductRuleUpdater.php +++ b/src/Sylius/Component/Core/Promotion/Updater/Rule/ContainsProductRuleUpdater.php @@ -23,6 +23,7 @@ use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; */ final class ContainsProductRuleUpdater implements ProductAwareRuleUpdaterInterface { + /** @param RepositoryInterface $promotionRuleRepository */ public function __construct(private RepositoryInterface $promotionRuleRepository) { trigger_deprecation( diff --git a/src/Sylius/Component/Core/Promotion/Updater/Rule/HasTaxonRuleUpdater.php b/src/Sylius/Component/Core/Promotion/Updater/Rule/HasTaxonRuleUpdater.php index 1a89aa25e1..452566c118 100644 --- a/src/Sylius/Component/Core/Promotion/Updater/Rule/HasTaxonRuleUpdater.php +++ b/src/Sylius/Component/Core/Promotion/Updater/Rule/HasTaxonRuleUpdater.php @@ -21,8 +21,11 @@ use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class HasTaxonRuleUpdater implements TaxonAwareRuleUpdaterInterface { - public function __construct(private RepositoryInterface $promotionRuleRepository, private EntityManagerInterface $manager) - { + /** @param RepositoryInterface $promotionRuleRepository */ + public function __construct( + private RepositoryInterface $promotionRuleRepository, + private EntityManagerInterface $manager + ) { } public function updateAfterDeletingTaxon(TaxonInterface $taxon): array diff --git a/src/Sylius/Component/Core/Promotion/Updater/Rule/TotalOfItemsFromTaxonRuleUpdater.php b/src/Sylius/Component/Core/Promotion/Updater/Rule/TotalOfItemsFromTaxonRuleUpdater.php index 932383b100..b87310f2e1 100644 --- a/src/Sylius/Component/Core/Promotion/Updater/Rule/TotalOfItemsFromTaxonRuleUpdater.php +++ b/src/Sylius/Component/Core/Promotion/Updater/Rule/TotalOfItemsFromTaxonRuleUpdater.php @@ -23,6 +23,7 @@ use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; */ final class TotalOfItemsFromTaxonRuleUpdater implements TaxonAwareRuleUpdaterInterface { + /** @param RepositoryInterface $promotionRuleRepository */ public function __construct(private RepositoryInterface $promotionRuleRepository) { trigger_deprecation( diff --git a/src/Sylius/Component/Core/Provider/TranslationLocaleProvider.php b/src/Sylius/Component/Core/Provider/TranslationLocaleProvider.php index 51e3c963f3..f33877c73a 100644 --- a/src/Sylius/Component/Core/Provider/TranslationLocaleProvider.php +++ b/src/Sylius/Component/Core/Provider/TranslationLocaleProvider.php @@ -20,11 +20,11 @@ use Sylius\Component\Resource\Translation\Provider\TranslationLocaleProviderInte final class TranslationLocaleProvider implements TranslationLocaleProviderInterface { - /** - * @param RepositoryInterface|LocaleCollectionProviderInterface $localeRepository - */ - public function __construct(private LocaleCollectionProviderInterface|RepositoryInterface $localeRepository, private string $defaultLocaleCode) - { + /** @param RepositoryInterface|LocaleCollectionProviderInterface $localeRepository */ + public function __construct( + private LocaleCollectionProviderInterface|RepositoryInterface $localeRepository, + private string $defaultLocaleCode, + ) { if ($this->localeRepository instanceof RepositoryInterface) { trigger_deprecation( 'sylius/core', diff --git a/src/Sylius/Component/Core/Test/Services/DefaultChannelFactory.php b/src/Sylius/Component/Core/Test/Services/DefaultChannelFactory.php index f4735a5db1..3ecd9fe37d 100644 --- a/src/Sylius/Component/Core/Test/Services/DefaultChannelFactory.php +++ b/src/Sylius/Component/Core/Test/Services/DefaultChannelFactory.php @@ -29,6 +29,13 @@ final class DefaultChannelFactory implements DefaultChannelFactoryInterface public const DEFAULT_CHANNEL_CURRENCY = 'USD'; + /** + * @param FactoryInterface $currencyFactory + * @param FactoryInterface $localeFactory + * @param RepositoryInterface $channelRepository + * @param RepositoryInterface $currencyRepository + * @param RepositoryInterface $localeRepository + */ public function __construct( private ChannelFactoryInterface $channelFactory, private FactoryInterface $currencyFactory, diff --git a/src/Sylius/Component/Core/Test/Services/DefaultUnitedStatesChannelFactory.php b/src/Sylius/Component/Core/Test/Services/DefaultUnitedStatesChannelFactory.php index 1f054257ba..c0d64c33b1 100644 --- a/src/Sylius/Component/Core/Test/Services/DefaultUnitedStatesChannelFactory.php +++ b/src/Sylius/Component/Core/Test/Services/DefaultUnitedStatesChannelFactory.php @@ -37,6 +37,16 @@ final class DefaultUnitedStatesChannelFactory implements DefaultChannelFactoryIn public const DEFAULT_CHANNEL_NAME = 'United States'; + /** + * @param RepositoryInterface $channelRepository + * @param RepositoryInterface $countryRepository + * @param RepositoryInterface $currencyRepository + * @param RepositoryInterface $localeRepository + * @param RepositoryInterface $zoneRepository + * @param FactoryInterface $countryFactory + * @param FactoryInterface $currencyFactory + * @param FactoryInterface $localeFactory + */ public function __construct( private RepositoryInterface $channelRepository, private RepositoryInterface $countryRepository, diff --git a/src/Sylius/Component/Core/Test/Tests/Taxation/Applicator/OrderItemUnitsTaxesApplicatorTest.php b/src/Sylius/Component/Core/Test/Tests/Taxation/Applicator/OrderItemUnitsTaxesApplicatorTest.php index 6f80623a2d..baff00cb08 100644 --- a/src/Sylius/Component/Core/Test/Tests/Taxation/Applicator/OrderItemUnitsTaxesApplicatorTest.php +++ b/src/Sylius/Component/Core/Test/Tests/Taxation/Applicator/OrderItemUnitsTaxesApplicatorTest.php @@ -26,18 +26,23 @@ use Sylius\Component\Core\Model\TaxRate; use Sylius\Component\Core\Model\TaxRateInterface; use Sylius\Component\Core\Taxation\Applicator\OrderItemUnitsTaxesApplicator; use Sylius\Component\Order\Factory\AdjustmentFactory; -use Sylius\Component\Resource\Factory\Factory; +use Sylius\Component\Order\Model\AdjustmentInterface; use Sylius\Component\Taxation\Calculator\DecimalCalculator; use Sylius\Component\Taxation\Calculator\DefaultCalculator; use Sylius\Component\Taxation\Resolver\TaxRateResolverInterface; +use Sylius\Resource\Factory\Factory; +use Sylius\Resource\Factory\FactoryInterface; final class OrderItemUnitsTaxesApplicatorTest extends TestCase { public function test_it_calculates_tax_with_rounding(): void { + /** @var FactoryInterface $adjustmentFactory */ + $adjustmentFactory = new Factory(Adjustment::class); + $applicator = new OrderItemUnitsTaxesApplicator( new DefaultCalculator(), - new AdjustmentFactory(new Factory(Adjustment::class)), + new AdjustmentFactory($adjustmentFactory), $this->createConfiguredMock(TaxRateResolverInterface::class, [ 'resolve' => $this->createTaxRate(), ]), @@ -54,9 +59,12 @@ final class OrderItemUnitsTaxesApplicatorTest extends TestCase public function test_it_calculates_tax_with_decimal_precision(): void { + /** @var FactoryInterface $adjustmentFactory */ + $adjustmentFactory = new Factory(Adjustment::class); + $applicator = new OrderItemUnitsTaxesApplicator( new DecimalCalculator(), - new AdjustmentFactory(new Factory(Adjustment::class)), + new AdjustmentFactory($adjustmentFactory), $this->createConfiguredMock(TaxRateResolverInterface::class, [ 'resolve' => $this->createTaxRate(), ]), diff --git a/src/Sylius/Component/Core/Test/Tests/Taxation/Applicator/OrderItemsTaxesApplicatorTest.php b/src/Sylius/Component/Core/Test/Tests/Taxation/Applicator/OrderItemsTaxesApplicatorTest.php index 206d1cf00e..fbca263041 100644 --- a/src/Sylius/Component/Core/Test/Tests/Taxation/Applicator/OrderItemsTaxesApplicatorTest.php +++ b/src/Sylius/Component/Core/Test/Tests/Taxation/Applicator/OrderItemsTaxesApplicatorTest.php @@ -27,7 +27,9 @@ use Sylius\Component\Core\Model\TaxRate; use Sylius\Component\Core\Model\TaxRateInterface; use Sylius\Component\Core\Taxation\Applicator\OrderItemsTaxesApplicator; use Sylius\Component\Order\Factory\AdjustmentFactory; -use Sylius\Component\Resource\Factory\Factory; +use Sylius\Component\Order\Model\AdjustmentInterface; +use Sylius\Resource\Factory\FactoryInterface; +use Sylius\Resource\Factory\Factory; use Sylius\Component\Taxation\Calculator\DecimalCalculator; use Sylius\Component\Taxation\Resolver\TaxRateResolverInterface; @@ -35,9 +37,12 @@ final class OrderItemsTaxesApplicatorTest extends TestCase { public function test_it_calculates_tax_with_decimal_precision(): void { + /** @var FactoryInterface $adjustmentFactory */ + $adjustmentFactory = new Factory(Adjustment::class); + $applicator = new OrderItemsTaxesApplicator( new DecimalCalculator(), - new AdjustmentFactory(new Factory(Adjustment::class)), + new AdjustmentFactory($adjustmentFactory), new IntegerDistributor(), $this->createConfiguredMock(TaxRateResolverInterface::class, [ 'resolve' => $this->createTaxRate(), diff --git a/src/Sylius/Component/Locale/Provider/LocaleCollectionProvider.php b/src/Sylius/Component/Locale/Provider/LocaleCollectionProvider.php index 02cec3e53f..c1f3d0eae2 100644 --- a/src/Sylius/Component/Locale/Provider/LocaleCollectionProvider.php +++ b/src/Sylius/Component/Locale/Provider/LocaleCollectionProvider.php @@ -18,9 +18,7 @@ use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class LocaleCollectionProvider implements LocaleCollectionProviderInterface { - /** - * @param RepositoryInterface $localeRepository - */ + /** @param RepositoryInterface $localeRepository */ public function __construct(private RepositoryInterface $localeRepository) { } diff --git a/src/Sylius/Component/Locale/Provider/LocaleProvider.php b/src/Sylius/Component/Locale/Provider/LocaleProvider.php index ed02231ad5..965535433c 100644 --- a/src/Sylius/Component/Locale/Provider/LocaleProvider.php +++ b/src/Sylius/Component/Locale/Provider/LocaleProvider.php @@ -18,11 +18,11 @@ use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class LocaleProvider implements LocaleProviderInterface { - /** - * @param RepositoryInterface|LocaleCollectionProviderInterface $localeRepository - */ - public function __construct(private LocaleCollectionProviderInterface|RepositoryInterface $localeRepository, private string $defaultLocaleCode) - { + /** @param RepositoryInterface|LocaleCollectionProviderInterface $localeRepository */ + public function __construct( + private LocaleCollectionProviderInterface|RepositoryInterface $localeRepository, + private string $defaultLocaleCode, + ) { if ($this->localeRepository instanceof RepositoryInterface) { trigger_deprecation( 'sylius/locale', diff --git a/src/Sylius/Component/Locale/spec/Provider/LocaleCollectionProviderSpec.php b/src/Sylius/Component/Locale/spec/Provider/LocaleCollectionProviderSpec.php index 5059c6edee..db02432575 100644 --- a/src/Sylius/Component/Locale/spec/Provider/LocaleCollectionProviderSpec.php +++ b/src/Sylius/Component/Locale/spec/Provider/LocaleCollectionProviderSpec.php @@ -20,6 +20,7 @@ use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class LocaleCollectionProviderSpec extends ObjectBehavior { + /** @param RepositoryInterface $localeRepository */ function let(RepositoryInterface $localeRepository): void { $this->beConstructedWith($localeRepository); diff --git a/src/Sylius/Component/Order/Context/CartContext.php b/src/Sylius/Component/Order/Context/CartContext.php index 5f094fe439..422b3848ac 100644 --- a/src/Sylius/Component/Order/Context/CartContext.php +++ b/src/Sylius/Component/Order/Context/CartContext.php @@ -18,6 +18,7 @@ use Sylius\Resource\Factory\FactoryInterface; final class CartContext implements CartContextInterface { + /** @param FactoryInterface $cartFactory */ public function __construct(private FactoryInterface $cartFactory) { } diff --git a/src/Sylius/Component/Order/Factory/AdjustmentFactory.php b/src/Sylius/Component/Order/Factory/AdjustmentFactory.php index 88c1c8ea12..4d0650d331 100644 --- a/src/Sylius/Component/Order/Factory/AdjustmentFactory.php +++ b/src/Sylius/Component/Order/Factory/AdjustmentFactory.php @@ -17,10 +17,13 @@ use Sylius\Component\Order\Model\AdjustmentInterface; use Sylius\Resource\Factory\FactoryInterface; /** - * @implements AdjustmentFactoryInterface + * @template T of AdjustmentInterface + * + * @implements AdjustmentFactoryInterface */ class AdjustmentFactory implements AdjustmentFactoryInterface { + /** @param FactoryInterface $adjustmentFactory */ public function __construct(private FactoryInterface $adjustmentFactory) { } diff --git a/src/Sylius/Component/Order/Factory/OrderItemUnitFactory.php b/src/Sylius/Component/Order/Factory/OrderItemUnitFactory.php index f315ff02fe..3e87b6938e 100644 --- a/src/Sylius/Component/Order/Factory/OrderItemUnitFactory.php +++ b/src/Sylius/Component/Order/Factory/OrderItemUnitFactory.php @@ -18,7 +18,9 @@ use Sylius\Component\Order\Model\OrderItemUnitInterface; use Sylius\Component\Resource\Exception\UnsupportedMethodException; /** - * @implements OrderItemUnitFactoryInterface + * @template T of OrderItemUnitInterface + * + * @implements OrderItemUnitFactoryInterface */ class OrderItemUnitFactory implements OrderItemUnitFactoryInterface { diff --git a/src/Sylius/Component/Payment/Factory/PaymentFactory.php b/src/Sylius/Component/Payment/Factory/PaymentFactory.php index fd06e6217f..b113955872 100644 --- a/src/Sylius/Component/Payment/Factory/PaymentFactory.php +++ b/src/Sylius/Component/Payment/Factory/PaymentFactory.php @@ -17,10 +17,13 @@ use Sylius\Component\Payment\Model\PaymentInterface; use Sylius\Resource\Factory\FactoryInterface; /** - * @implements PaymentFactoryInterface + * @template T of PaymentInterface + * + * @implements PaymentFactoryInterface */ final class PaymentFactory implements PaymentFactoryInterface { + /** @param FactoryInterface $factory */ public function __construct(private FactoryInterface $factory) { } diff --git a/src/Sylius/Component/Payment/Resolver/PaymentMethodsResolver.php b/src/Sylius/Component/Payment/Resolver/PaymentMethodsResolver.php index b0be65c4dd..c35a3715d3 100644 --- a/src/Sylius/Component/Payment/Resolver/PaymentMethodsResolver.php +++ b/src/Sylius/Component/Payment/Resolver/PaymentMethodsResolver.php @@ -14,10 +14,12 @@ declare(strict_types=1); namespace Sylius\Component\Payment\Resolver; use Sylius\Component\Payment\Model\PaymentInterface; +use Sylius\Component\Payment\Model\PaymentMethodInterface; use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class PaymentMethodsResolver implements PaymentMethodsResolverInterface { + /** @param RepositoryInterface $paymentMethodRepository */ public function __construct(private RepositoryInterface $paymentMethodRepository) { } diff --git a/src/Sylius/Component/Product/Factory/ProductFactory.php b/src/Sylius/Component/Product/Factory/ProductFactory.php index b8035479e1..549ebce5c6 100644 --- a/src/Sylius/Component/Product/Factory/ProductFactory.php +++ b/src/Sylius/Component/Product/Factory/ProductFactory.php @@ -14,12 +14,24 @@ declare(strict_types=1); namespace Sylius\Component\Product\Factory; use Sylius\Component\Product\Model\ProductInterface; +use Sylius\Component\Product\Model\ProductVariantInterface; use Sylius\Resource\Factory\FactoryInterface; +/** + * @template T of ProductInterface + * + * @implements ProductFactoryInterface + */ class ProductFactory implements ProductFactoryInterface { - public function __construct(private FactoryInterface $factory, private FactoryInterface $variantFactory) - { + /** + * @param FactoryInterface $factory + * @param FactoryInterface $variantFactory + */ + public function __construct( + private FactoryInterface $factory, + private FactoryInterface $variantFactory + ) { } public function createNew(): ProductInterface diff --git a/src/Sylius/Component/Product/Factory/ProductFactoryInterface.php b/src/Sylius/Component/Product/Factory/ProductFactoryInterface.php index ba4d609513..4bb57baf01 100644 --- a/src/Sylius/Component/Product/Factory/ProductFactoryInterface.php +++ b/src/Sylius/Component/Product/Factory/ProductFactoryInterface.php @@ -14,10 +14,12 @@ declare(strict_types=1); namespace Sylius\Component\Product\Factory; use Sylius\Component\Product\Model\ProductInterface; -use Sylius\Component\Resource\Factory\TranslatableFactoryInterface; +use Sylius\Resource\Factory\TranslatableFactoryInterface; /** - * @extends TranslatableFactoryInterface + * @template T of ProductInterface + * + * @extends TranslatableFactoryInterface */ interface ProductFactoryInterface extends TranslatableFactoryInterface { diff --git a/src/Sylius/Component/Product/Factory/ProductVariantFactory.php b/src/Sylius/Component/Product/Factory/ProductVariantFactory.php index 5f848acc03..93271352bf 100644 --- a/src/Sylius/Component/Product/Factory/ProductVariantFactory.php +++ b/src/Sylius/Component/Product/Factory/ProductVariantFactory.php @@ -18,10 +18,13 @@ use Sylius\Component\Product\Model\ProductVariantInterface; use Sylius\Resource\Factory\FactoryInterface; /** - * @implements ProductVariantFactoryInterface + * @template T of ProductVariantInterface + * + * @implements ProductVariantFactoryInterface */ class ProductVariantFactory implements ProductVariantFactoryInterface { + /** @param FactoryInterface $factory */ public function __construct(private FactoryInterface $factory) { } @@ -33,7 +36,6 @@ class ProductVariantFactory implements ProductVariantFactoryInterface public function createForProduct(ProductInterface $product): ProductVariantInterface { - /** @var ProductVariantInterface $variant */ $variant = $this->createNew(); $variant->setProduct($product); diff --git a/src/Sylius/Component/Promotion/Factory/PromotionCouponFactory.php b/src/Sylius/Component/Promotion/Factory/PromotionCouponFactory.php index bf88d39da0..e866226936 100644 --- a/src/Sylius/Component/Promotion/Factory/PromotionCouponFactory.php +++ b/src/Sylius/Component/Promotion/Factory/PromotionCouponFactory.php @@ -19,10 +19,13 @@ use Sylius\Resource\Factory\FactoryInterface; use Webmozart\Assert\Assert; /** - * @implements PromotionCouponFactoryInterface + * @template T of PromotionCouponInterface + * + * @implements PromotionCouponFactoryInterface */ final class PromotionCouponFactory implements PromotionCouponFactoryInterface { + /** @param FactoryInterface $factory */ public function __construct(private FactoryInterface $factory) { } diff --git a/src/Sylius/Component/Promotion/Generator/PromotionCouponGenerator.php b/src/Sylius/Component/Promotion/Generator/PromotionCouponGenerator.php index 0ea4a6fd25..0ea2b13585 100644 --- a/src/Sylius/Component/Promotion/Generator/PromotionCouponGenerator.php +++ b/src/Sylius/Component/Promotion/Generator/PromotionCouponGenerator.php @@ -23,6 +23,7 @@ use Webmozart\Assert\Assert; final class PromotionCouponGenerator implements PromotionCouponGeneratorInterface { + /** @param FactoryInterface $couponFactory */ public function __construct( private FactoryInterface $couponFactory, private PromotionCouponRepositoryInterface $couponRepository, diff --git a/src/Sylius/Component/Review/Factory/ReviewFactory.php b/src/Sylius/Component/Review/Factory/ReviewFactory.php index 142a8a1f71..a0816cb4dd 100644 --- a/src/Sylius/Component/Review/Factory/ReviewFactory.php +++ b/src/Sylius/Component/Review/Factory/ReviewFactory.php @@ -19,10 +19,13 @@ use Sylius\Component\Review\Model\ReviewerInterface; use Sylius\Component\Review\Model\ReviewInterface; /** - * @implements ReviewFactoryInterface + * @template T of ReviewInterface + * + * @implements ReviewFactoryInterface */ final class ReviewFactory implements ReviewFactoryInterface { + /** @param FactoryInterface $factory */ public function __construct(private FactoryInterface $factory) { } diff --git a/src/Sylius/Component/Taxation/Resolver/TaxRateResolver.php b/src/Sylius/Component/Taxation/Resolver/TaxRateResolver.php index 1add44d4cc..b8f60f067c 100644 --- a/src/Sylius/Component/Taxation/Resolver/TaxRateResolver.php +++ b/src/Sylius/Component/Taxation/Resolver/TaxRateResolver.php @@ -20,6 +20,7 @@ use Sylius\Component\Taxation\Model\TaxRateInterface; class TaxRateResolver implements TaxRateResolverInterface { + /** @param RepositoryInterface $taxRateRepository */ public function __construct( protected RepositoryInterface $taxRateRepository, protected ?TaxRateDateEligibilityCheckerInterface $taxRateDateChecker = null, diff --git a/src/Sylius/Component/Taxonomy/Factory/TaxonFactory.php b/src/Sylius/Component/Taxonomy/Factory/TaxonFactory.php index 42fadb17f3..7818d34e1c 100644 --- a/src/Sylius/Component/Taxonomy/Factory/TaxonFactory.php +++ b/src/Sylius/Component/Taxonomy/Factory/TaxonFactory.php @@ -17,10 +17,13 @@ use Sylius\Resource\Factory\FactoryInterface; use Sylius\Component\Taxonomy\Model\TaxonInterface; /** - * @implements TaxonFactoryInterface + * @template T of TaxonInterface + * + * @implements TaxonFactoryInterface */ final class TaxonFactory implements TaxonFactoryInterface { + /** @param FactoryInterface $factory */ public function __construct(private FactoryInterface $factory) { } diff --git a/src/Sylius/Component/User/Security/Checker/TokenUniquenessChecker.php b/src/Sylius/Component/User/Security/Checker/TokenUniquenessChecker.php index 61f9002592..3997c267e6 100644 --- a/src/Sylius/Component/User/Security/Checker/TokenUniquenessChecker.php +++ b/src/Sylius/Component/User/Security/Checker/TokenUniquenessChecker.php @@ -13,12 +13,16 @@ declare(strict_types=1); namespace Sylius\Component\User\Security\Checker; +use Sylius\Component\User\Model\UserInterface; use Sylius\Resource\Doctrine\Persistence\RepositoryInterface; final class TokenUniquenessChecker implements UniquenessCheckerInterface { - public function __construct(private RepositoryInterface $repository, private string $tokenFieldName) - { + /** @param RepositoryInterface $repository */ + public function __construct( + private RepositoryInterface $repository, + private string $tokenFieldName, + ) { } public function isUnique(string $token): bool