Skip to content
This repository was archived by the owner on Nov 6, 2021. It is now read-only.

Commit 00ad623

Browse files
author
Florian Horn
committed
Coding style fixes to match with M2EQP
1 parent d52370a commit 00ad623

File tree

7 files changed

+50
-89
lines changed

7 files changed

+50
-89
lines changed

Model/Configuration.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -214,4 +214,4 @@ public function setDummyContentEmail($dummyContentEmail)
214214
$this->dummyContentEmail = $dummyContentEmail;
215215
return $this;
216216
}
217-
}
217+
}

Observer/CategoriesObserver.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,9 @@ public function execute(\Magento\Framework\Event\Observer $observer)
5151
return;
5252
}
5353

54+
// @TODO clear table url_rewrite for entity_type category
55+
// @TODO mark indexer to invalidate index
56+
5457
/** @var CategoryResource $categoryResource */
5558
$categoryResource = $this->categoryResourceFactory->create();
5659

Observer/ProductsObserver.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ protected function updateData(Configuration $configuration, \Magento\Catalog\Mod
7474
if (!$configuration->isUseOnlyEmpty() ||
7575
($configuration->isUseOnlyEmpty() && empty($product->getDescription()))) {
7676
$product->setDescription($configuration->getDummyContentText());
77-
}if (!$configuration->isUseOnlyEmpty() ||
77+
}
78+
if (!$configuration->isUseOnlyEmpty() ||
7879
($configuration->isUseOnlyEmpty() && empty($product->getShortDescription()))) {
7980
$product->setShortDescription($configuration->getDummyContentText());
8081
}

Test/Unit/Console/Command/FuzzyfyrCommandTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ public function testExecuteError()
5858
$commandTester = new CommandTester($this->command);
5959
$commandTester->execute([]);
6060
}
61-
}
61+
}

build.sh

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,7 @@ fi
345345

346346
CURDIR=$(pwd)
347347
SRC=${arg_s:-"${CURDIR}"}
348+
EQP=${arg_t:-"${CURDIR}/build/eqp"}
348349
TMP=${arg_t:-"${CURDIR}/build/tmp"}
349350
DEST=${arg_d:-"${CURDIR}/build/store"}
350351
OUTPUT="${DEST}/allindata_contentfuzzyfyr.zip"
@@ -358,6 +359,10 @@ fi
358359
if [ ! -d "${TMP}" ]; then
359360
mkdir -p "${TMP}"
360361
fi
362+
if [ ! -d "${EQP}" ]; then
363+
mkdir -p "${EQP}"
364+
composer create-project --repository=https://repo.magento.com magento/marketplace-eqp "${EQP}"
365+
fi
361366
rm -rf "${TMP}"/*
362367
if [ ! -d "${DEST}" ]; then
363368
mkdir -p "${DEST}"
@@ -368,7 +373,7 @@ rm -rf "${DEST}"/*
368373
## Update dependencies
369374
## Based upon PHP 7.0
370375
##
371-
docker run -v "${SRC}":/www -v ~/.composer:/root/.composer danieldent/php-7.0-composer:latest bash -c 'apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libmcrypt-dev libpng12-dev libxslt-dev && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && docker-php-ext-install gd mcrypt xsl && cd /www && composer update'
376+
docker run -v "${SRC}":/www -v ~/.composer:/root/.composer --rm danieldent/php-7.1-composer:latest bash -c 'apt-get install -y libfreetype6-dev libjpeg62-turbo-dev libmcrypt-dev libpng12-dev libxslt-dev && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && docker-php-ext-install gd mcrypt xsl && cd /www && composer update'
372377

373378
##
374379
## Prepare important files
@@ -388,6 +393,11 @@ cp -pP "${SRC}/phpunit.xml" "${TMP}/phpunit.xml"
388393
cp -pP "${SRC}/README.md" "${TMP}/README.md"
389394
cp -pP "${SRC}/registration.php" "${TMP}/registration.php"
390395

396+
##
397+
## Validation for M2EQB
398+
##
399+
docker run -v "${TMP}":/www -v "${EQP}":/m2eqb -v ~/.composer:/root/.composer --rm danieldent/php-7.1-composer:latest bash -c 'cd /m2eqb && vendor/bin/phpcs /www --standard=MEQP2 --severity=10 --extensions=php,phtml'
400+
391401
##
392402
## Build package
393403
##

composer.lock

Lines changed: 32 additions & 84 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

docker-compose.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ services:
1717
- ./Observer:/var/www/html/app/code/AllInData/ContentFuzzyfyr/Observer:cached
1818
- ./Test:/var/www/html/app/code/AllInData/ContentFuzzyfyr/Test:cached
1919
- ./registration.php:/var/www/html/app/code/AllInData/ContentFuzzyfyr/registration.php
20-
- ./var:/var/www/html/var
2120
ports:
2221
- 8000:80
2322
networks: &appnetworks

0 commit comments

Comments
 (0)