Skip to content
Snippets Groups Projects
Commit 3d324103 authored by lsolesen's avatar lsolesen Committed by Bojan Živanović
Browse files

Expand the coding standards testing, fix more violations.

parent d552ba98
No related branches found
No related tags found
No related merge requests found
Showing
with 36 additions and 18 deletions
...@@ -40,6 +40,7 @@ class CheckoutFlowPluginCollection extends DefaultSingleLazyPluginCollection { ...@@ -40,6 +40,7 @@ class CheckoutFlowPluginCollection extends DefaultSingleLazyPluginCollection {
* {@inheritdoc} * {@inheritdoc}
* *
* @return \Drupal\commerce_checkout\Plugin\Commerce\CheckoutFlow\CheckoutFlowInterface * @return \Drupal\commerce_checkout\Plugin\Commerce\CheckoutFlow\CheckoutFlowInterface
* The checkout flow plugin.
*/ */
public function &get($instance_id) { public function &get($instance_id) {
return parent::get($instance_id); return parent::get($instance_id);
......
...@@ -30,9 +30,10 @@ class LineItemEvent extends Event { ...@@ -30,9 +30,10 @@ class LineItemEvent extends Event {
} }
/** /**
* The line item the event refers to. * Gets the line item.
* *
* @return \Drupal\commerce_order\Entity\LineItemInterface * @return \Drupal\commerce_order\Entity\LineItemInterface
* The line item.
*/ */
public function getLineItem() { public function getLineItem() {
return $this->lineItem; return $this->lineItem;
......
...@@ -30,9 +30,10 @@ class OrderEvent extends Event { ...@@ -30,9 +30,10 @@ class OrderEvent extends Event {
} }
/** /**
* The order the event refers to. * Gets the order.
* *
* @return \Drupal\commerce_order\Entity\OrderInterface * @return \Drupal\commerce_order\Entity\OrderInterface
* Gets the order.
*/ */
public function getOrder() { public function getOrder() {
return $this->order; return $this->order;
......
...@@ -51,7 +51,7 @@ class OrderAddForm extends FormBase { ...@@ -51,7 +51,7 @@ class OrderAddForm extends FormBase {
/** /**
* {@inheritdoc} * {@inheritdoc}
*/ */
public function getFormID() { public function getFormId() {
return 'commerce_order_add_form'; return 'commerce_order_add_form';
} }
......
<?php <?php
namespace Drupal\commerce_order\Resolver; namespace Drupal\commerce_order\Resolver;
use Drupal\commerce_order\Entity\LineItemInterface; use Drupal\commerce_order\Entity\LineItemInterface;
/** /**
......
<?php <?php
namespace Drupal\commerce_order\Resolver; namespace Drupal\commerce_order\Resolver;
use Drupal\commerce_order\Entity\LineItemInterface; use Drupal\commerce_order\Entity\LineItemInterface;
use Drupal\Core\Entity\EntityTypeManagerInterface; use Drupal\Core\Entity\EntityTypeManagerInterface;
......
...@@ -15,7 +15,7 @@ interface OrderTypeResolverInterface { ...@@ -15,7 +15,7 @@ interface OrderTypeResolverInterface {
* @param \Drupal\commerce_order\Entity\LineItemInterface $line_item * @param \Drupal\commerce_order\Entity\LineItemInterface $line_item
* The line item being added to an order. * The line item being added to an order.
* *
* @return \Drupal\commerce_order\Entity\OrderTypeInterface|NULL * @return \Drupal\commerce_order\Entity\OrderTypeInterface|null
* The order type, if resolved. Otherwise NULL, indicating that the next * The order type, if resolved. Otherwise NULL, indicating that the next
* resolver in the chain should be called. * resolver in the chain should be called.
*/ */
......
...@@ -35,7 +35,7 @@ interface CurrencyImporterInterface { ...@@ -35,7 +35,7 @@ interface CurrencyImporterInterface {
* @param string $country_code * @param string $country_code
* The country code. * The country code.
* *
* @return \Drupal\commerce_price\Entity\CurrencyInterface|NULL * @return \Drupal\commerce_price\Entity\CurrencyInterface|null
* The saved currency entity or NULL if the given country's currency * The saved currency entity or NULL if the given country's currency
* isn't known. * isn't known.
* *
......
...@@ -30,9 +30,10 @@ class NumberFormatEvent extends GenericEvent { ...@@ -30,9 +30,10 @@ class NumberFormatEvent extends GenericEvent {
} }
/** /**
* The number format the event refers to. * Gets the number format.
* *
* @return \CommerceGuys\Intl\NumberFormat\NumberFormatEntityInterface * @return \CommerceGuys\Intl\NumberFormat\NumberFormatEntityInterface
* The number format.
*/ */
public function getNumberFormat() { public function getNumberFormat() {
return $this->numberFormat; return $this->numberFormat;
......
...@@ -58,6 +58,7 @@ class Price { ...@@ -58,6 +58,7 @@ class Price {
* Gets the string representation of the price. * Gets the string representation of the price.
* *
* @return string * @return string
* The string representation of the price.
*/ */
public function __toString() { public function __toString() {
return $this->amount . ' ' . $this->currencyCode; return $this->amount . ' ' . $this->currencyCode;
......
...@@ -13,6 +13,7 @@ interface ProductAttributeInterface extends ConfigEntityInterface { ...@@ -13,6 +13,7 @@ interface ProductAttributeInterface extends ConfigEntityInterface {
* Gets the attribute values. * Gets the attribute values.
* *
* @return \Drupal\commerce_product\Entity\ProductAttributeValueInterface[] * @return \Drupal\commerce_product\Entity\ProductAttributeValueInterface[]
* The attribute values.
*/ */
public function getValues(); public function getValues();
......
...@@ -38,6 +38,7 @@ class FilterVariationsEvent extends Event { ...@@ -38,6 +38,7 @@ class FilterVariationsEvent extends Event {
* Sets the enabled variations. * Sets the enabled variations.
* *
* @param array $variations * @param array $variations
* The enabled variations.
*/ */
public function setVariations(array $variations) { public function setVariations(array $variations) {
$this->variations = $variations; $this->variations = $variations;
...@@ -47,6 +48,7 @@ class FilterVariationsEvent extends Event { ...@@ -47,6 +48,7 @@ class FilterVariationsEvent extends Event {
* Gets the enabled variations. * Gets the enabled variations.
* *
* @return array * @return array
* The enabled variations.
*/ */
public function getVariations() { public function getVariations() {
return $this->variations; return $this->variations;
......
...@@ -6,33 +6,34 @@ use Drupal\commerce_product\Entity\ProductAttributeValueInterface; ...@@ -6,33 +6,34 @@ use Drupal\commerce_product\Entity\ProductAttributeValueInterface;
use Symfony\Component\EventDispatcher\Event; use Symfony\Component\EventDispatcher\Event;
/** /**
* Defines the attributeValue attribute value event. * Defines the product attribute value event.
* *
* @see \Drupal\commerce_product\Event\ProductEvents * @see \Drupal\commerce_product\Event\ProductEvents
*/ */
class ProductAttributeValueEvent extends Event { class ProductAttributeValueEvent extends Event {
/** /**
* The attributeValue. * The product attribute value.
* *
* @var \Drupal\commerce_product\Entity\ProductAttributeValueInterface * @var \Drupal\commerce_product\Entity\ProductAttributeValueInterface
*/ */
protected $attributeValue; protected $attributeValue;
/** /**
* Constructs a new ProductEvent. * Constructs a new ProductAttributeValueEvent.
* *
* @param \Drupal\commerce_product\Entity\ProductAttributeValueInterface $attribute_value * @param \Drupal\commerce_product\Entity\ProductAttributeValueInterface $attribute_value
* The attribute value. * The product attribute value.
*/ */
public function __construct(ProductAttributeValueInterface $attribute_value) { public function __construct(ProductAttributeValueInterface $attribute_value) {
$this->attributeValue = $attribute_value; $this->attributeValue = $attribute_value;
} }
/** /**
* The attribute value the event refers to. * Gets the product attribute value.
* *
* @return \Drupal\commerce_product\Entity\ProductAttributeValueInterface * @return \Drupal\commerce_product\Entity\ProductAttributeValueInterface
* The product attribute value.
*/ */
public function getAttributeValue() { public function getAttributeValue() {
return $this->attributeValue; return $this->attributeValue;
......
...@@ -30,9 +30,10 @@ class ProductEvent extends Event { ...@@ -30,9 +30,10 @@ class ProductEvent extends Event {
} }
/** /**
* The product the event refers to. * Gets the product.
* *
* @return \Drupal\commerce_product\Entity\ProductInterface * @return \Drupal\commerce_product\Entity\ProductInterface
* The product.
*/ */
public function getProduct() { public function getProduct() {
return $this->product; return $this->product;
......
...@@ -41,7 +41,7 @@ class ProductVariationAjaxChangeEvent extends Event { ...@@ -41,7 +41,7 @@ class ProductVariationAjaxChangeEvent extends Event {
* The product variation. * The product variation.
* @param \Drupal\Core\Ajax\AjaxResponse $response * @param \Drupal\Core\Ajax\AjaxResponse $response
* The ajax response. * The ajax response.
* @param string * @param string $view_mode
* The view mode used to render the product variation. * The view mode used to render the product variation.
*/ */
public function __construct(ProductVariationInterface $product_variation, AjaxResponse $response, $view_mode = 'default') { public function __construct(ProductVariationInterface $product_variation, AjaxResponse $response, $view_mode = 'default') {
...@@ -51,18 +51,20 @@ class ProductVariationAjaxChangeEvent extends Event { ...@@ -51,18 +51,20 @@ class ProductVariationAjaxChangeEvent extends Event {
} }
/** /**
* The product variation the event refers to. * The product variation.
* *
* @return \Drupal\commerce_product\Entity\ProductVariationInterface * @return \Drupal\commerce_product\Entity\ProductVariationInterface
* The product variation.
*/ */
public function getProductVariation() { public function getProductVariation() {
return $this->productVariation; return $this->productVariation;
} }
/** /**
* The ajax response the event refers to. * The ajax response.
* *
* @return \Drupal\Core\Ajax\AjaxResponse * @return \Drupal\Core\Ajax\AjaxResponse
* The ajax reponse.
*/ */
public function getResponse() { public function getResponse() {
return $this->response; return $this->response;
...@@ -72,6 +74,7 @@ class ProductVariationAjaxChangeEvent extends Event { ...@@ -72,6 +74,7 @@ class ProductVariationAjaxChangeEvent extends Event {
* The view mode used to render the product variation. * The view mode used to render the product variation.
* *
* @return string * @return string
* The view mode.
*/ */
public function getViewMode() { public function getViewMode() {
return $this->viewMode; return $this->viewMode;
......
...@@ -30,9 +30,10 @@ class ProductVariationEvent extends Event { ...@@ -30,9 +30,10 @@ class ProductVariationEvent extends Event {
} }
/** /**
* The product variation the event refers to. * Gets the product variation.
* *
* @return \Drupal\commerce_product\Entity\ProductVariationInterface * @return \Drupal\commerce_product\Entity\ProductVariationInterface
* The product variation.
*/ */
public function getProductVariation() { public function getProductVariation() {
return $this->productVariation; return $this->productVariation;
......
...@@ -75,6 +75,7 @@ class ProductAttributeForm extends BundleEntityFormBase { ...@@ -75,6 +75,7 @@ class ProductAttributeForm extends BundleEntityFormBase {
* The current state of the form. * The current state of the form.
* *
* @return array * @return array
* The attribute values form.
*/ */
public function buildValuesForm(array $form, FormStateInterface $form_state) { public function buildValuesForm(array $form, FormStateInterface $form_state) {
/** @var \Drupal\commerce_product\Entity\ProductAttributeInterface $attribute */ /** @var \Drupal\commerce_product\Entity\ProductAttributeInterface $attribute */
......
...@@ -35,6 +35,7 @@ class ProductAttributeTranslationAddForm extends ConfigTranslationAddForm { ...@@ -35,6 +35,7 @@ class ProductAttributeTranslationAddForm extends ConfigTranslationAddForm {
* @param \Drupal\language\ConfigurableLanguageManagerInterface $language_manager * @param \Drupal\language\ConfigurableLanguageManagerInterface $language_manager
* The configurable language manager. * The configurable language manager.
* @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager * @param \Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager
* The entity type manager.
*/ */
public function __construct(TypedConfigManagerInterface $typed_config_manager, ConfigMapperManagerInterface $config_mapper_manager, ConfigurableLanguageManagerInterface $language_manager, EntityTypeManagerInterface $entity_type_manager) { public function __construct(TypedConfigManagerInterface $typed_config_manager, ConfigMapperManagerInterface $config_mapper_manager, ConfigurableLanguageManagerInterface $language_manager, EntityTypeManagerInterface $entity_type_manager) {
parent::__construct($typed_config_manager, $config_mapper_manager, $language_manager); parent::__construct($typed_config_manager, $config_mapper_manager, $language_manager);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment