diff --git a/bundles/EcommerceFrameworkBundle/CartManager/AbstractCartCheckoutData.php b/bundles/EcommerceFrameworkBundle/CartManager/AbstractCartCheckoutData.php index 37e5191577a..145348a6375 100644 --- a/bundles/EcommerceFrameworkBundle/CartManager/AbstractCartCheckoutData.php +++ b/bundles/EcommerceFrameworkBundle/CartManager/AbstractCartCheckoutData.php @@ -55,6 +55,11 @@ public function getCartId() abstract public function save(); + /** + * @param string $key + * @param int|string $cartId + * @return AbstractCartCheckoutData|null + */ public static function getByKeyCartId($key, $cartId) { throw new \Exception('Not implemented.'); diff --git a/bundles/EcommerceFrameworkBundle/CartManager/CartCheckoutData.php b/bundles/EcommerceFrameworkBundle/CartManager/CartCheckoutData.php index 40cd7a46982..9148638527a 100644 --- a/bundles/EcommerceFrameworkBundle/CartManager/CartCheckoutData.php +++ b/bundles/EcommerceFrameworkBundle/CartManager/CartCheckoutData.php @@ -30,6 +30,11 @@ public function save() $this->getDao()->save(); } + /** + * @param string $key + * @param int|string $cartId + * @return AbstractCartCheckoutData|null + */ public static function getByKeyCartId($key, $cartId) { $cacheKey = CartCheckoutData\Dao::TABLE_NAME . '_' . $key . '_' . $cartId; diff --git a/bundles/EcommerceFrameworkBundle/CartManager/CartInterface.php b/bundles/EcommerceFrameworkBundle/CartManager/CartInterface.php index 851728d40e4..5fbdeaabc7c 100644 --- a/bundles/EcommerceFrameworkBundle/CartManager/CartInterface.php +++ b/bundles/EcommerceFrameworkBundle/CartManager/CartInterface.php @@ -338,6 +338,7 @@ public function getVoucherTokenCodes(); public function getPricingManagerTokenInformationDetails(): array; /** + * @param int $errorCode * @return bool */ public function isVoucherErrorCode($errorCode); diff --git a/bundles/EcommerceFrameworkBundle/CartManager/CartPriceCalculator.php b/bundles/EcommerceFrameworkBundle/CartManager/CartPriceCalculator.php index 2220d988979..96b6e1822b0 100644 --- a/bundles/EcommerceFrameworkBundle/CartManager/CartPriceCalculator.php +++ b/bundles/EcommerceFrameworkBundle/CartManager/CartPriceCalculator.php @@ -151,6 +151,8 @@ protected function configureModificatorResolver(OptionsResolver $resolver) } /** + * @param bool $ignorePricingRules + * @return void * @throws UnsupportedException */ public function calculate($ignorePricingRules = false) diff --git a/bundles/EcommerceFrameworkBundle/CartManager/CartPriceCalculatorInterface.php b/bundles/EcommerceFrameworkBundle/CartManager/CartPriceCalculatorInterface.php index 7761119127f..20797ad9ebe 100644 --- a/bundles/EcommerceFrameworkBundle/CartManager/CartPriceCalculatorInterface.php +++ b/bundles/EcommerceFrameworkBundle/CartManager/CartPriceCalculatorInterface.php @@ -42,6 +42,7 @@ public function initModificators(); /** * Calculates cart sums and saves results * + * @param bool $ignorePricingRules * @return void */ public function calculate($ignorePricingRules = false); diff --git a/bundles/EcommerceFrameworkBundle/CartManager/SessionCartCheckoutData.php b/bundles/EcommerceFrameworkBundle/CartManager/SessionCartCheckoutData.php index 40ae473d943..1e310d7ab6f 100644 --- a/bundles/EcommerceFrameworkBundle/CartManager/SessionCartCheckoutData.php +++ b/bundles/EcommerceFrameworkBundle/CartManager/SessionCartCheckoutData.php @@ -24,6 +24,11 @@ public function save() throw new \Exception('Not implemented, should not be needed for this cart type.'); } + /** + * @param string $key + * @param int|string $cartId + * @return AbstractCartCheckoutData|null + */ public static function getByKeyCartId($key, $cartId) { throw new \Exception('Not implemented, should not be needed for this cart type.'); @@ -56,11 +61,18 @@ public function getCart() return $this->cart; } + /** + * @return int|string|null + */ public function getCartId() { return $this->cartId; } + /** + * @param int|string|null $cartId + * @return void + */ public function setCartId($cartId) { $this->cartId = $cartId; diff --git a/bundles/EcommerceFrameworkBundle/CoreExtensions/ClassDefinition/IndexFieldSelection.php b/bundles/EcommerceFrameworkBundle/CoreExtensions/ClassDefinition/IndexFieldSelection.php index a15700fd0d6..87c0aa13f3e 100644 --- a/bundles/EcommerceFrameworkBundle/CoreExtensions/ClassDefinition/IndexFieldSelection.php +++ b/bundles/EcommerceFrameworkBundle/CoreExtensions/ClassDefinition/IndexFieldSelection.php @@ -72,11 +72,18 @@ public function __construct() { } + /** + * @param bool $considerTenants + * @return void + */ public function setConsiderTenants($considerTenants) { $this->considerTenants = $considerTenants; } + /** + * @return bool + */ public function getConsiderTenants() { return $this->considerTenants; diff --git a/bundles/EcommerceFrameworkBundle/CoreExtensions/ClassDefinition/IndexFieldSelectionCombo.php b/bundles/EcommerceFrameworkBundle/CoreExtensions/ClassDefinition/IndexFieldSelectionCombo.php index 28629edd96c..23c304a14fb 100644 --- a/bundles/EcommerceFrameworkBundle/CoreExtensions/ClassDefinition/IndexFieldSelectionCombo.php +++ b/bundles/EcommerceFrameworkBundle/CoreExtensions/ClassDefinition/IndexFieldSelectionCombo.php @@ -72,31 +72,52 @@ protected function buildOptions(): array return $options; } + /** + * @param bool $specificPriceField + * @return void + */ public function setSpecificPriceField($specificPriceField) { $this->specificPriceField = $specificPriceField; } + /** + * @return bool + */ public function getSpecificPriceField() { return $this->specificPriceField; } + /** + * @param bool $showAllFields + * @return void + */ public function setShowAllFields($showAllFields) { $this->showAllFields = $showAllFields; } + /** + * @return bool + */ public function getShowAllFields() { return $this->showAllFields; } + /** + * @param bool $considerTenants + * @return void + */ public function setConsiderTenants($considerTenants) { $this->considerTenants = $considerTenants; } + /** + * @return bool + */ public function getConsiderTenants() { return $this->considerTenants; diff --git a/bundles/EcommerceFrameworkBundle/CoreExtensions/ClassDefinition/IndexFieldSelectionField.php b/bundles/EcommerceFrameworkBundle/CoreExtensions/ClassDefinition/IndexFieldSelectionField.php index 3246ec9d4ce..11a5f98b1af 100644 --- a/bundles/EcommerceFrameworkBundle/CoreExtensions/ClassDefinition/IndexFieldSelectionField.php +++ b/bundles/EcommerceFrameworkBundle/CoreExtensions/ClassDefinition/IndexFieldSelectionField.php @@ -32,31 +32,52 @@ class IndexFieldSelectionField extends Textarea public $considerTenants = false; + /** + * @param bool $specificPriceField + * @return void + */ public function setSpecificPriceField($specificPriceField) { $this->specificPriceField = $specificPriceField; } + /** + * @return bool + */ public function getSpecificPriceField() { return $this->specificPriceField; } + /** + * @param bool $showAllFields + * @return void + */ public function setShowAllFields($showAllFields) { $this->showAllFields = $showAllFields; } + /** + * @return bool + */ public function getShowAllFields() { return $this->showAllFields; } + /** + * @param bool $considerTenants + * @return void + */ public function setConsiderTenants($considerTenants) { $this->considerTenants = $considerTenants; } + /** + * @return bool + */ public function getConsiderTenants() { return $this->considerTenants; diff --git a/bundles/EcommerceFrameworkBundle/DependencyInjection/ServiceLocator/AssortmentTenantAwareServiceLocator.php b/bundles/EcommerceFrameworkBundle/DependencyInjection/ServiceLocator/AssortmentTenantAwareServiceLocator.php index b70beb0607f..e85c5330705 100644 --- a/bundles/EcommerceFrameworkBundle/DependencyInjection/ServiceLocator/AssortmentTenantAwareServiceLocator.php +++ b/bundles/EcommerceFrameworkBundle/DependencyInjection/ServiceLocator/AssortmentTenantAwareServiceLocator.php @@ -19,6 +19,9 @@ abstract class AssortmentTenantAwareServiceLocator extends TenantAwareServiceLocator { + /** + * @return string|null + */ protected function getEnvironmentTenant() { return $this->environment->getCurrentAssortmentTenant(); diff --git a/bundles/EcommerceFrameworkBundle/DependencyInjection/ServiceLocator/CheckoutTenantAwareServiceLocator.php b/bundles/EcommerceFrameworkBundle/DependencyInjection/ServiceLocator/CheckoutTenantAwareServiceLocator.php index bf75ca944d6..cb94373d584 100644 --- a/bundles/EcommerceFrameworkBundle/DependencyInjection/ServiceLocator/CheckoutTenantAwareServiceLocator.php +++ b/bundles/EcommerceFrameworkBundle/DependencyInjection/ServiceLocator/CheckoutTenantAwareServiceLocator.php @@ -19,6 +19,9 @@ abstract class CheckoutTenantAwareServiceLocator extends TenantAwareServiceLocator { + /** + * @return string|null + */ protected function getEnvironmentTenant() { return $this->environment->getCurrentCheckoutTenant(); diff --git a/bundles/EcommerceFrameworkBundle/DependencyInjection/ServiceLocator/NameServiceLocator.php b/bundles/EcommerceFrameworkBundle/DependencyInjection/ServiceLocator/NameServiceLocator.php index 27775a4d764..bf4bfd16cfc 100644 --- a/bundles/EcommerceFrameworkBundle/DependencyInjection/ServiceLocator/NameServiceLocator.php +++ b/bundles/EcommerceFrameworkBundle/DependencyInjection/ServiceLocator/NameServiceLocator.php @@ -37,6 +37,9 @@ public function __construct(PsrContainerInterface $locator) $this->locator = $locator; } + /** + * @return mixed + */ protected function locate(string $name = null) { $name = $this->resolveName($name); diff --git a/bundles/EcommerceFrameworkBundle/DependencyInjection/ServiceLocator/TenantAwareServiceLocator.php b/bundles/EcommerceFrameworkBundle/DependencyInjection/ServiceLocator/TenantAwareServiceLocator.php index 61736a3a1b0..59abda4ff05 100644 --- a/bundles/EcommerceFrameworkBundle/DependencyInjection/ServiceLocator/TenantAwareServiceLocator.php +++ b/bundles/EcommerceFrameworkBundle/DependencyInjection/ServiceLocator/TenantAwareServiceLocator.php @@ -55,6 +55,9 @@ public function __construct( $this->strictTenants = $strictTenants; } + /** + * @return mixed + */ protected function locate(string $tenant = null) { $tenant = $this->resolveTenant($tenant); @@ -87,5 +90,8 @@ protected function resolveTenant(string $tenant = null) return $this->defaultTenant; } + /** + * @return string|null + */ abstract protected function getEnvironmentTenant(); } diff --git a/bundles/EcommerceFrameworkBundle/IndexService/Config/DefaultFindologic.php b/bundles/EcommerceFrameworkBundle/IndexService/Config/DefaultFindologic.php index 6ad79ca3947..79fb9bfee0c 100644 --- a/bundles/EcommerceFrameworkBundle/IndexService/Config/DefaultFindologic.php +++ b/bundles/EcommerceFrameworkBundle/IndexService/Config/DefaultFindologic.php @@ -132,7 +132,7 @@ public function getSubTenantCondition() * creates object mockup for given data * * @param int $objectId - * @param mixed $data + * @param array $data * @param array $relations * * @return DefaultMockup diff --git a/bundles/EcommerceFrameworkBundle/IndexService/Config/Definition/Attribute.php b/bundles/EcommerceFrameworkBundle/IndexService/Config/Definition/Attribute.php index 1881fce3e52..a9258e68d72 100644 --- a/bundles/EcommerceFrameworkBundle/IndexService/Config/Definition/Attribute.php +++ b/bundles/EcommerceFrameworkBundle/IndexService/Config/Definition/Attribute.php @@ -154,6 +154,11 @@ public function getOptions(): array return $this->options; } + /** + * @param string $name + * @param mixed $defaultValue + * @return mixed + */ public function getOption(string $name, $defaultValue = null) { return $this->options[$name] ?? $defaultValue; diff --git a/bundles/EcommerceFrameworkBundle/IndexService/Config/ElasticSearch.php b/bundles/EcommerceFrameworkBundle/IndexService/Config/ElasticSearch.php index 9c0109001a4..339c0fb8fd6 100644 --- a/bundles/EcommerceFrameworkBundle/IndexService/Config/ElasticSearch.php +++ b/bundles/EcommerceFrameworkBundle/IndexService/Config/ElasticSearch.php @@ -348,7 +348,7 @@ public function setTenantWorker(WorkerInterface $tenantWorker) * creates object mockup for given data * * @param int $objectId - * @param mixed $data + * @param array $data * @param array $relations * * @return DefaultMockup diff --git a/bundles/EcommerceFrameworkBundle/IndexService/Config/MockupConfigInterface.php b/bundles/EcommerceFrameworkBundle/IndexService/Config/MockupConfigInterface.php index 07e3cc543ae..e700c06afb3 100644 --- a/bundles/EcommerceFrameworkBundle/IndexService/Config/MockupConfigInterface.php +++ b/bundles/EcommerceFrameworkBundle/IndexService/Config/MockupConfigInterface.php @@ -24,7 +24,7 @@ interface MockupConfigInterface * creates object mockup for given data * * @param int $objectId - * @param mixed $data + * @param array $data * @param array $relations * * @return mixed diff --git a/bundles/EcommerceFrameworkBundle/IndexService/Config/OptimizedMysql.php b/bundles/EcommerceFrameworkBundle/IndexService/Config/OptimizedMysql.php index 5a7d2e0d2b1..830f2a0e9bb 100644 --- a/bundles/EcommerceFrameworkBundle/IndexService/Config/OptimizedMysql.php +++ b/bundles/EcommerceFrameworkBundle/IndexService/Config/OptimizedMysql.php @@ -29,7 +29,7 @@ class OptimizedMysql extends DefaultMysql implements MockupConfigInterface * creates object mockup for given data * * @param int $objectId - * @param mixed $data + * @param array $data * @param array $relations * * @return DefaultMockup diff --git a/bundles/EcommerceFrameworkBundle/IndexService/Getter/DefaultBrickGetter.php b/bundles/EcommerceFrameworkBundle/IndexService/Getter/DefaultBrickGetter.php index 92433d605af..a17e868d65b 100644 --- a/bundles/EcommerceFrameworkBundle/IndexService/Getter/DefaultBrickGetter.php +++ b/bundles/EcommerceFrameworkBundle/IndexService/Getter/DefaultBrickGetter.php @@ -22,6 +22,11 @@ class DefaultBrickGetter implements GetterInterface { use OptionsResolverTrait; + /** + * @param object $object + * @param array $config + * @return mixed + */ public function get($object, $config = null) { $config = $this->resolveOptions($config ?? []); diff --git a/bundles/EcommerceFrameworkBundle/IndexService/Getter/DefaultBrickGetterSequence.php b/bundles/EcommerceFrameworkBundle/IndexService/Getter/DefaultBrickGetterSequence.php index 06b227465c7..75963e05443 100644 --- a/bundles/EcommerceFrameworkBundle/IndexService/Getter/DefaultBrickGetterSequence.php +++ b/bundles/EcommerceFrameworkBundle/IndexService/Getter/DefaultBrickGetterSequence.php @@ -22,6 +22,11 @@ class DefaultBrickGetterSequence implements GetterInterface { use OptionsResolverTrait; + /** + * @param object $object + * @param array $config + * @return mixed + */ public function get($object, $config = null) { $config = $this->resolveOptions($config ?? []); diff --git a/bundles/EcommerceFrameworkBundle/IndexService/Getter/DefaultBrickGetterSequenceToMultiselect.php b/bundles/EcommerceFrameworkBundle/IndexService/Getter/DefaultBrickGetterSequenceToMultiselect.php index d63997ae203..77329d202ee 100644 --- a/bundles/EcommerceFrameworkBundle/IndexService/Getter/DefaultBrickGetterSequenceToMultiselect.php +++ b/bundles/EcommerceFrameworkBundle/IndexService/Getter/DefaultBrickGetterSequenceToMultiselect.php @@ -22,6 +22,11 @@ class DefaultBrickGetterSequenceToMultiselect implements GetterInterface { use OptionsResolverTrait; + /** + * @param object $object + * @param array $config + * @return mixed + */ public function get($object, $config = null) { $config = $this->resolveOptions($config ?? []); diff --git a/bundles/EcommerceFrameworkBundle/IndexService/Getter/DefaultClassificationAttributeGetter.php b/bundles/EcommerceFrameworkBundle/IndexService/Getter/DefaultClassificationAttributeGetter.php index 8d9a51d834d..880030fdaf8 100644 --- a/bundles/EcommerceFrameworkBundle/IndexService/Getter/DefaultClassificationAttributeGetter.php +++ b/bundles/EcommerceFrameworkBundle/IndexService/Getter/DefaultClassificationAttributeGetter.php @@ -31,7 +31,7 @@ class DefaultClassificationAttributeGetter implements GetterInterface * note that this getter does not support localization at the moment * * @param object $object - * @param array|null $config + * @param array $config * * @return mixed */ diff --git a/bundles/EcommerceFrameworkBundle/IndexService/Getter/ExtendedGetterInterface.php b/bundles/EcommerceFrameworkBundle/IndexService/Getter/ExtendedGetterInterface.php index 8f051fd2385..6cff2cd47ac 100644 --- a/bundles/EcommerceFrameworkBundle/IndexService/Getter/ExtendedGetterInterface.php +++ b/bundles/EcommerceFrameworkBundle/IndexService/Getter/ExtendedGetterInterface.php @@ -22,5 +22,12 @@ */ interface ExtendedGetterInterface extends GetterInterface { + /** + * @param object $object + * @param array $config + * @param int|null $subObjectId + * @param ConfigInterface|null $tenantConfig + * @return mixed + */ public function get($object, $config = null, $subObjectId = null, ConfigInterface $tenantConfig = null); } diff --git a/bundles/EcommerceFrameworkBundle/IndexService/Getter/GetterInterface.php b/bundles/EcommerceFrameworkBundle/IndexService/Getter/GetterInterface.php index d05d39f8ba9..a03fb937214 100644 --- a/bundles/EcommerceFrameworkBundle/IndexService/Getter/GetterInterface.php +++ b/bundles/EcommerceFrameworkBundle/IndexService/Getter/GetterInterface.php @@ -17,5 +17,10 @@ interface GetterInterface { + /** + * @param object $object + * @param array $config + * @return mixed + */ public function get($object, $config = null); } diff --git a/bundles/EcommerceFrameworkBundle/IndexService/Getter/TagsGetter.php b/bundles/EcommerceFrameworkBundle/IndexService/Getter/TagsGetter.php index 5e3c27e882b..c021e16d8a1 100644 --- a/bundles/EcommerceFrameworkBundle/IndexService/Getter/TagsGetter.php +++ b/bundles/EcommerceFrameworkBundle/IndexService/Getter/TagsGetter.php @@ -25,6 +25,11 @@ class TagsGetter implements GetterInterface { use OptionsResolverTrait; + /** + * @param object $element + * @param array $config + * @return mixed + */ public function get($element, $config = null) { $config = $this->resolveOptions($config ?? []); diff --git a/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/AssetId.php b/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/AssetId.php index 59da87e7599..470dadb2d7c 100644 --- a/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/AssetId.php +++ b/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/AssetId.php @@ -19,6 +19,11 @@ class AssetId implements InterpreterInterface { + /** + * @param mixed $value + * @param array|null $config + * @return int|null + */ public function interpret($value, $config = null) { if (!empty($value) && $value instanceof Asset) { diff --git a/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/DefaultObjects.php b/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/DefaultObjects.php index 75299fc8321..0af156d24de 100644 --- a/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/DefaultObjects.php +++ b/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/DefaultObjects.php @@ -19,6 +19,11 @@ class DefaultObjects implements RelationInterpreterInterface { + /** + * @param mixed $value + * @param array|null $config + * @return array + */ public function interpret($value, $config = null) { $result = []; diff --git a/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/DefaultRelations.php b/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/DefaultRelations.php index 77a01bdeff1..e48f7ebf040 100644 --- a/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/DefaultRelations.php +++ b/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/DefaultRelations.php @@ -21,6 +21,11 @@ class DefaultRelations implements RelationInterpreterInterface { + /** + * @param mixed $value + * @param array|null $config + * @return array + */ public function interpret($value, $config = null) { $result = []; diff --git a/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/DefaultStructuredTable.php b/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/DefaultStructuredTable.php index 3e106bd8ed7..3e7871c155a 100644 --- a/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/DefaultStructuredTable.php +++ b/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/DefaultStructuredTable.php @@ -23,6 +23,11 @@ class DefaultStructuredTable implements InterpreterInterface { use OptionsResolverTrait; + /** + * @param mixed $value + * @param array|null $config + * @return mixed + */ public function interpret($value, $config = null) { $config = $this->resolveOptions($config ?? []); diff --git a/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/IdList.php b/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/IdList.php index fff26b8c166..b637d801e34 100644 --- a/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/IdList.php +++ b/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/IdList.php @@ -23,6 +23,11 @@ class IdList implements InterpreterInterface { use OptionsResolverTrait; + /** + * @param mixed $value + * @param array|null $config + * @return string|null + */ public function interpret($value, $config = null) { $config = $this->resolveOptions($config ?? []); diff --git a/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/InterpreterInterface.php b/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/InterpreterInterface.php index 0b07af5e656..0a5693c8b21 100644 --- a/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/InterpreterInterface.php +++ b/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/InterpreterInterface.php @@ -17,5 +17,10 @@ interface InterpreterInterface { + /** + * @param mixed $value + * @param array|null $config + * @return mixed + */ public function interpret($value, $config = null); } diff --git a/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/Numeric.php b/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/Numeric.php index c48dfb1eeff..ac845784d10 100644 --- a/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/Numeric.php +++ b/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/Numeric.php @@ -17,6 +17,11 @@ class Numeric implements InterpreterInterface { + /** + * @param mixed $value + * @param array|null $config + * @return float + */ public function interpret($value, $config = null) { return (float)$value; diff --git a/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/ObjectId.php b/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/ObjectId.php index c5c094ed161..ca0088d49ef 100644 --- a/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/ObjectId.php +++ b/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/ObjectId.php @@ -19,6 +19,11 @@ class ObjectId implements InterpreterInterface { + /** + * @param mixed $value + * @param array|null $config + * @return int|null + */ public function interpret($value, $config = null) { if (!empty($value) && $value instanceof AbstractObject) { diff --git a/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/ObjectIdSum.php b/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/ObjectIdSum.php index b151a250a32..064410f4f18 100644 --- a/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/ObjectIdSum.php +++ b/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/ObjectIdSum.php @@ -19,6 +19,11 @@ class ObjectIdSum implements InterpreterInterface { + /** + * @param mixed $value + * @param array|null $config + * @return int|null + */ public function interpret($value, $config = null) { $sum = 0; diff --git a/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/Soundex.php b/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/Soundex.php index 89b538033f5..93cfd3c7cd5 100644 --- a/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/Soundex.php +++ b/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/Soundex.php @@ -17,6 +17,11 @@ class Soundex implements InterpreterInterface { + /** + * @param mixed $value + * @param array|null $config + * @return int + */ public function interpret($value, $config = null) { if (is_array($value)) { diff --git a/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/StructuredTable.php b/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/StructuredTable.php index dfbf3d53c32..1d6b1b68b3f 100644 --- a/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/StructuredTable.php +++ b/bundles/EcommerceFrameworkBundle/IndexService/Interpreter/StructuredTable.php @@ -22,6 +22,11 @@ class StructuredTable implements InterpreterInterface { use OptionsResolverTrait; + /** + * @param mixed $value + * @param array|null $config + * @return string|null + */ public function interpret($value, $config = null) { $config = $this->resolveOptions($config ?? []); diff --git a/bundles/EcommerceFrameworkBundle/IndexService/ProductList/DefaultMysql.php b/bundles/EcommerceFrameworkBundle/IndexService/ProductList/DefaultMysql.php index 5e54fa433ed..7df72408704 100644 --- a/bundles/EcommerceFrameworkBundle/IndexService/ProductList/DefaultMysql.php +++ b/bundles/EcommerceFrameworkBundle/IndexService/ProductList/DefaultMysql.php @@ -553,6 +553,12 @@ public function getGroupByRelationValues($fieldname, $countValues = false, $fiel } } + /** + * @param bool $excludeConditions + * @param string|null $excludedFieldname + * @param string|null $variantMode + * @return string + */ protected function buildQueryFromConditions($excludeConditions = false, $excludedFieldname = null, $variantMode = null) { if ($variantMode == null) { @@ -626,6 +632,10 @@ protected function buildQueryFromConditions($excludeConditions = false, $exclude return $condition; } + /** + * @param string|null $excludedFieldname + * @return string + */ protected function buildUserspecificConditions($excludedFieldname = null) { $condition = ''; @@ -708,6 +718,10 @@ protected function buildOrderBy() return null; } + /** + * @param mixed $value + * @return mixed + */ public function quote($value) { return $this->resource->quote($value); diff --git a/bundles/EcommerceFrameworkBundle/IndexService/ProductList/DefaultMysql/Dao.php b/bundles/EcommerceFrameworkBundle/IndexService/ProductList/DefaultMysql/Dao.php index 4e1f1b65694..8c21fb28795 100644 --- a/bundles/EcommerceFrameworkBundle/IndexService/ProductList/DefaultMysql/Dao.php +++ b/bundles/EcommerceFrameworkBundle/IndexService/ProductList/DefaultMysql/Dao.php @@ -54,7 +54,15 @@ public function __construct(DefaultMysql $model, Logger $logger) $this->logger = $logger; } - public function load($condition, $orderBy = null, $limit = null, $offset = null) + /** + * @param string $condition + * @param string|null $orderBy + * @param int|null $limit + * @param int $offset + * @return array + * @throws \Doctrine\DBAL\Exception + */ + public function load($condition, $orderBy = null, $limit = null, $offset = 0) { if ($condition) { $condition = 'WHERE ' . $condition; @@ -98,6 +106,12 @@ public function load($condition, $orderBy = null, $limit = null, $offset = null) return $result; } + /** + * @param string $fieldname + * @param string $condition + * @param bool $countValues + * @return array + */ public function loadGroupByValues($fieldname, $condition, $countValues = false) { if ($condition) { @@ -136,6 +150,12 @@ public function loadGroupByValues($fieldname, $condition, $countValues = false) } } + /** + * @param string $fieldname + * @param string $condition + * @param bool $countValues + * @return array + */ public function loadGroupByRelationValues($fieldname, $condition, $countValues = false) { if ($condition) { @@ -184,7 +204,14 @@ public function loadGroupByRelationValues($fieldname, $condition, $countValues = } } - public function getCount($condition, $orderBy = null, $limit = null, $offset = null) + /** + * @param string $condition + * @param string|null $orderBy + * @param int|null $limit + * @param int $offset + * @return int + */ + public function getCount($condition, $orderBy = null, $limit = null, $offset = 0) { if ($condition) { $condition = 'WHERE ' . $condition; @@ -221,6 +248,10 @@ public function getCount($condition, $orderBy = null, $limit = null, $offset = n return $result; } + /** + * @param mixed $value + * @return mixed + */ public function quote($value) { return $this->db->quote($value); diff --git a/bundles/EcommerceFrameworkBundle/IndexService/Worker/Helper/MySql.php b/bundles/EcommerceFrameworkBundle/IndexService/Worker/Helper/MySql.php index 9fd263e997e..7a6d6f35403 100644 --- a/bundles/EcommerceFrameworkBundle/IndexService/Worker/Helper/MySql.php +++ b/bundles/EcommerceFrameworkBundle/IndexService/Worker/Helper/MySql.php @@ -62,6 +62,10 @@ public function getValidTableColumns($table) return Cache\RuntimeCache::load($cacheKey); } + /** + * @param array $data + * @return void + */ public function doInsertData($data) { $validColumns = $this->getValidTableColumns($this->tenantConfig->getTablename()); @@ -176,12 +180,20 @@ public function createOrUpdateIndexStructures() } } + /** + * @param string $sql + * @return void + */ protected function dbexec($sql) { $this->logSql($sql); $this->db->executeQuery($sql); } + /** + * @param string $sql + * @return void + */ protected function logSql($sql) { Logger::info($sql); diff --git a/bundles/EcommerceFrameworkBundle/IndexService/Worker/ProductCentricBatchProcessingWorker.php b/bundles/EcommerceFrameworkBundle/IndexService/Worker/ProductCentricBatchProcessingWorker.php index 02fd46c0ad5..a075cc3b510 100644 --- a/bundles/EcommerceFrameworkBundle/IndexService/Worker/ProductCentricBatchProcessingWorker.php +++ b/bundles/EcommerceFrameworkBundle/IndexService/Worker/ProductCentricBatchProcessingWorker.php @@ -53,6 +53,10 @@ public function getBatchProcessingStoreTableName(): string */ abstract protected function doUpdateIndex($objectId, $data = null, $metadata = null); + + /** + * @param int $objectId + */ public function updateItemInIndex($objectId): void { $this->doUpdateIndex($objectId); diff --git a/bundles/EcommerceFrameworkBundle/Model/AbstractProduct.php b/bundles/EcommerceFrameworkBundle/Model/AbstractProduct.php index 022c1edb9e6..3292cfd77e6 100644 --- a/bundles/EcommerceFrameworkBundle/Model/AbstractProduct.php +++ b/bundles/EcommerceFrameworkBundle/Model/AbstractProduct.php @@ -155,6 +155,7 @@ public function getAvailabilitySystemName(): ?string * default implementation checks if there is a price available and of the product is active. * may be overwritten in subclasses for additional logic * + * @param int $quantityScale * @return bool */ public function getOSIsBookable($quantityScale = 1): bool diff --git a/bundles/EcommerceFrameworkBundle/Model/AbstractSetProductEntry.php b/bundles/EcommerceFrameworkBundle/Model/AbstractSetProductEntry.php index 189e2d3395b..55bb4c7988e 100644 --- a/bundles/EcommerceFrameworkBundle/Model/AbstractSetProductEntry.php +++ b/bundles/EcommerceFrameworkBundle/Model/AbstractSetProductEntry.php @@ -30,6 +30,10 @@ class AbstractSetProductEntry */ private $product; + /** + * @param CheckoutableInterface $product + * @param int $quantity + */ public function __construct(CheckoutableInterface $product, $quantity = 1) { $this->product = $product; diff --git a/bundles/EcommerceFrameworkBundle/Model/CheckoutableInterface.php b/bundles/EcommerceFrameworkBundle/Model/CheckoutableInterface.php index c5964017fa5..e75d8beb17c 100644 --- a/bundles/EcommerceFrameworkBundle/Model/CheckoutableInterface.php +++ b/bundles/EcommerceFrameworkBundle/Model/CheckoutableInterface.php @@ -47,6 +47,7 @@ public function getAvailabilitySystemName(): ?string; /** * checks if product is bookable * + * @param int $quantityScale * @return bool */ public function getOSIsBookable($quantityScale = 1): bool; diff --git a/bundles/EcommerceFrameworkBundle/Model/DefaultMockup.php b/bundles/EcommerceFrameworkBundle/Model/DefaultMockup.php index 61e28ef4653..0a22d77d026 100644 --- a/bundles/EcommerceFrameworkBundle/Model/DefaultMockup.php +++ b/bundles/EcommerceFrameworkBundle/Model/DefaultMockup.php @@ -36,6 +36,11 @@ class DefaultMockup implements ProductInterface, LinkGeneratorAwareInterface */ protected static array $linkGenerators = []; + /** + * @param int $id + * @param array $params + * @param array $relations + */ public function __construct($id, $params, $relations) { $this->id = $id; @@ -116,6 +121,10 @@ public function getId() return $this->id; } + /** + * @param string $attributeName + * @return mixed + */ public function getRelationAttribute($attributeName) { $relationObjectArray = []; @@ -137,6 +146,11 @@ public function getRelationAttribute($attributeName) } } + /** + * @param string $method + * @param array $args + * @return mixed + */ public function __call($method, $args) { $attributeName = $method; diff --git a/bundles/EcommerceFrameworkBundle/Model/MockProduct.php b/bundles/EcommerceFrameworkBundle/Model/MockProduct.php index 15aaac2f852..dc8317d6800 100644 --- a/bundles/EcommerceFrameworkBundle/Model/MockProduct.php +++ b/bundles/EcommerceFrameworkBundle/Model/MockProduct.php @@ -33,6 +33,9 @@ public function getAvailabilitySystemName(): ?string return 'default'; } + /** + * @param int $quantityScale + */ public function getOSIsBookable($quantityScale = 1): bool { return false; diff --git a/bundles/EcommerceFrameworkBundle/OfferTool/AbstractOfferToolProduct.php b/bundles/EcommerceFrameworkBundle/OfferTool/AbstractOfferToolProduct.php index 4136e922d4a..2c641430f82 100644 --- a/bundles/EcommerceFrameworkBundle/OfferTool/AbstractOfferToolProduct.php +++ b/bundles/EcommerceFrameworkBundle/OfferTool/AbstractOfferToolProduct.php @@ -64,6 +64,7 @@ public function getAvailabilitySystemName(): string * checks if product is bookable * returns always true in default implementation * + * @param int $quantityScale * @return bool */ public function getOSIsBookable($quantityScale = 1): bool diff --git a/bundles/EcommerceFrameworkBundle/OfferTool/DefaultService.php b/bundles/EcommerceFrameworkBundle/OfferTool/DefaultService.php index 95868f24b46..37fbc9e41a7 100644 --- a/bundles/EcommerceFrameworkBundle/OfferTool/DefaultService.php +++ b/bundles/EcommerceFrameworkBundle/OfferTool/DefaultService.php @@ -20,6 +20,7 @@ use Pimcore\Bundle\EcommerceFrameworkBundle\CartManager\CartItemInterface; use Pimcore\Bundle\EcommerceFrameworkBundle\Factory; use Pimcore\Bundle\EcommerceFrameworkBundle\Model\CheckoutableInterface; +use Pimcore\Bundle\EcommerceFrameworkBundle\Model\ProductInterface; use Pimcore\Bundle\EcommerceFrameworkBundle\Type\Decimal; use Pimcore\Model\DataObject\AbstractObject; use Pimcore\Model\DataObject\Folder; @@ -115,6 +116,10 @@ public function createNewOfferFromCart(CartInterface $cart, array $excludeItems return $offer; } + /** + * @param array $excludeItems + * @return array + */ protected function getExcludedItemKeys($excludeItems) { $excludedItemKeys = []; @@ -271,6 +276,13 @@ protected function setCurrentCustomer(AbstractOffer $offer) return $offer; } + /** + * @param AbstractOffer $offer + * @param CartInterface $cart + * @param array $excludeItems + * @param bool $save + * @return AbstractOffer + */ public function updateOfferFromCart(AbstractOffer $offer, CartInterface $cart, array $excludeItems = [], $save = true) { $excludedItemKeys = $this->getExcludedItemKeys($excludeItems); @@ -350,6 +362,11 @@ public function getOffersForCart(CartInterface $cart) return $list->load(); } + /** + * @param ProductInterface $product + * @param AbstractOffer $offer + * @return void + */ public function createCustomOfferToolItem($product, $offer) { } diff --git a/bundles/EcommerceFrameworkBundle/OrderManager/V7/OrderManager.php b/bundles/EcommerceFrameworkBundle/OrderManager/V7/OrderManager.php index 5a694602a61..2c80ecd159d 100644 --- a/bundles/EcommerceFrameworkBundle/OrderManager/V7/OrderManager.php +++ b/bundles/EcommerceFrameworkBundle/OrderManager/V7/OrderManager.php @@ -538,6 +538,11 @@ protected function buildOrderItemKey(CartItemInterface $item, bool $isGiftItem = return $event->getArgument('itemKey'); } + /** + * @param string $className + * @param array $params + * @return mixed + */ protected function buildModelClass($className, array $params = []) { if (null === $this->modelFactory) { diff --git a/bundles/EcommerceFrameworkBundle/PaymentManager/Payment/AbstractPayment.php b/bundles/EcommerceFrameworkBundle/PaymentManager/Payment/AbstractPayment.php index 8e5fd6db541..4731e4640f9 100644 --- a/bundles/EcommerceFrameworkBundle/PaymentManager/Payment/AbstractPayment.php +++ b/bundles/EcommerceFrameworkBundle/PaymentManager/Payment/AbstractPayment.php @@ -64,11 +64,21 @@ public function isRecurringPaymentEnabled() return $this->recurringPaymentEnabled; } + /** + * @param AbstractOrder $sourceOrder + * @param object $paymentBrick + * @return void + */ public function setRecurringPaymentSourceOrderData(AbstractOrder $sourceOrder, $paymentBrick) { throw new \RuntimeException('getRecurringPaymentDataProperties not implemented for ' . get_class($this)); } + /** + * @param Concrete $orderListing + * @param array $additionalParameters + * @return void + */ public function applyRecurringPaymentCondition(Concrete $orderListing, $additionalParameters = []) { throw new \RuntimeException('getRecurringPaymentDataProperties not implemented for ' . get_class($this)); diff --git a/bundles/EcommerceFrameworkBundle/PaymentManager/V7/Payment/RecurringPaymentInterface.php b/bundles/EcommerceFrameworkBundle/PaymentManager/V7/Payment/RecurringPaymentInterface.php index 7eb60218bfd..26c437db062 100644 --- a/bundles/EcommerceFrameworkBundle/PaymentManager/V7/Payment/RecurringPaymentInterface.php +++ b/bundles/EcommerceFrameworkBundle/PaymentManager/V7/Payment/RecurringPaymentInterface.php @@ -37,8 +37,9 @@ public function setRecurringPaymentSourceOrderData(AbstractOrder $sourceOrder, $ /** * @param Concrete $orderListing + * @param array $additionalParameters * - * @return Concrete + * @return void */ public function applyRecurringPaymentCondition(Concrete $orderListing, $additionalParameters = []); } diff --git a/bundles/EcommerceFrameworkBundle/PaymentManager/V7/Payment/StartPaymentRequest/AbstractRequest.php b/bundles/EcommerceFrameworkBundle/PaymentManager/V7/Payment/StartPaymentRequest/AbstractRequest.php index 558a4f8ca5b..cdde519acbb 100644 --- a/bundles/EcommerceFrameworkBundle/PaymentManager/V7/Payment/StartPaymentRequest/AbstractRequest.php +++ b/bundles/EcommerceFrameworkBundle/PaymentManager/V7/Payment/StartPaymentRequest/AbstractRequest.php @@ -17,6 +17,9 @@ class AbstractRequest implements \ArrayAccess { + /** + * @param array $data + */ public function __construct($data = []) { foreach ($data as $key => $value) { diff --git a/bundles/EcommerceFrameworkBundle/PriceSystem/AbstractPriceInfo.php b/bundles/EcommerceFrameworkBundle/PriceSystem/AbstractPriceInfo.php index c6826e615cf..2886a4dacdd 100644 --- a/bundles/EcommerceFrameworkBundle/PriceSystem/AbstractPriceInfo.php +++ b/bundles/EcommerceFrameworkBundle/PriceSystem/AbstractPriceInfo.php @@ -43,7 +43,7 @@ class AbstractPriceInfo implements PriceInfoInterface protected $products; /** - * @return AbstractPriceInfo + * @return static */ public static function getInstance() { @@ -126,6 +126,10 @@ public function getProduct() return $this->product; } + /** + * @param array $products + * @return void + */ public function setProducts($products) { $this->products = $products; diff --git a/bundles/EcommerceFrameworkBundle/PriceSystem/AttributePriceInfo.php b/bundles/EcommerceFrameworkBundle/PriceSystem/AttributePriceInfo.php index bc1572448dc..c41d34833c3 100644 --- a/bundles/EcommerceFrameworkBundle/PriceSystem/AttributePriceInfo.php +++ b/bundles/EcommerceFrameworkBundle/PriceSystem/AttributePriceInfo.php @@ -32,6 +32,11 @@ class AttributePriceInfo extends AbstractPriceInfo implements PriceInfoInterface */ protected $totalPrice; + /** + * @param PriceInterface $price + * @param int $quantity + * @param PriceInterface $totalPrice + */ public function __construct(PriceInterface $price, $quantity, PriceInterface $totalPrice) { $this->price = $price; diff --git a/bundles/EcommerceFrameworkBundle/PriceSystem/LazyLoadingPriceInfo.php b/bundles/EcommerceFrameworkBundle/PriceSystem/LazyLoadingPriceInfo.php index ea357a838fc..41acf84189e 100644 --- a/bundles/EcommerceFrameworkBundle/PriceSystem/LazyLoadingPriceInfo.php +++ b/bundles/EcommerceFrameworkBundle/PriceSystem/LazyLoadingPriceInfo.php @@ -27,11 +27,19 @@ class LazyLoadingPriceInfo extends AbstractPriceInfo implements PriceInfoInterfa */ protected $priceRegistry = []; + /** + * @return static + */ public static function getInstance() { return parent::getInstance(); } + /** + * @param string $name + * @param array $arg + * @return mixed + */ public function __call($name, $arg) { if (array_key_exists($name, $this->priceRegistry)) { diff --git a/bundles/EcommerceFrameworkBundle/PricingManager/Condition/VoucherToken.php b/bundles/EcommerceFrameworkBundle/PricingManager/Condition/VoucherToken.php index 088857aa460..b68d1bdc1da 100644 --- a/bundles/EcommerceFrameworkBundle/PricingManager/Condition/VoucherToken.php +++ b/bundles/EcommerceFrameworkBundle/PricingManager/Condition/VoucherToken.php @@ -61,6 +61,10 @@ public function check(EnvironmentInterface $environment) return false; } + /** + * @param string $code + * @return bool + */ public function checkVoucherCode($code) { if (in_array(VoucherServiceToken::getByCode($code)->getVoucherSeriesId(), $this->whiteListIds)) { diff --git a/bundles/EcommerceFrameworkBundle/Tools/PaymentProviderInstaller.php b/bundles/EcommerceFrameworkBundle/Tools/PaymentProviderInstaller.php index 32a897b3a9e..bd45fd6358e 100644 --- a/bundles/EcommerceFrameworkBundle/Tools/PaymentProviderInstaller.php +++ b/bundles/EcommerceFrameworkBundle/Tools/PaymentProviderInstaller.php @@ -106,6 +106,11 @@ protected function unInstallBricks() } } + /** + * @param string $brickKey + * @param string $filepath + * @return void + */ protected static function installBrick($brickKey, $filepath) { try { diff --git a/bundles/EcommerceFrameworkBundle/VoucherService/DefaultService.php b/bundles/EcommerceFrameworkBundle/VoucherService/DefaultService.php index 69710518de1..c02d73e8036 100644 --- a/bundles/EcommerceFrameworkBundle/VoucherService/DefaultService.php +++ b/bundles/EcommerceFrameworkBundle/VoucherService/DefaultService.php @@ -281,7 +281,7 @@ public function getPricingManagerTokenInformationDetails(CartInterface $cart, st } /** - * @param string|null $seriesId + * @param int $seriesId * * @return bool */ @@ -305,7 +305,7 @@ public function cleanUpVoucherSeries(\Pimcore\Model\DataObject\OnlineShopVoucher } /** - * @param null|string $seriesId + * @param int $seriesId * * @return bool */ diff --git a/bundles/EcommerceFrameworkBundle/VoucherService/Reservation.php b/bundles/EcommerceFrameworkBundle/VoucherService/Reservation.php index 517cfaade26..4a09bcfd797 100644 --- a/bundles/EcommerceFrameworkBundle/VoucherService/Reservation.php +++ b/bundles/EcommerceFrameworkBundle/VoucherService/Reservation.php @@ -156,7 +156,7 @@ public function remove(): bool /** * @param int $duration in Minutes - * @param string|null $seriesId + * @param int $seriesId * * @return bool */ diff --git a/bundles/EcommerceFrameworkBundle/VoucherService/Statistic.php b/bundles/EcommerceFrameworkBundle/VoucherService/Statistic.php index b80721c985c..f70601f2cce 100644 --- a/bundles/EcommerceFrameworkBundle/VoucherService/Statistic.php +++ b/bundles/EcommerceFrameworkBundle/VoucherService/Statistic.php @@ -108,7 +108,7 @@ public static function increaseUsageStatistic($seriesId) /** * @param int $duration days - * @param string|null $seriesId + * @param int $seriesId * * @return bool */ diff --git a/bundles/EcommerceFrameworkBundle/VoucherService/Token.php b/bundles/EcommerceFrameworkBundle/VoucherService/Token.php index eb690c9d1ac..f263d1bdcf8 100644 --- a/bundles/EcommerceFrameworkBundle/VoucherService/Token.php +++ b/bundles/EcommerceFrameworkBundle/VoucherService/Token.php @@ -15,6 +15,7 @@ namespace Pimcore\Bundle\EcommerceFrameworkBundle\VoucherService; +use Pimcore\Bundle\EcommerceFrameworkBundle\CartManager\CartInterface; use Pimcore\Bundle\EcommerceFrameworkBundle\VoucherService\Token\Dao; use Pimcore\Db; use Pimcore\Model\AbstractModel; @@ -92,6 +93,11 @@ public function isUsed($maxUsages = 1) return false; } + /** + * @param string $code + * @param int $maxUsages + * @return bool + */ public static function isUsedToken($code, $maxUsages = 1) { $db = Db::get(); @@ -145,6 +151,10 @@ public static function tokenExists($code) return true; } + /** + * @param CartInterface $cart + * @return bool + */ public function release($cart) { return Reservation::releaseToken($this->getToken(), $cart); @@ -274,6 +284,10 @@ public function getId() return $this->id; } + /** + * @param int $id + * @return void + */ public function setId($id) { $this->id = $id; diff --git a/bundles/EcommerceFrameworkBundle/VoucherService/Token/Listing.php b/bundles/EcommerceFrameworkBundle/VoucherService/Token/Listing.php index 0ee7b2f619c..d4e69df0e6a 100644 --- a/bundles/EcommerceFrameworkBundle/VoucherService/Token/Listing.php +++ b/bundles/EcommerceFrameworkBundle/VoucherService/Token/Listing.php @@ -89,6 +89,10 @@ public function setFilterConditions($seriesId, $filter = []) } } + /** + * @param int $seriesId + * @return bool|Listing + */ public static function getBySeriesId($seriesId) { try { @@ -111,6 +115,11 @@ public function getTokenList() return $this->getData(); } + /** + * @param int $seriesId + * @param array|null $params + * @return bool|array + */ public static function getCodes($seriesId, $params) { $db = \Pimcore\Db::get(); @@ -166,6 +175,11 @@ public static function getCodes($seriesId, $params) return $codes; } + /** + * @param int $usages + * @param int|null $seriesId + * @return int|false + */ public static function getCountByUsages($usages = 1, $seriesId = null) { $query = 'SELECT COUNT(*) as count FROM ' . \Pimcore\Bundle\EcommerceFrameworkBundle\VoucherService\Token\Dao::TABLE_NAME . ' WHERE usages >= ? '; @@ -184,6 +198,10 @@ public static function getCountByUsages($usages = 1, $seriesId = null) } } + /** + * @param int $seriesId + * @return int|false + */ public static function getCountBySeriesId($seriesId) { $query = 'SELECT COUNT(*) as count FROM ' . \Pimcore\Bundle\EcommerceFrameworkBundle\VoucherService\Token\Dao::TABLE_NAME . ' WHERE voucherSeriesId = ?'; @@ -198,6 +216,10 @@ public static function getCountBySeriesId($seriesId) } } + /** + * @param int $seriesId + * @return int|false + */ public static function getCountByReservation($seriesId = null) { $query = 'SELECT COUNT(t.id) FROM ' . \Pimcore\Bundle\EcommerceFrameworkBundle\VoucherService\Token\Dao::TABLE_NAME . ' as t @@ -220,7 +242,7 @@ public static function getCountByReservation($seriesId = null) /** * @param int $length - * @param string|int|null $seriesId + * @param int $seriesId * * @return null|int */ @@ -248,7 +270,7 @@ public static function getCountByLength($length, $seriesId = null) * Use with care, cleans all tokens of a series and the dependent * reservations. * - * @param string $seriesId + * @param int $seriesId * * @return bool */ @@ -258,7 +280,7 @@ public static function cleanUpAllTokens($seriesId) } /** - * @param string $seriesId + * @param int $seriesId * @param array $filter * @param int $maxUsages * diff --git a/bundles/EcommerceFrameworkBundle/VoucherService/TokenManager/Pattern.php b/bundles/EcommerceFrameworkBundle/VoucherService/TokenManager/Pattern.php index 198fb1bc1b2..2f741e338f2 100644 --- a/bundles/EcommerceFrameworkBundle/VoucherService/TokenManager/Pattern.php +++ b/bundles/EcommerceFrameworkBundle/VoucherService/TokenManager/Pattern.php @@ -661,6 +661,9 @@ public function getCharacterPools() return $this->characterPools; } + /** + * @return string + */ public function getCharacterPool() { return $this->characterPools[$this->configuration->getCharacterType()]; @@ -693,7 +696,7 @@ public function setTemplate($template) } /** - * @param string|int|null $seriesId + * @param int|null $seriesId */ public function setSeriesId($seriesId) { @@ -701,7 +704,7 @@ public function setSeriesId($seriesId) } /** - * @return string|int|null + * @return int|null */ public function getSeriesId() { diff --git a/bundles/EcommerceFrameworkBundle/VoucherService/TokenManager/Single.php b/bundles/EcommerceFrameworkBundle/VoucherService/TokenManager/Single.php index 67093ca17b3..e761b23ecc6 100644 --- a/bundles/EcommerceFrameworkBundle/VoucherService/TokenManager/Single.php +++ b/bundles/EcommerceFrameworkBundle/VoucherService/TokenManager/Single.php @@ -61,6 +61,11 @@ public function cleanUpCodes($filter = []) return true; } + /** + * @param int $duration + * @param int|null $seriesId + * @return bool + */ public function cleanupReservations($duration = 0, $seriesId = null) { return Reservation::cleanUpReservations($duration, $seriesId); @@ -170,6 +175,11 @@ public function getCodes($params = null) return Token\Listing::getCodes($this->seriesId, $params); } + /** + * @param array $data + * @param int|null $usagePeriod + * @return void + */ protected function prepareUsageStatisticData(&$data, $usagePeriod) { $now = new \DateTime(); diff --git a/bundles/EcommerceFrameworkBundle/VoucherService/VoucherServiceInterface.php b/bundles/EcommerceFrameworkBundle/VoucherService/VoucherServiceInterface.php index 563f3726a09..fba347af490 100644 --- a/bundles/EcommerceFrameworkBundle/VoucherService/VoucherServiceInterface.php +++ b/bundles/EcommerceFrameworkBundle/VoucherService/VoucherServiceInterface.php @@ -91,7 +91,7 @@ public function getPricingManagerTokenInformationDetails(CartInterface $cart, st * Cleans the token reservations due to sysConfig duration settings, if no series Id is * set all reservations older than the set duration get removed. * - * @param null|string $seriesId + * @param int $seriesId * * @return bool */ @@ -110,7 +110,7 @@ public function cleanUpVoucherSeries(\Pimcore\Model\DataObject\OnlineShopVoucher /** * Removes all statistics, optionally a seriesId can be passed, to only remove from one series. * - * @param null|string $seriesId + * @param int $seriesId * * @return bool */ diff --git a/lib/Db/Helper.php b/lib/Db/Helper.php index 4976dc3b197..266571000be 100644 --- a/lib/Db/Helper.php +++ b/lib/Db/Helper.php @@ -16,10 +16,17 @@ namespace Pimcore\Db; use Doctrine\DBAL\Driver\Result; +use Doctrine\DBAL\Types\Type; use Pimcore\Model\Element\ValidationException; class Helper { + /** + * @param ConnectionInterface|\Doctrine\DBAL\Connection $connection + * @param string $table + * @param array $data + * @return int|string + */ public static function insertOrUpdate(ConnectionInterface|\Doctrine\DBAL\Connection $connection, $table, array $data) { // extract and quote col names from the array keys @@ -53,6 +60,13 @@ public static function insertOrUpdate(ConnectionInterface|\Doctrine\DBAL\Connect return $connection->executeStatement($sql, $bind); } + /** + * @param ConnectionInterface|\Doctrine\DBAL\Connection $db + * @param string $sql + * @param array $params + * @param array $types + * @return array + */ public static function fetchPairs(ConnectionInterface|\Doctrine\DBAL\Connection $db, $sql, array $params = [], $types = []) { $stmt = $db->executeQuery($sql, $params, $types); @@ -66,6 +80,13 @@ public static function fetchPairs(ConnectionInterface|\Doctrine\DBAL\Connection return $data; } + /** + * @param ConnectionInterface|\Doctrine\DBAL\Connection $db + * @param string $table + * @param string $idColumn + * @param string $where + * @return void + */ public static function selectAndDeleteWhere(ConnectionInterface|\Doctrine\DBAL\Connection $db, $table, $idColumn = 'id', $where = '') { $sql = 'SELECT ' . $db->quoteIdentifier($idColumn) . ' FROM ' . $table; @@ -85,6 +106,13 @@ public static function selectAndDeleteWhere(ConnectionInterface|\Doctrine\DBAL\C } } + /** + * @param ConnectionInterface|\Doctrine\DBAL\Connection $db + * @param string $sql + * @param array $exclusions + * @return \Doctrine\DBAL\Result|\Doctrine\DBAL\Driver\ResultStatement|null + * @throws ValidationException + */ public static function queryIgnoreError(ConnectionInterface|\Doctrine\DBAL\Connection $db, $sql, $exclusions = []) { try { @@ -101,6 +129,14 @@ public static function queryIgnoreError(ConnectionInterface|\Doctrine\DBAL\Conne return null; } + /** + * @param ConnectionInterface|\Doctrine\DBAL\Connection $db + * @param string $text + * @param mixed $value + * @param int|string|Type|null $type + * @param int|null $count + * @return array|string + */ public static function quoteInto(ConnectionInterface|\Doctrine\DBAL\Connection $db, $text, $value, $type = null, $count = null) { if ($count === null) { diff --git a/lib/Image/Adapter/Imagick.php b/lib/Image/Adapter/Imagick.php index bf48c3aed6f..0c2280f8f42 100644 --- a/lib/Image/Adapter/Imagick.php +++ b/lib/Image/Adapter/Imagick.php @@ -922,7 +922,11 @@ public function sepia() } /** - * {@inheritdoc} + * @param float $radius + * @param float $sigma + * @param float $amount + * @param float $threshold + * @return $this */ public function sharpen($radius = 0, $sigma = 1.0, $amount = 1.0, $threshold = 0.05) { @@ -977,7 +981,8 @@ public function mirror($mode) } /** - * {@inheritdoc} + * @param string $imagePath + * @return bool */ public function isVectorGraphic($imagePath = null) { diff --git a/lib/Localization/IntlFormatter.php b/lib/Localization/IntlFormatter.php index aafc7ed41a6..b0fc522a134 100644 --- a/lib/Localization/IntlFormatter.php +++ b/lib/Localization/IntlFormatter.php @@ -104,6 +104,7 @@ public function setLocale($locale) } /** + * @param string $locale * @return string */ public function getCurrencyFormat($locale) diff --git a/lib/Model/Dao/DaoInterface.php b/lib/Model/Dao/DaoInterface.php index 4d55e87cfe0..573492faf05 100644 --- a/lib/Model/Dao/DaoInterface.php +++ b/lib/Model/Dao/DaoInterface.php @@ -19,6 +19,7 @@ interface DaoInterface { /** * @param \Pimcore\Model\AbstractModel $model + * @return $this */ public function setModel($model); diff --git a/lib/Routing/Element/Router.php b/lib/Routing/Element/Router.php index 271b60e5f1e..0ace9edd1d8 100644 --- a/lib/Routing/Element/Router.php +++ b/lib/Routing/Element/Router.php @@ -73,8 +73,7 @@ public function getContext()// : RequestContext } /** - * {@inheritdoc} - * + * @param string $name * @return bool */ public function supports($name)// : bool @@ -83,8 +82,8 @@ public function supports($name)// : bool } /** - * {@inheritdoc} - * + * @param string $name + * @param array $parameters * @return string */ public function getRouteDebugMessage($name, array $parameters = [])// : string @@ -197,8 +196,7 @@ public function matchRequest(Request $request)// : array } /** - * {@inheritdoc} - * + * @param string $pathinfo * @return array */ public function match($pathinfo)// : array diff --git a/lib/Sitemap/Document/DocumentUrlGenerator.php b/lib/Sitemap/Document/DocumentUrlGenerator.php index 060d68d2ab2..f13c8cad91f 100644 --- a/lib/Sitemap/Document/DocumentUrlGenerator.php +++ b/lib/Sitemap/Document/DocumentUrlGenerator.php @@ -82,6 +82,9 @@ protected function prepareOptions(array $options, Site $site = null): array return $options; } + /** + * @return string + */ protected function hostForSite(Site $site) { $host = $site->getMainDomain(); diff --git a/lib/Sitemap/Element/GeneratorContext.php b/lib/Sitemap/Element/GeneratorContext.php index 34246adf5b1..06bc2a1afa1 100644 --- a/lib/Sitemap/Element/GeneratorContext.php +++ b/lib/Sitemap/Element/GeneratorContext.php @@ -74,6 +74,9 @@ public function get($key, $default = null) return array_key_exists($key, $this->parameters) ? $this->parameters[$key] : $default; } + /** + * @param int|string $key + */ public function has($key): bool { return array_key_exists($key, $this->parameters); diff --git a/lib/Sitemap/Element/GeneratorContextInterface.php b/lib/Sitemap/Element/GeneratorContextInterface.php index d942e51a51e..68fe4230794 100644 --- a/lib/Sitemap/Element/GeneratorContextInterface.php +++ b/lib/Sitemap/Element/GeneratorContextInterface.php @@ -43,5 +43,8 @@ public function keys(): array; */ public function get($key, $default = null); + /** + * @param int|string $key + */ public function has($key): bool; } diff --git a/lib/Targeting/Condition/Language.php b/lib/Targeting/Condition/Language.php index 32e480f56c2..4a11d1817a6 100644 --- a/lib/Targeting/Condition/Language.php +++ b/lib/Targeting/Condition/Language.php @@ -84,6 +84,9 @@ public function match(VisitorInfo $visitorInfo): bool return false; } + /** + * @return string|null + */ protected function loadLanguage(Request $request) { // handle override diff --git a/lib/Targeting/Condition/TargetGroup.php b/lib/Targeting/Condition/TargetGroup.php index 8ee0d753c98..fb3264aab00 100644 --- a/lib/Targeting/Condition/TargetGroup.php +++ b/lib/Targeting/Condition/TargetGroup.php @@ -35,7 +35,7 @@ public function __construct(int $targetGroupId = null) } /** - * {@inheritdoc} + * @return self */ public static function fromConfig(array $config) { diff --git a/lib/Targeting/Model/VisitorInfo.php b/lib/Targeting/Model/VisitorInfo.php index 450879506da..f673deb286b 100644 --- a/lib/Targeting/Model/VisitorInfo.php +++ b/lib/Targeting/Model/VisitorInfo.php @@ -325,6 +325,9 @@ public function getIterator()// : \ArrayIterator return new \ArrayIterator($this->data); } + /** + * @param int|string $key + */ public function has($key): bool { return isset($this->data[$key]); @@ -341,6 +344,11 @@ public function get($key, $default = null) return $this->data[$key] ?? $default; } + /** + * @param int|string $key + * @param mixed $value + * @return void + */ public function set($key, $value) { $this->data[$key] = $value; diff --git a/lib/Workflow/MarkingStore/DataObjectMultipleStateMarkingStore.php b/lib/Workflow/MarkingStore/DataObjectMultipleStateMarkingStore.php index f7ea7c52a62..e60905b040f 100644 --- a/lib/Workflow/MarkingStore/DataObjectMultipleStateMarkingStore.php +++ b/lib/Workflow/MarkingStore/DataObjectMultipleStateMarkingStore.php @@ -45,9 +45,7 @@ public function __construct($property = 'marking', PropertyAccessorInterface $pr } /** - * {@inheritdoc} - * - * @throws LogicException + * @param object $subject */ public function getMarking($subject): Marking { @@ -64,10 +62,10 @@ public function getMarking($subject): Marking } /** - * {@inheritdoc} - * - * @throws LogicException - * @throws \Exception + * @param object $subject + * @param Marking $marking + * @param array $context + * @return void */ public function setMarking($subject, Marking $marking, array $context = []) { diff --git a/lib/Workflow/MarkingStore/DataObjectSplittedStateMarkingStore.php b/lib/Workflow/MarkingStore/DataObjectSplittedStateMarkingStore.php index 3533a57661b..591cc15b6f9 100644 --- a/lib/Workflow/MarkingStore/DataObjectSplittedStateMarkingStore.php +++ b/lib/Workflow/MarkingStore/DataObjectSplittedStateMarkingStore.php @@ -59,11 +59,8 @@ public function __construct(string $workflowName, array $places, array $stateMap } /** - * {@inheritdoc} - * + * @param object $subject * @return Marking - * - * @throws LogicException */ public function getMarking($subject)// : Marking { @@ -93,10 +90,10 @@ public function getMarking($subject)// : Marking } /** - * {@inheritdoc} - * - * @throws LogicException - * @throws \Exception + * @param object $subject + * @param Marking $marking + * @param array $context + * @return void */ public function setMarking($subject, Marking $marking, array $context = []) { diff --git a/lib/Workflow/MarkingStore/StateTableMarkingStore.php b/lib/Workflow/MarkingStore/StateTableMarkingStore.php index c0a28d3c318..4331cc09137 100644 --- a/lib/Workflow/MarkingStore/StateTableMarkingStore.php +++ b/lib/Workflow/MarkingStore/StateTableMarkingStore.php @@ -35,8 +35,7 @@ public function __construct(string $workflowName) } /** - * {@inheritdoc} - * + * @param object $subject * @return Marking */ public function getMarking($subject)// : Marking @@ -63,9 +62,10 @@ public function getMarking($subject)// : Marking } /** - * {@inheritdoc} - * - * @throws \Exception + * @param object $subject + * @param Marking $marking + * @param array $context + * @return void */ public function setMarking($subject, Marking $marking, array $context = []) { diff --git a/lib/Workflow/SupportStrategy/ExpressionSupportStrategy.php b/lib/Workflow/SupportStrategy/ExpressionSupportStrategy.php index 7dfabacadbc..265647d6911 100644 --- a/lib/Workflow/SupportStrategy/ExpressionSupportStrategy.php +++ b/lib/Workflow/SupportStrategy/ExpressionSupportStrategy.php @@ -54,7 +54,8 @@ public function __construct(ExpressionService $expressionService, $className, st } /** - * {@inheritdoc} + * @param WorkflowInterface $workflow + * @param object $subject */ public function supports(WorkflowInterface $workflow, $subject): bool { diff --git a/models/DataObject/ClassDefinition/Data/AdvancedManyToManyObjectRelation.php b/models/DataObject/ClassDefinition/Data/AdvancedManyToManyObjectRelation.php index 8afed6fe3b4..2643fbdb144 100644 --- a/models/DataObject/ClassDefinition/Data/AdvancedManyToManyObjectRelation.php +++ b/models/DataObject/ClassDefinition/Data/AdvancedManyToManyObjectRelation.php @@ -950,7 +950,12 @@ public function normalize($value, $params = []) } /** - * {@inheritdoc} + * @internal + * @param mixed $originalData + * @param mixed $data + * @param Concrete $object + * @param array $params + * @return array */ protected function processDiffDataForEditMode($originalData, $data, $object = null, $params = []) { diff --git a/models/DataObject/ClassDefinition/Data/Block.php b/models/DataObject/ClassDefinition/Data/Block.php index 41bde0111ed..09c6a388f4d 100644 --- a/models/DataObject/ClassDefinition/Data/Block.php +++ b/models/DataObject/ClassDefinition/Data/Block.php @@ -1297,6 +1297,10 @@ public function denormalize($value, $params = []) return null; } + /** + * @param array $data + * @return static + */ public static function __set_state($data) { $obj = new static(); diff --git a/models/DataObject/ClassDefinition/Data/BooleanSelect.php b/models/DataObject/ClassDefinition/Data/BooleanSelect.php index 508fa8a562d..7f48c96e904 100644 --- a/models/DataObject/ClassDefinition/Data/BooleanSelect.php +++ b/models/DataObject/ClassDefinition/Data/BooleanSelect.php @@ -345,6 +345,11 @@ public function setYesLabel($yesLabel) return $this; } + /** + * @param int $value + * @param string $label + * @return void + */ public function setOptionsEntry($value, $label) { if (!is_array($this->options)) { @@ -374,6 +379,10 @@ public function getNoLabel() return $this->noLabel; } + /** + * @param string $noLabel + * @return $this + */ public function setNoLabel($noLabel) { $this->noLabel = $noLabel; @@ -390,6 +399,10 @@ public function getEmptyLabel() return $this->emptyLabel; } + /** + * @param string $emptyLabel + * @return $this + */ public function setEmptyLabel($emptyLabel) { $this->emptyLabel = $emptyLabel; diff --git a/models/DataObject/ClassDefinition/Data/Classificationstore.php b/models/DataObject/ClassDefinition/Data/Classificationstore.php index 9c6f7e15ab9..f760308787b 100644 --- a/models/DataObject/ClassDefinition/Data/Classificationstore.php +++ b/models/DataObject/ClassDefinition/Data/Classificationstore.php @@ -1427,6 +1427,10 @@ public function getGetterCode($class) return $code; } + /** + * @param array $data + * @return static + */ public static function __set_state($data) { $obj = new static(); diff --git a/models/DataObject/ClassDefinition/Data/Localizedfields.php b/models/DataObject/ClassDefinition/Data/Localizedfields.php index 3cce4e81895..1b0911ec1bc 100644 --- a/models/DataObject/ClassDefinition/Data/Localizedfields.php +++ b/models/DataObject/ClassDefinition/Data/Localizedfields.php @@ -1450,6 +1450,10 @@ public function denormalize($value, $params = []) return null; } + /** + * @param array $data + * @return static + */ public static function __set_state($data) { $obj = new static(); diff --git a/models/DataObject/ClassDefinition/Data/ManyToManyObjectRelation.php b/models/DataObject/ClassDefinition/Data/ManyToManyObjectRelation.php index 4c9756c1d54..5f9bd6bec34 100644 --- a/models/DataObject/ClassDefinition/Data/ManyToManyObjectRelation.php +++ b/models/DataObject/ClassDefinition/Data/ManyToManyObjectRelation.php @@ -717,6 +717,11 @@ protected function buildUniqueKeyForDiffEditor($item) /** * @internal + * @param mixed $originalData + * @param mixed $data + * @param Concrete $object + * @param array $params + * @return array */ protected function processDiffDataForEditMode($originalData, $data, $object = null, $params = []) { diff --git a/models/DataObject/ClassDefinition/Data/User.php b/models/DataObject/ClassDefinition/Data/User.php index 95b41ede51b..15f67885e29 100644 --- a/models/DataObject/ClassDefinition/Data/User.php +++ b/models/DataObject/ClassDefinition/Data/User.php @@ -168,6 +168,9 @@ public static function __set_state($data) return $obj; } + /** + * @return array + */ public function __sleep() { $vars = get_object_vars($this); diff --git a/models/DataObject/ClassDefinition/DefaultValueGeneratorInterface.php b/models/DataObject/ClassDefinition/DefaultValueGeneratorInterface.php index 9a3204968ba..4aea86353a4 100644 --- a/models/DataObject/ClassDefinition/DefaultValueGeneratorInterface.php +++ b/models/DataObject/ClassDefinition/DefaultValueGeneratorInterface.php @@ -19,5 +19,8 @@ interface DefaultValueGeneratorInterface { + /** + * @return mixed + */ public function getValue(Concrete $object, Data $fieldDefinition, array $context); } diff --git a/models/DataObject/PreGetValueHookInterface.php b/models/DataObject/PreGetValueHookInterface.php index 88f5a9e3d22..d853bb746ac 100644 --- a/models/DataObject/PreGetValueHookInterface.php +++ b/models/DataObject/PreGetValueHookInterface.php @@ -17,5 +17,8 @@ interface PreGetValueHookInterface { + /** + * @return mixed + */ public function preGetValue(string $key); } diff --git a/models/Document/Editable/Areablock.php b/models/Document/Editable/Areablock.php index 6f529492690..62cbcc74376 100644 --- a/models/Document/Editable/Areablock.php +++ b/models/Document/Editable/Areablock.php @@ -365,7 +365,7 @@ protected function getEditmodeElementAttributes(): array } /** - * {@inheritdoc} + * @param bool $return */ public function start($return = false) { @@ -397,7 +397,7 @@ public function start($return = false) } /** - * {@inheritdoc} + * @param bool $return */ public function end($return = false) { @@ -416,7 +416,7 @@ public function end($return = false) } /** - * {@inheritdoc} + * @param Document\Editable\Area\Info $info */ public function blockStart($info = null) { diff --git a/models/Document/Editable/Block.php b/models/Document/Editable/Block.php index 10c2c1c94c6..0e8c714ae69 100644 --- a/models/Document/Editable/Block.php +++ b/models/Document/Editable/Block.php @@ -272,7 +272,9 @@ public function blockDestruct() } /** - * {@inheritdoc} + * @param bool $showControls + * @param bool $return + * @param string $additionalClass */ public function blockStart($showControls = true, $return = false, $additionalClass = '') { @@ -331,7 +333,7 @@ public function blockControls($return = false) } /** - * {@inheritdoc} + * @param bool $return */ public function blockEnd($return = false) { diff --git a/models/Document/Editable/Image.php b/models/Document/Editable/Image.php index fc9b9e1a7ff..c92a1eab16b 100644 --- a/models/Document/Editable/Image.php +++ b/models/Document/Editable/Image.php @@ -798,6 +798,9 @@ public function rewriteIds($idMapping) /** : void */ } } + /** + * @return array + */ public function __sleep() { $finalVars = []; diff --git a/models/Document/Editable/Video.php b/models/Document/Editable/Video.php index c2b5c7e6995..415ae2b936d 100644 --- a/models/Document/Editable/Video.php +++ b/models/Document/Editable/Video.php @@ -261,7 +261,7 @@ public function getData() } /** - * {@inheritdoc} + * @return mixed */ protected function getDataEditmode() { diff --git a/models/Document/Hardlink/Wrapper.php b/models/Document/Hardlink/Wrapper.php index 76bc7fb7456..4e7a77c455f 100644 --- a/models/Document/Hardlink/Wrapper.php +++ b/models/Document/Hardlink/Wrapper.php @@ -215,9 +215,12 @@ public function getSourceDocument(): ?Document /** * @param Document $sourceDocument + * @return $this */ - public function setSourceDocument(Document $sourceDocument): void + public function setSourceDocument(Document $sourceDocument): static { $this->sourceDocument = $sourceDocument; + + return $this; } } diff --git a/models/Document/Hardlink/Wrapper/WrapperInterface.php b/models/Document/Hardlink/Wrapper/WrapperInterface.php index 95d85d40aef..6b3e638a6f6 100644 --- a/models/Document/Hardlink/Wrapper/WrapperInterface.php +++ b/models/Document/Hardlink/Wrapper/WrapperInterface.php @@ -22,6 +22,7 @@ interface WrapperInterface extends ElementInterface { /** * @param Document $hardLinkSource + * @return $this */ public function setHardLinkSource($hardLinkSource); @@ -32,6 +33,7 @@ public function getHardLinkSource(); /** * @param Document $sourceDocument + * @return $this */ public function setSourceDocument(Document $sourceDocument); diff --git a/models/Document/Link.php b/models/Document/Link.php index 4d05cfcff2b..510358da1b8 100644 --- a/models/Document/Link.php +++ b/models/Document/Link.php @@ -429,6 +429,9 @@ protected function update($params = []) $this->saveScheduledTasks(); } + /** + * @return array + */ public function __sleep() { $finalVars = []; diff --git a/models/Element/Service.php b/models/Element/Service.php index b22fa094488..f2716527f0e 100644 --- a/models/Element/Service.php +++ b/models/Element/Service.php @@ -265,8 +265,7 @@ private static function getDependedElement($config) } /** - * @static - * + * @param ElementInterface|null $element * @return bool */ public static function doHideUnpublished($element) diff --git a/phpstan-baseline.neon b/phpstan-baseline.neon index 9da48d5a3c5..5735b25aa28 100644 --- a/phpstan-baseline.neon +++ b/phpstan-baseline.neon @@ -150,11 +150,6 @@ parameters: count: 1 path: bundles/EcommerceFrameworkBundle/Type/Decimal.php - - - message: "#^Parameter \\#1 \\$seriesId of static method Pimcore\\\\Bundle\\\\EcommerceFrameworkBundle\\\\VoucherService\\\\Token\\\\Listing\\:\\:cleanUpAllTokens\\(\\) expects string, int\\|null given\\.$#" - count: 1 - path: bundles/EcommerceFrameworkBundle/VoucherService/DefaultService.php - - message: "#^Else branch is unreachable because previous condition is always true\\.$#" count: 1