Skip to content

Commit

Permalink
Fixes after testing the quality module implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
cemag44 authored and cemag44300 committed Oct 19, 2022
1 parent f6722de commit e2311b1
Show file tree
Hide file tree
Showing 10 changed files with 27 additions and 54 deletions.
5 changes: 0 additions & 5 deletions .phpqa.yml

This file was deleted.

21 changes: 0 additions & 21 deletions .travis.yml

This file was deleted.

7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,13 @@

All notable changes to this project will be documented in this file.

## [1.3.6] - 2022-10-19
[1.3.6]: https://github.com/Smile-SA/magento2-module-custom-entity-product-link/compare/1.3.5...1.3.6

- Add Smile Lab Quality Suite
- Analyse code style with phpcs / phpmd / phpstan command
- Add db_schema.xml instead InstallSchema

## [1.3.5] - 2022-09-20
[1.3.5]: https://github.com/Smile-SA/magento2-module-custom-entity-product-link/compare/1.3.4...1.3.5

Expand Down
2 changes: 1 addition & 1 deletion Helper/Product.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ public function __construct(
public function getCustomEntities(ProductInterface $product, string $attributeCode): array
{
$result = [];
// @phpstan-ignore-next-line
$customEntities = $product->getExtensionAttributes()->getCustomEntities();
if ($customEntities) {
foreach ($customEntities as $customEntity) {
// @phpstan-ignore-next-line
if ($customEntity->getProductAttributeCode() !== $attributeCode || !$customEntity->getIsActive()) {
continue;
}
Expand Down
11 changes: 10 additions & 1 deletion Model/ResourceModel/CustomEntityProductLinkManagement.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
/**
* Custom entity product link management resource model.
*/
abstract class CustomEntityProductLinkManagement extends AbstractDb
class CustomEntityProductLinkManagement extends AbstractDb
{
public const RELATION_TABLE_NAME = 'catalog_product_custom_entity_link';

Expand Down Expand Up @@ -77,4 +77,13 @@ public function saveLinks($productId, $attributeId, array $entityIds): CustomEnt

return $this;
}

/**
* @inheritDoc
*/
// @codingStandardsIgnoreLine
protected function _construct()
{
// TODO: Implement _construct() method.
}
}
6 changes: 2 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,11 @@
],
"require": {
"php": "^7.4 || ^8.1",
"smile/module-custom-entity": "~1.3.0",
"smile/module-custom-entity": "^1.3",
"smile/elasticsuite": "^2.8.0"
},
"require-dev": {
"smile/magento2-smilelab-quality-suite": "^1.0.5",
"edgedesign/phpqa": "^1.18",
"jakub-onderka/php-parallel-lint": "^0.9.2"
"smile/magento2-smilelab-quality-suite": "^3.0"
},
"license": "OSL-3.0",
"authors": [
Expand Down
9 changes: 0 additions & 9 deletions phpcs.xml

This file was deleted.

1 change: 1 addition & 0 deletions phpcs.xml.dist
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,6 @@

<rule ref="SmileLab"/>

<file>.</file>
<exclude-pattern>vendor/*</exclude-pattern>
</ruleset>
13 changes: 0 additions & 13 deletions phpmd.xml

This file was deleted.

6 changes: 6 additions & 0 deletions phpstan.neon.dist
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,14 @@ parameters:
level: 6
phpVersion: 70400
checkMissingIterableValueType: false
paths:
- .
excludePaths:
- 'vendor/*'
ignoreErrors:
-
message: '#Constant BP not found#'
path: registration.php

includes:
- %currentWorkingDirectory%/vendor/smile/magento2-smilelab-phpstan/extension.neon

0 comments on commit e2311b1

Please sign in to comment.