Skip to content

Commit 2808f2d

Browse files
author
Oleksii Korshenko
authored
Merge pull request #1444 from magento-engcom/develop-prs
Public Pull Requests: #10718 #10672
2 parents b9d696e + d490d5c commit 2808f2d

File tree

10 files changed

+26
-11
lines changed

10 files changed

+26
-11
lines changed

app/code/Magento/Email/Model/Template/Config/FileIterator.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,6 @@ public function current()
4747
);
4848
}
4949

50-
/** @var \Magento\Framework\Filesystem\File\Read $fileRead */
5150
$fileRead = $this->fileReadFactory->create($this->key(), DriverPool::FILE);
5251
$contents = $fileRead->readAll();
5352
return str_replace('<template ', '<template module="' . $moduleName . '" ', $contents);

app/code/Magento/Translation/Model/Js/DataProvider.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,6 @@ public function getData($themePath)
103103

104104
$dictionary = [];
105105
foreach ($files as $filePath) {
106-
/** @var \Magento\Framework\Filesystem\File\Read $read */
107106
$read = $this->fileReadFactory->create($filePath[0], \Magento\Framework\Filesystem\DriverPool::FILE);
108107
$content = $read->readAll();
109108
foreach ($this->getPhrases($content) as $phrase) {

dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/travis_acceptance_1.xml

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,13 +35,11 @@
3535
<module value="Magento_Customer" strict="1" />
3636
<module value="Magento_CustomerImportExport" strict="1" />
3737
<module value="Magento_Dhl" strict="1" />
38-
<module value="Magento_Directory" strict="1" />
3938
<module value="Magento_Downloadable" strict="1" />
4039
<module value="Magento_Email" strict="1" />
4140
<module value="Magento_Fedex" strict="1" />
4241
<module value="Magento_GiftMessage" strict="1" />
4342
<module value="Magento_GroupedImportExport" strict="1" />
44-
<module value="Magento_GroupedProduct" strict="1" />
4543
<module value="Magento_ImportExport" strict="1" />
4644
<module value="Magento_Indexer" strict="1" />
4745
<module value="Magento_Install" strict="1" />

dev/tests/functional/testsuites/Magento/Mtf/TestSuite/InjectableTests/travis_acceptance_2.xml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
<module value="Magento_ConfigurableProduct" strict="1" />
1313
<module value="Magento_Checkout" strict="1" />
1414
<module value="Magento_LayeredNavigation" strict="1" />
15-
<module value="Magento_Msrp" strict="1" />
1615
<module value="Magento_Multishipping" strict="1" />
1716
<module value="Magento_Newsletter" strict="1" />
1817
<module value="Magento_OfflinePayments" strict="1" />

lib/internal/Magento/Framework/Code/Generator.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ protected function shouldSkipGeneration($resultEntityType, $sourceClassName, $re
199199
{
200200
if (!$resultEntityType || !$sourceClassName) {
201201
return self::GENERATION_ERROR;
202-
} elseif ($this->definedClasses->isClassLoadableFromDisc($resultClass)) {
202+
} elseif ($this->definedClasses->isClassLoadableFromDisk($resultClass)) {
203203
$generatedFileName = $this->_ioObject->generateResultFileName($resultClass);
204204
/**
205205
* Must handle two edge cases: a competing process has generated the class and written it to disc already,

lib/internal/Magento/Framework/Code/Generator/DefinedClasses.php

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ class DefinedClasses
2121
*/
2222
public function isClassLoadable($className)
2323
{
24-
return $this->isClassLoadableFromMemory($className) || $this->isClassLoadableFromDisc($className);
24+
return $this->isClassLoadableFromMemory($className) || $this->isClassLoadableFromDisk($className);
2525
}
2626

2727
/**
@@ -36,12 +36,24 @@ public function isClassLoadableFromMemory($className)
3636
}
3737

3838
/**
39-
* Determine if a class exists on disc
39+
* Determine if a class exists on disk
4040
*
4141
* @param string $className
4242
* @return bool
43+
* @deprecated
4344
*/
4445
public function isClassLoadableFromDisc($className)
46+
{
47+
return $this->isClassLoadableFromDisk($className);
48+
}
49+
50+
/**
51+
* Determine if a class exists on disk
52+
*
53+
* @param string $className
54+
* @return bool
55+
*/
56+
public function isClassLoadableFromDisk($className)
4557
{
4658
try {
4759
return (bool)AutoloaderRegistry::getAutoloader()->findFile($className);

lib/internal/Magento/Framework/Code/Test/Unit/Generator/EntityAbstractTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ protected function _prepareMocksForValidateData(
233233
->willReturn($sourceClassExists);
234234
if ($resultClassExists) {
235235
$definedClassesMock->expects($this->once())
236-
->method('isClassLoadableFromDisc')
236+
->method('isClassLoadableFromDisk')
237237
->with($this->resultClass)
238238
->willReturn($resultClassExists);
239239
}

lib/internal/Magento/Framework/Code/Test/Unit/GeneratorTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ public function testGenerateClassWithError()
114114
public function testGenerateClassWithExistName($fileExists)
115115
{
116116
$this->definedClassesMock->expects($this->any())
117-
->method('isClassLoadableFromDisc')
117+
->method('isClassLoadableFromDisk')
118118
->willReturn(true);
119119

120120
$resultClassFileName = '/Magento/Path/To/Class.php';

lib/internal/Magento/Framework/Config/FileIterator.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,6 @@ public function rewind()
6666
*/
6767
public function current()
6868
{
69-
/** @var \Magento\Framework\Filesystem\File\Read $fileRead */
7069
$fileRead = $this->fileReadFactory->create($this->key(), DriverPool::FILE);
7170
return $fileRead->readAll();
7271
}

lib/internal/Magento/Framework/Filesystem/File/ReadInterface.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,15 @@ interface ReadInterface
1919
*/
2020
public function read($length);
2121

22+
/**
23+
* Returns the complete content of the file.
24+
*
25+
* @param string|null $flag
26+
* @param resource|null $context
27+
* @return string
28+
*/
29+
public function readAll($flag = null, $context = null);
30+
2231
/**
2332
* Reads the line with specified number of bytes from the current position.
2433
*

0 commit comments

Comments
 (0)