Closed frol-kr closed 7 years ago
It would be nice to have a common interface for the merge tasks. Now if you want to generalise the process of building parallel execution of tasks, you probably end up having your report type as a config, from which task is built.
/** * @return MergeXmlReportsTask|MergeHTMLReportsTask|\Robo\Collection\CollectionBuilder */ public function makeMergeTask() { if ('xml' === $this->reportType) { /** @var MergeXmlReportsTask $merge */ $merge = $this->roboFile->taskMergeHTMLReports(); } else { /** @var MergeHTMLReportsTask $merge */ $merge = $this->roboFile->taskMergeXmlReports(); } return $merge; }
instead of
/** * @return MergeReportsTaskInterface|\Robo\Collection\CollectionBuilder */ public function makeMergeTask() { return ('xml' === $this->reportType) ? $this->roboFile->taskMergeXmlReports() : $this->roboFile->taskMergeHTMLReports() }
So what do you think about this? Here a pr
It would be nice to have a common interface for the merge tasks. Now if you want to generalise the process of building parallel execution of tasks, you probably end up having your report type as a config, from which task is built.
instead of
So what do you think about this? Here a pr