Favor object creation in factories (#459)
Instead of passing factories in the constructors and let objects call the factory method, create all dependencies directly in the factories.
This commit is contained in:
1 parent
4ec3a21170
commit
61f2addefa
13 files changed
+84
-114
No files matched your search
@@ -53,16 +53,14 @@ class SheetHelper
|
||||
* @param string $filePath Path of the XLSX file being read
|
||||
* @param \Box\Spout\Common\Manager\OptionsManagerInterface $optionsManager Reader's options manager
|
||||
* @param \Box\Spout\Reader\XLSX\Helper\SharedStringsHelper Helper to work with shared strings
|
||||
* @param \Box\Spout\Common\Helper\GlobalFunctionsHelper $globalFunctionsHelper
|
||||
* @param \Box\Spout\Common\Helper\Escaper\XLSX $escaper Used to unescape XML data
|
||||
* @param EntityFactory $entityFactory Factory to create entities
|
||||
*/
|
||||
public function __construct($filePath, $optionsManager, $sharedStringsHelper, $globalFunctionsHelper, $escaper, $entityFactory)
|
||||
public function __construct($filePath, $optionsManager, $sharedStringsHelper, $escaper, $entityFactory)
|
||||
{
|
||||
$this->filePath = $filePath;
|
||||
$this->optionsManager = $optionsManager;
|
||||
$this->sharedStringsHelper = $sharedStringsHelper;
|
||||
$this->globalFunctionsHelper = $globalFunctionsHelper;
|
||||
$this->escaper = $escaper;
|
||||
$this->entityFactory = $entityFactory;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user