Skip to content

Commit 6150c42

Browse files
committed
Fix phpcs failures introduced by new coder version.
1 parent f963f3b commit 6150c42

17 files changed

Lines changed: 42 additions & 31 deletions

File tree

modules/cart/commerce_cart.routing.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,3 @@ commerce_cart.page:
55
_title: 'Shopping cart'
66
requirements:
77
_permission: 'access cart'
8-

modules/cart/tests/modules/commerce_cart_test/commerce_cart_test.module

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<?php
22

3+
/**
4+
* @file
5+
* Test module for Cart.
6+
*/
7+
38
use Drupal\Core\Entity\EntityInterface;
49
use Drupal\Core\Entity\EntityMalformedException;
510

modules/log/src/LogTemplateManager.php

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
class LogTemplateManager extends DefaultPluginManager implements LogTemplateManagerInterface {
2121

2222
/**
23-
* The commerce_log_category category manager.
23+
* The log category manager.
2424
*
2525
* @var \Drupal\commerce_log\LogCategoryManagerInterface
2626
*/
@@ -46,6 +46,8 @@ class LogTemplateManager extends DefaultPluginManager implements LogTemplateMana
4646
* The module handler.
4747
* @param \Drupal\Core\Cache\CacheBackendInterface $cache_backend
4848
* The cache backend.
49+
* @param \Drupal\commerce_log\LogCategoryManagerInterface $category_manager
50+
* The log category manager.
4951
*/
5052
public function __construct(ModuleHandlerInterface $module_handler, CacheBackendInterface $cache_backend, LogCategoryManagerInterface $category_manager) {
5153
$this->moduleHandler = $module_handler;

modules/log/tests/module/commerce_log_test.module

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
<?php
2-
use Drupal\commerce_log\Entity\Log;
2+
3+
/**
4+
* @file
5+
* Test module for Log.
6+
*/
7+
38
use Drupal\Core\Entity\EntityInterface;
49

510
/**

modules/order/commerce_order.module

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77

88
use Drupal\commerce\BundleFieldDefinition;
9+
use Drupal\commerce_order\Entity\OrderTypeInterface;
910
use Drupal\Core\Form\FormStateInterface;
1011
use Drupal\Core\Render\Element;
1112

@@ -87,7 +88,7 @@ function commerce_order_field_widget_form_alter(&$element, FormStateInterface $f
8788
* - elements: An associative array containing rendered fields.
8889
* - attributes: HTML attributes for the containing element.
8990
*/
90-
function template_preprocess_commerce_order(&$variables) {
91+
function template_preprocess_commerce_order(array &$variables) {
9192
/** @var Drupal\commerce_order\Entity\OrderInterface $order */
9293
$order = $variables['elements']['#commerce_order'];
9394

@@ -130,7 +131,7 @@ function commerce_order_theme_suggestions_commerce_order_receipt(array $variable
130131
* @param \Drupal\commerce_order\Entity\OrderTypeInterface $order_type
131132
* The order type.
132133
*/
133-
function commerce_order_add_order_items_field($order_type) {
134+
function commerce_order_add_order_items_field(OrderTypeInterface $order_type) {
134135
$field_definition = BundleFieldDefinition::create('entity_reference')
135136
->setTargetEntityTypeId('commerce_order')
136137
->setTargetBundle($order_type->id())

modules/order/src/Form/OrderAddForm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
namespace Drupal\commerce_order\Form;
44

5-
use \Drupal\Core\Datetime\DrupalDateTime;
5+
use Drupal\Core\Datetime\DrupalDateTime;
66
use Drupal\Core\Entity\EntityTypeManagerInterface;
77
use Drupal\Core\Form\FormBase;
88
use Drupal\Core\Form\FormStateInterface;

modules/order/tests/src/FunctionalJavascript/OrderReassignTest.php

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,6 @@ protected function getAdministratorPermissions() {
3636
], parent::getAdministratorPermissions());
3737
}
3838

39-
/**
40-
* {@inheritdoc}
41-
*/
42-
protected function setUp() {
43-
parent::setUp();
44-
}
45-
4639
/**
4740
* Tests the reassign form with a new user.
4841
*/

modules/price/tests/modules/commerce_price_test/commerce_price_test.module

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
/**
44
* @file
5-
* Module file for commerce_price_test.
5+
* Test module for Price.
66
*/
77

88
use Drupal\commerce_price\Price;

modules/product/commerce_product.module

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
*/
77

88
use Drupal\commerce\BundleFieldDefinition;
9+
use Drupal\commerce_product\Entity\ProductTypeInterface;
910
use Drupal\Core\Access\AccessResult;
1011
use Drupal\Core\Cache\Cache;
1112
use Drupal\Core\Form\FormStateInterface;
@@ -36,8 +37,8 @@ function commerce_product_entity_form_display_update(EntityFormDisplayInterface
3637
* Implements hook_ENTITY_TYPE_update().
3738
*/
3839
function commerce_product_entity_view_display_update(EntityInterface $entity) {
39-
// The product view uses the variation view and needs to be cleared, which doesn't happen automatically
40-
// because we're editing the variation, not the product
40+
// The product view uses the variation view and needs to be cleared, which doesn't
41+
// happen automatically because we're editing the variation, not the product.
4142
if (substr($entity->getConfigTarget(), 0, 27) === 'commerce_product_variation.') {
4243
Cache::invalidateTags(['commerce_product_view']);
4344
}
@@ -177,7 +178,7 @@ function template_preprocess_commerce_product_attribute_value(array &$variables)
177178
* @param \Drupal\commerce_product\Entity\ProductTypeInterface $product_type
178179
* The product type.
179180
*/
180-
function commerce_product_add_stores_field($product_type) {
181+
function commerce_product_add_stores_field(ProductTypeInterface $product_type) {
181182
$field_definition = BundleFieldDefinition::create('entity_reference')
182183
->setTargetEntityTypeId('commerce_product')
183184
->setTargetBundle($product_type->id())
@@ -204,7 +205,7 @@ function commerce_product_add_stores_field($product_type) {
204205
* @param string $label
205206
* (optional) The label for the body instance. Defaults to 'Body'.
206207
*/
207-
function commerce_product_add_body_field($product_type, $label = 'Body') {
208+
function commerce_product_add_body_field(ProductTypeInterface $product_type, $label = 'Body') {
208209
$field_definition = BundleFieldDefinition::create('text_with_summary')
209210
->setTargetEntityTypeId('commerce_product')
210211
->setTargetBundle($product_type->id())
@@ -233,7 +234,7 @@ function commerce_product_add_body_field($product_type, $label = 'Body') {
233234
* @param \Drupal\commerce_product\Entity\ProductTypeInterface $product_type
234235
* The product type.
235236
*/
236-
function commerce_product_add_variations_field($product_type) {
237+
function commerce_product_add_variations_field(ProductTypeInterface $product_type) {
237238
$field_definition = BundleFieldDefinition::create('entity_reference')
238239
->setTargetEntityTypeId('commerce_product')
239240
->setTargetBundle($product_type->id())

modules/product/src/Form/ProductTypeDeleteForm.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ class ProductTypeDeleteForm extends EntityDeleteForm {
2323
* Constructs a new ProductTypeDeleteForm object.
2424
*
2525
* @param \Drupal\Core\Entity\Query\QueryFactory $query_factory
26-
* The entity query object.
26+
* The entity query object.
2727
*/
2828
public function __construct(QueryFactory $query_factory) {
2929
$this->queryFactory = $query_factory;

0 commit comments

Comments
 (0)