Skip to content

Commit d490d5c

Browse files
author
Oleksii Korshenko
authored
MAGETWO-71954: Expanded ReadInterface #10672
2 parents c436898 + b06574f commit d490d5c

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
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) {

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)