Skip to content

Commit cb60376

Browse files
Merge branch 'application-server-part3' of github.com:magento-performance/magento2ce into ACPT-1360
2 parents ab84de7 + 4d6f13b commit cb60376

File tree

2 files changed

+10
-9
lines changed

2 files changed

+10
-9
lines changed

app/code/Magento/ImportExport/Controller/Adminhtml/Import/Download.php

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -106,18 +106,13 @@ public function execute()
106106
$fileSize = $this->sampleFileProvider->getSize($entityName);
107107
$fileName = $entityName . '.csv';
108108

109-
$this->fileFactory->create(
109+
return $this->fileFactory->create(
110110
$fileName,
111-
null,
111+
$fileContents,
112112
DirectoryList::VAR_IMPORT_EXPORT,
113113
'application/octet-stream',
114114
$fileSize
115115
);
116-
117-
$resultRaw = $this->resultRawFactory->create();
118-
$resultRaw->setContents($fileContents);
119-
120-
return $resultRaw;
121116
}
122117

123118
/**

dev/tests/static/testsuite/Magento/Test/Integrity/ObserverImplementationTest.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,19 @@ public function testObserverHasNoExtraPublicMethods()
5757
$errors = [];
5858
foreach (self::$observerClasses as $observerClass) {
5959
$reflection = (new \ReflectionClass($observerClass));
60+
$publicMethodsCount = 0;
6061
$maxCountMethod = $reflection->getConstructor() ? 2 : 1;
62+
$publicMethods = $reflection->getMethods(\ReflectionMethod::IS_PUBLIC);
63+
foreach ($publicMethods as $publicMethod) {
64+
if (!str_starts_with($publicMethod->getName(), '_')) {
65+
$publicMethodsCount++;
66+
}
67+
}
6168

62-
if (count($reflection->getMethods(\ReflectionMethod::IS_PUBLIC)) > $maxCountMethod) {
69+
if ($publicMethodsCount > $maxCountMethod) {
6370
$errors[] = $observerClass;
6471
}
6572
}
66-
$errors = array_diff($errors, [GetPriceConfigurationObserver::class]);
6773

6874
if ($errors) {
6975
$errors = array_unique($errors);

0 commit comments

Comments
 (0)