Commit 14af2e71 authored by Mike Ryan's avatar Mike Ryan

#77: Quality improvements.

parent a211cc15
Pipeline #59196892 passed with stage
in 2 minutes and 22 seconds
......@@ -83,7 +83,7 @@ class EtlCommand extends Command
/**
* Obtain all task configuration contained in the specified directories.
*
* @param array $directoryNames
* @param string[] $directoryNames
* List of directories containing task configuration.
* @param array $options
* List of command-line options.
......
......@@ -35,6 +35,7 @@ EOT
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
/** @var string[] $directoryNames */
$directoryNames = $input->getOption('directory');
$options = ['select' => $input->getOption('select')];
$this->loadConfiguration($directoryNames, $options);
......
......@@ -34,6 +34,7 @@ EOT
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
/** @var string[] $directoryNames */
$directoryNames = $input->getOption('directory');
$this->loadConfiguration($directoryNames);
foreach ($input->getArgument('tasks') as $id) {
......
......@@ -37,6 +37,7 @@ EOT
*/
protected function execute(InputInterface $input, OutputInterface $output)
{
/** @var string[] $directoryNames */
$directoryNames = $input->getOption('directory');
$this->loadConfiguration($directoryNames);
$table = new Table($output);
......
......@@ -35,4 +35,6 @@ trait DBAL
}
return $this->connection;
}
abstract public function getConfigurationValue(string $optionName);
}
......@@ -25,7 +25,7 @@ class Record implements \Soong\Contracts\Data\Record
*
* Factory for creating Property instances.
*
* @var PropertyFactory $propertyFactory
* @var \Soong\Contracts\Data\PropertyFactory $propertyFactory
*/
protected $propertyFactory;
......
......@@ -242,6 +242,7 @@ class DBAL extends KeyMapBase
protected function extractedKeyColumns() : array
{
$counter = 1;
$result = [];
foreach (array_keys($this->getConfigurationValue('extractor_keys')) as $keyName) {
$columnName = self::EXTRACTED_KEY_PREFIX . $counter++;
$result[$keyName] = $columnName;
......@@ -260,6 +261,7 @@ class DBAL extends KeyMapBase
protected function loadedKeyColumns() : array
{
$counter = 1;
$result = [];
foreach (array_keys($this->getConfigurationValue('loader_keys')) as $keyName) {
$columnName = self::LOADED_KEY_PREFIX . $counter++;
$result[$keyName] = $columnName;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment