@@ -42,13 +42,18 @@ class Import implements ImportInterface
*/
protectedfunctionvalidateConfig()
{
(newAssertionChain($this->config->get($key='source'),"Une instance de ".SourceInterface::class." est requise pour la clé suivante: $key"))
(newAssertionChain($this->config->get($key='source'),"Une instance de ".SourceInterface::class." est requise pour la clé suivante: $key (import {$this})"))
->notEmpty()
->isInstanceOf(SourceInterface::class);
(newAssertionChain($this->config->get($key='destination'),"Une instance de ".DestinationInterface::class." est requise pour la clé suivante: $key"))
(newAssertionChain($this->config->get($key='destination'),"Une instance de ".DestinationInterface::class." est requise pour la clé suivante: $key (import {$this})"))
->notEmpty()
->isInstanceOf(DestinationInterface::class);
if($this->config->offsetExists($key='order')){
(newAssertionChain($this->config->get('order'),"Un entier est requis pour la clé suivante: $key (import {$this})"))
->integer();
}
}
/**
...
...
@@ -86,4 +91,12 @@ class Import implements ImportInterface
@@ -49,20 +49,25 @@ class Synchro implements SynchroInterface
*/
protectedfunctionvalidateConfig()
{
(newAssertionChain($this->config->get($key='source'),"Une instance de ".SourceInterface::class." est requise pour la clé suivante: $key"))
(newAssertionChain($this->config->get($key='source'),"Une instance de ".SourceInterface::class." est requise pour la clé suivante: $key (synchro {$this})"))
->notEmpty()
->isInstanceOf(SourceInterface::class);
(newAssertionChain($this->config->get($key='destination'),"Une instance de ".DestinationInterface::class." est requise pour la clé suivante: $key"))
(newAssertionChain($this->config->get($key='destination'),"Une instance de ".DestinationInterface::class." est requise pour la clé suivante: $key (synchro {$this})"))