Fix cs and add get method in managers
modifié: core/lib/Thelia/Core/FileFormat/Archive/ArchiveBuilderManager.php modifié: core/lib/Thelia/Core/FileFormat/Formatter/FormatterData.php modifié: core/lib/Thelia/Core/FileFormat/Formatter/FormatterManager.php modifié: core/lib/Thelia/Tools/FileDownload/FileDownloader.php modifié: core/lib/Thelia/Tools/FileDownload/FileDownloaderAwareTrait.php modifié: core/lib/Thelia/Tools/FileDownload/FileDownloaderInterface.php
This commit is contained in:
@@ -45,8 +45,8 @@ class FileDownloader implements FileDownloaderInterface
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $url
|
||||
* @param string $pathToStore
|
||||
* @param string $url
|
||||
* @param string $pathToStore
|
||||
* @throws \Thelia\Exception\FileNotFoundException
|
||||
* @throws \ErrorException
|
||||
* @throws \HttpUrlException
|
||||
@@ -125,7 +125,7 @@ class FileDownloader implements FileDownloaderInterface
|
||||
*/
|
||||
$file = @fopen($pathToStore, "w");
|
||||
|
||||
if($file === false) {
|
||||
if ($file === false) {
|
||||
$translatedErrorMessage = $this->translator->trans(
|
||||
"Failed to open a writing stream on the file: %file",
|
||||
[
|
||||
@@ -140,4 +140,4 @@ class FileDownloader implements FileDownloaderInterface
|
||||
fputs($file, $response);
|
||||
fclose($file);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -35,7 +35,7 @@ trait FileDownloaderAwareTrait
|
||||
}
|
||||
|
||||
/**
|
||||
* @param FileDownloaderInterface $fileDownloader
|
||||
* @param FileDownloaderInterface $fileDownloader
|
||||
* @return $this
|
||||
*/
|
||||
public function setFileDownloader(FileDownloaderInterface $fileDownloader)
|
||||
@@ -44,4 +44,4 @@ trait FileDownloaderAwareTrait
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,6 @@ namespace Thelia\Tools\FileDownload;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\Translation\Translator;
|
||||
|
||||
|
||||
/**
|
||||
* Class FileDownloader
|
||||
* @package Thelia\Tools\FileDownload
|
||||
@@ -23,8 +22,8 @@ use Symfony\Component\Translation\Translator;
|
||||
interface FileDownloaderInterface
|
||||
{
|
||||
/**
|
||||
* @param string $url
|
||||
* @param string $pathToStore
|
||||
* @param string $url
|
||||
* @param string $pathToStore
|
||||
* @throws \Thelia\Exception\FileNotFoundException
|
||||
* @throws \ErrorException
|
||||
* @throws \HttpUrlException
|
||||
@@ -41,4 +40,4 @@ interface FileDownloaderInterface
|
||||
* Returns an hydrated instance
|
||||
*/
|
||||
public static function getInstance();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user