Various code cleanup

This commit is contained in:
James Cole
2017-08-12 07:47:42 +02:00
parent 81fb3df45e
commit 743547096e
39 changed files with 4885 additions and 3714 deletions

View File

@@ -27,6 +27,13 @@ interface ConfigurationInterface
*/
public function getData(): array;
/**
* Return possible warning to user.
*
* @return string
*/
public function getWarningMessage(): string;
/**
* @param ImportJob $job
*
@@ -43,11 +50,4 @@ interface ConfigurationInterface
*/
public function storeConfiguration(array $data): bool;
/**
* Return possible warning to user.
*
* @return string
*/
public function getWarningMessage(): string;
}

View File

@@ -61,6 +61,16 @@ class Initial implements ConfigurationInterface
return $data;
}
/**
* Return possible warning to user.
*
* @return string
*/
public function getWarningMessage(): string
{
return '';
}
/**
* @param ImportJob $job
*
@@ -135,14 +145,4 @@ class Initial implements ConfigurationInterface
return $config;
}
/**
* Return possible warning to user.
*
* @return string
*/
public function getWarningMessage(): string
{
return '';
}
}

View File

@@ -106,6 +106,16 @@ class Map implements ConfigurationInterface
}
/**
* Return possible warning to user.
*
* @return string
*/
public function getWarningMessage(): string
{
return '';
}
/**
* @param ImportJob $job
*
@@ -268,14 +278,4 @@ class Map implements ConfigurationInterface
return $column;
}
/**
* Return possible warning to user.
*
* @return string
*/
public function getWarningMessage(): string
{
return '';
}
}

View File

@@ -262,7 +262,7 @@ class Roles implements ConfigurationInterface
$this->warning = '';
}
if ($assigned === 0 || !$hasAmount) {
$this->warning = trans('csv.roles_warning');
$this->warning = strval(trans('csv.roles_warning'));
}
return true;