Skip to content

Commit

Permalink
Merge branch 'master' into feature/ps-2600/master-managing-company-us…
Browse files Browse the repository at this point in the history
…ers-in-yves-improvement
  • Loading branch information
gerner-spryker committed Sep 27, 2018
2 parents 8985e34 + c4d2abc commit 3477cca
Show file tree
Hide file tree
Showing 25 changed files with 158 additions and 87 deletions.
2 changes: 1 addition & 1 deletion phpstan.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
"defaultLevel": 3
"defaultLevel": 5
}
71 changes: 71 additions & 0 deletions phpstan.neon
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
parameters:
bootstrap: %rootDir%/../../../phpstan-bootstrap.php

ignoreErrors:
- '#Casting to int something that.+s already int#'

services:
-
class: PhpStan\DynamicType\FacadeDynamicTypeExtension
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension

-
class: PhpStan\DynamicType\QueryContainerDynamicTypeExtension
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension

-
class: PhpStan\DynamicType\ConsoleDynamicTypeExtension
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension

-
class: PhpStan\DynamicType\ControllerDynamicTypeExtension
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension

-
class: PhpStan\DynamicType\PluginDynamicTypeExtension
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension

-
class: PhpStan\DynamicType\ServiceDynamicTypeExtension
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension

-
class: PhpStan\DynamicType\ConfigDynamicTypeExtension
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension

-
class: PhpStan\DynamicType\ClientDynamicTypeExtension
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension

-
class: PhpStan\DynamicType\ClientPluginDynamicTypeExtension
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension

-
class: PhpStan\DynamicType\YvesFormTypeDynamicTypeExtension
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension

-
class: PhpStan\DynamicType\ZedFormTypeDynamicTypeExtension
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension

-
class: PhpStan\DynamicType\YvesFactoryDynamicTypeExtension
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension

-
class: PhpStan\DynamicType\ZedFactoryDynamicTypeExtension
tags:
- phpstan.broker.dynamicMethodReturnTypeExtension
Original file line number Diff line number Diff line change
Expand Up @@ -34,39 +34,39 @@

class CheckoutPageDependencyProvider extends AbstractBundleDependencyProvider
{
const CLIENT_QUOTE = 'CLIENT_QUOTE';
const CLIENT_CALCULATION = 'CLIENT_CALCULATION';
const CLIENT_CHECKOUT = 'CLIENT_CHECKOUT';
const CLIENT_CUSTOMER = 'CLIENT_CUSTOMER';
const CLIENT_CART = 'CLIENT_CART';
const CLIENT_SHIPMENT = 'CLIENT_SHIPMENT';
const CLIENT_GLOSSARY = 'CLIENT_GLOSSARY';
const CLIENT_PRICE = 'CLIENT_PRICE';
const CLIENT_PRODUCT_BUNDLE = 'CLIENT_PRODUCT_BUNDLE';

const STORE = 'STORE';

const SERVICE_UTIL_VALIDATE = 'SERVICE_UTIL_VALIDATE';

const PLUGIN_APPLICATION = 'PLUGIN_APPLICATION';
const PLUGIN_CUSTOMER_STEP_HANDLER = 'PLUGIN_CUSTOMER_STEP_HANDLER';
const PLUGIN_SHIPMENT_STEP_HANDLER = 'PLUGIN_SHIPMENT_STEP_HANDLER';
const PLUGIN_SHIPMENT_HANDLER = 'PLUGIN_SHIPMENT_HANDLER';
const PLUGIN_SHIPMENT_FORM_DATA_PROVIDER = 'PLUGIN_SHIPMENT_FORM_DATA_PROVIDER';
const PLUGIN_CHECKOUT_BREADCRUMB = 'PLUGIN_CHECKOUT_BREADCRUMB';
const PLUGIN_MONEY = 'PLUGIN_MONEY';
const PLUGIN_CUSTOMER_PAGE_WIDGETS = 'PLUGIN_CUSTOMER_PAGE_WIDGETS';
const PLUGIN_ADDRESS_PAGE_WIDGETS = 'PLUGIN_ADDRESS_PAGE_WIDGETS';
const PLUGIN_SHIPMENT_PAGE_WIDGETS = 'PLUGIN_SHIPMENT_PAGE_WIDGETS';
const PLUGIN_PAYMENT_PAGE_WIDGETS = 'PLUGIN_PAYMENT_PAGE_WIDGETS';
const PLUGIN_SUMMARY_PAGE_WIDGETS = 'PLUGIN_SUMMARY_PAGE_WIDGETS';
const PLUGIN_SUCCESS_PAGE_WIDGETS = 'PLUGIN_SUCCESS_PAGE_WIDGETS';

const PAYMENT_METHOD_HANDLER = SprykerCheckoutDependencyProvider::PAYMENT_METHOD_HANDLER; // constant value must be BC because of dependency injector
const PAYMENT_SUB_FORMS = SprykerCheckoutDependencyProvider::PAYMENT_SUB_FORMS; // constant value must be BC because of dependency injector
const CUSTOMER_STEP_SUB_FORMS = 'CUSTOMER_STEP_SUB_FORMS';
const ADDRESS_STEP_SUB_FORMS = 'ADDRESS_STEP_SUB_FORMS';
const ADDRESS_STEP_FORM_DATA_PROVIDER = 'ADDRESS_STEP_FORM_DATA_PROVIDER';
public const CLIENT_QUOTE = 'CLIENT_QUOTE';
public const CLIENT_CALCULATION = 'CLIENT_CALCULATION';
public const CLIENT_CHECKOUT = 'CLIENT_CHECKOUT';
public const CLIENT_CUSTOMER = 'CLIENT_CUSTOMER';
public const CLIENT_CART = 'CLIENT_CART';
public const CLIENT_SHIPMENT = 'CLIENT_SHIPMENT';
public const CLIENT_GLOSSARY = 'CLIENT_GLOSSARY';
public const CLIENT_PRICE = 'CLIENT_PRICE';
public const CLIENT_PRODUCT_BUNDLE = 'CLIENT_PRODUCT_BUNDLE';

public const STORE = 'STORE';

public const SERVICE_UTIL_VALIDATE = 'SERVICE_UTIL_VALIDATE';

public const PLUGIN_APPLICATION = 'PLUGIN_APPLICATION';
public const PLUGIN_CUSTOMER_STEP_HANDLER = 'PLUGIN_CUSTOMER_STEP_HANDLER';
public const PLUGIN_SHIPMENT_STEP_HANDLER = 'PLUGIN_SHIPMENT_STEP_HANDLER';
public const PLUGIN_SHIPMENT_HANDLER = 'PLUGIN_SHIPMENT_HANDLER';
public const PLUGIN_SHIPMENT_FORM_DATA_PROVIDER = 'PLUGIN_SHIPMENT_FORM_DATA_PROVIDER';
public const PLUGIN_CHECKOUT_BREADCRUMB = 'PLUGIN_CHECKOUT_BREADCRUMB';
public const PLUGIN_MONEY = 'PLUGIN_MONEY';
public const PLUGIN_CUSTOMER_PAGE_WIDGETS = 'PLUGIN_CUSTOMER_PAGE_WIDGETS';
public const PLUGIN_ADDRESS_PAGE_WIDGETS = 'PLUGIN_ADDRESS_PAGE_WIDGETS';
public const PLUGIN_SHIPMENT_PAGE_WIDGETS = 'PLUGIN_SHIPMENT_PAGE_WIDGETS';
public const PLUGIN_PAYMENT_PAGE_WIDGETS = 'PLUGIN_PAYMENT_PAGE_WIDGETS';
public const PLUGIN_SUMMARY_PAGE_WIDGETS = 'PLUGIN_SUMMARY_PAGE_WIDGETS';
public const PLUGIN_SUCCESS_PAGE_WIDGETS = 'PLUGIN_SUCCESS_PAGE_WIDGETS';

public const PAYMENT_METHOD_HANDLER = SprykerCheckoutDependencyProvider::PAYMENT_METHOD_HANDLER; // constant value must be BC because of dependency injector
public const PAYMENT_SUB_FORMS = SprykerCheckoutDependencyProvider::PAYMENT_SUB_FORMS; // constant value must be BC because of dependency injector
public const CUSTOMER_STEP_SUB_FORMS = 'CUSTOMER_STEP_SUB_FORMS';
public const ADDRESS_STEP_SUB_FORMS = 'ADDRESS_STEP_SUB_FORMS';
public const ADDRESS_STEP_FORM_DATA_PROVIDER = 'ADDRESS_STEP_FORM_DATA_PROVIDER';

public const CLIENT_GLOSSARY_STORAGE = 'CLIENT_GLOSSARY_STORAGE';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ class DataContainer implements DataContainerInterface
protected $quoteClient;

/**
* @var \Generated\Shared\Transfer\QuoteTransfer
* @var \Generated\Shared\Transfer\QuoteTransfer|null
*/
protected $quoteTransfer;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

interface CartNoteQuoteItemNoteWidgetPluginInterface extends WidgetPluginInterface
{
const NAME = 'CartNoteQuoteItemNoteWidgetPlugin';
public const NAME = 'CartNoteQuoteItemNoteWidgetPlugin';

/**
* @api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

interface CartNoteQuoteNoteWidgetPluginInterface extends WidgetPluginInterface
{
const NAME = 'CartNoteQuoteNoteWidgetPlugin';
public const NAME = 'CartNoteQuoteNoteWidgetPlugin';

/**
* @api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@

interface CheckoutVoucherFormWidgetPluginInterface extends WidgetPluginInterface
{
const NAME = 'CheckoutVoucherFormWidgetPlugin';
public const NAME = 'CheckoutVoucherFormWidgetPlugin';

/**
* @api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@

interface SummaryProductPackagingUnitWidgetPluginInterface extends WidgetPluginInterface
{
const NAME = 'SummaryProductPackagingUnitWidgetPlugin';
public const NAME = 'SummaryProductPackagingUnitWidgetPlugin';

/**
* @api
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

class ShipmentFormDataProvider implements StepEngineFormDataProviderInterface
{
const FIELD_ID_SHIPMENT_METHOD = 'idShipmentMethod';
public const FIELD_ID_SHIPMENT_METHOD = 'idShipmentMethod';

/**
* @var \SprykerShop\Yves\CheckoutPage\Dependency\Client\CheckoutPageToShipmentClientInterface
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ public function __construct(SubFormPluginCollection $subFormPlugins)
}

/**
* @param \Spryker\Shared\Kernel\Transfer\AbstractTransfer $quoteTransfer
* @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer
*
* @return \Spryker\Shared\Kernel\Transfer\AbstractTransfer
* @return \Generated\Shared\Transfer\QuoteTransfer
*/
public function getData(AbstractTransfer $quoteTransfer)
{
Expand All @@ -42,7 +42,7 @@ public function getData(AbstractTransfer $quoteTransfer)
}

/**
* @param \Spryker\Shared\Kernel\Transfer\AbstractTransfer $quoteTransfer
* @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer
*
* @return array
*/
Expand Down
2 changes: 1 addition & 1 deletion src/SprykerShop/Yves/CheckoutPage/Form/FormFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ public function getSummaryForm()
}

/**
* @param \Symfony\Component\Form\FormTypeInterface[] $formTypes
* @param \Symfony\Component\Form\FormTypeInterface[]|string[] $formTypes
* @param \Spryker\Yves\StepEngine\Dependency\Form\StepEngineFormDataProviderInterface|null $dataProvider
*
* @return \Spryker\Yves\StepEngine\Form\FormCollectionHandlerInterface
Expand Down
6 changes: 3 additions & 3 deletions src/SprykerShop/Yves/CheckoutPage/Form/Steps/PaymentForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
*/
class PaymentForm extends AbstractType
{
const PAYMENT_PROPERTY_PATH = QuoteTransfer::PAYMENT;
const PAYMENT_SELECTION = PaymentTransfer::PAYMENT_SELECTION;
const PAYMENT_SELECTION_PROPERTY_PATH = self::PAYMENT_PROPERTY_PATH . '.' . self::PAYMENT_SELECTION;
public const PAYMENT_PROPERTY_PATH = QuoteTransfer::PAYMENT;
public const PAYMENT_SELECTION = PaymentTransfer::PAYMENT_SELECTION;
public const PAYMENT_SELECTION_PROPERTY_PATH = self::PAYMENT_PROPERTY_PATH . '.' . self::PAYMENT_SELECTION;

/**
* @return string
Expand Down
10 changes: 5 additions & 5 deletions src/SprykerShop/Yves/CheckoutPage/Form/Steps/ShipmentForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@

class ShipmentForm extends AbstractType
{
const FIELD_ID_SHIPMENT_METHOD = 'idShipmentMethod';
const OPTION_SHIPMENT_METHODS = 'shipmentMethods';
public const FIELD_ID_SHIPMENT_METHOD = 'idShipmentMethod';
public const OPTION_SHIPMENT_METHODS = 'shipmentMethods';

const SHIPMENT_PROPERTY_PATH = 'shipment';
const SHIPMENT_SELECTION = 'shipmentSelection';
const SHIPMENT_SELECTION_PROPERTY_PATH = self::SHIPMENT_PROPERTY_PATH . '.' . self::SHIPMENT_SELECTION;
public const SHIPMENT_PROPERTY_PATH = 'shipment';
public const SHIPMENT_SELECTION = 'shipmentSelection';
public const SHIPMENT_SELECTION_PROPERTY_PATH = self::SHIPMENT_PROPERTY_PATH . '.' . self::SHIPMENT_SELECTION;

/**
* @return string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
class CheckoutBreadcrumbPlugin extends AbstractPlugin
{
/**
* @param \Spryker\Shared\Kernel\Transfer\AbstractTransfer|null $dataTransfer
* @param \Generated\Shared\Transfer\QuoteTransfer|null $dataTransfer
*
* @return \Generated\Shared\Transfer\StepBreadcrumbsTransfer
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@

class CheckoutPageControllerProvider extends AbstractYvesControllerProvider
{
const CHECKOUT_CUSTOMER = 'checkout-customer';
const CHECKOUT_ADDRESS = 'checkout-address';
const CHECKOUT_SHIPMENT = 'checkout-shipment';
const CHECKOUT_PAYMENT = 'checkout-payment';
const CHECKOUT_SUMMARY = 'checkout-summary';
const CHECKOUT_PLACE_ORDER = 'checkout-place-order';
const CHECKOUT_ERROR = 'checkout-error';
const CHECKOUT_SUCCESS = 'checkout-success';
const CHECKOUT_INDEX = 'checkout-index';
public const CHECKOUT_CUSTOMER = 'checkout-customer';
public const CHECKOUT_ADDRESS = 'checkout-address';
public const CHECKOUT_SHIPMENT = 'checkout-shipment';
public const CHECKOUT_PAYMENT = 'checkout-payment';
public const CHECKOUT_SUMMARY = 'checkout-summary';
public const CHECKOUT_PLACE_ORDER = 'checkout-place-order';
public const CHECKOUT_ERROR = 'checkout-error';
public const CHECKOUT_SUCCESS = 'checkout-success';
public const CHECKOUT_INDEX = 'checkout-index';

/**
* @param \Silex\Application $app
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
class ShipmentFormDataProviderPlugin extends AbstractPlugin implements StepEngineFormDataProviderInterface
{
/**
* @param \Spryker\Shared\Kernel\Transfer\AbstractTransfer $quoteTransfer
* @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer
*
* @return \Spryker\Shared\Kernel\Transfer\AbstractTransfer
*/
Expand All @@ -27,7 +27,7 @@ public function getData(AbstractTransfer $quoteTransfer)
}

/**
* @param \Spryker\Shared\Kernel\Transfer\AbstractTransfer $quoteTransfer
* @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer
*
* @return array
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function preCondition(AbstractTransfer $quoteTransfer)

/**
* @param \Symfony\Component\HttpFoundation\Request $request
* @param \Spryker\Shared\Kernel\Transfer\AbstractTransfer $quoteTransfer
* @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer
*
* @return \Spryker\Shared\Kernel\Transfer\AbstractTransfer
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public function __construct(
}

/**
* @param \Spryker\Shared\Kernel\Transfer\AbstractTransfer $dataTransfer
* @param \Generated\Shared\Transfer\QuoteTransfer $dataTransfer
*
* @return bool
*/
Expand Down Expand Up @@ -169,7 +169,7 @@ public function getBreadcrumbItemTitle()
}

/**
* @param \Spryker\Shared\Kernel\Transfer\AbstractTransfer $dataTransfer
* @param \Generated\Shared\Transfer\QuoteTransfer $dataTransfer
*
* @return bool
*/
Expand All @@ -179,7 +179,7 @@ public function isBreadcrumbItemEnabled(AbstractTransfer $dataTransfer)
}

/**
* @param \Spryker\Shared\Kernel\Transfer\AbstractTransfer $dataTransfer
* @param \Generated\Shared\Transfer\QuoteTransfer $dataTransfer
*
* @return bool
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public function __construct(
/**
* Require input for customer authentication if the customer is not logged in already, or haven't authenticated yet.
*
* @param \Spryker\Shared\Kernel\Transfer\AbstractTransfer $quoteTransfer
* @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer
*
* @return bool
*/
Expand Down Expand Up @@ -162,7 +162,7 @@ public function getBreadcrumbItemTitle()
}

/**
* @param \Spryker\Shared\Kernel\Transfer\AbstractTransfer $quoteTransfer
* @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer
*
* @return bool
*/
Expand All @@ -172,7 +172,7 @@ public function isBreadcrumbItemEnabled(AbstractTransfer $quoteTransfer)
}

/**
* @param \Spryker\Shared\Kernel\Transfer\AbstractTransfer $quoteTransfer
* @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer
*
* @return bool
*/
Expand Down
4 changes: 2 additions & 2 deletions src/SprykerShop/Yves/CheckoutPage/Process/Steps/EntryStep.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ class EntryStep extends AbstractBaseStep
/**
* Require input, should we render view with form or just skip step after calling execute.
*
* @param \Spryker\Shared\Kernel\Transfer\AbstractTransfer $quoteTransfer
* @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer
*
* @return bool
*/
Expand All @@ -29,7 +29,7 @@ public function requireInput(AbstractTransfer $quoteTransfer)
/**
* Conditions that should be met for this step to be marked as completed. returns true when satisfied.
*
* @param \Spryker\Shared\Kernel\Transfer\AbstractTransfer $quoteTransfer
* @param \Generated\Shared\Transfer\QuoteTransfer $quoteTransfer
*
* @return bool
*/
Expand Down
Loading

0 comments on commit 3477cca

Please sign in to comment.