Loading src/UnicaenDbImport/Config/ConfigFactory.php +0 −12 Changes for src/UnicaenDbImport/Config/ConfigFactory.php: 0 added lines, 12 removed lines. Original line number Diff line number Diff line Loading @@ -299,12 +299,6 @@ class ConfigFactory */ private function createSource(array $sourceConfig): Source { // normalize if (array_key_exists('name', $sourceConfig)) { $sourceConfig['code'] = $sourceConfig['name']; unset($sourceConfig['name']); } $connectionName = $sourceConfig['connection']; $sourceConfig['connection'] = $this->getConnectionByName($connectionName); Loading @@ -325,12 +319,6 @@ class ConfigFactory */ private function createDestination(array $destinationConfig): Destination { // normalize if (array_key_exists('name', $destinationConfig)) { $destinationConfig['code'] = $destinationConfig['name']; unset($destinationConfig['name']); } $connectionName = $destinationConfig['connection']; $destinationConfig['connection'] = $this->getConnectionByName($connectionName); Loading src/UnicaenDbImport/Domain/Destination.php +3 −3 Changes for src/UnicaenDbImport/Domain/Destination.php: 3 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ class Destination implements DestinationInterface */ protected function validateConfig() { (new AssertionChain($this->config->get($key = 'code'), "Une string non vide est requise pour la clé suivante: $key")) (new AssertionChain($this->config->get($key = 'name'), "Une string non vide est requise pour la clé suivante: $key")) ->notEmpty() ->string(); Loading Loading @@ -111,9 +111,9 @@ class Destination implements DestinationInterface } public function getCode(): string public function getName(): string { return $this->config->get('code'); return $this->config->get('name'); } public function getTable(): string Loading src/UnicaenDbImport/Domain/DestinationInterface.php +2 −2 Changes for src/UnicaenDbImport/Domain/DestinationInterface.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -29,9 +29,9 @@ interface DestinationInterface /** * Retourne le petit nom de cette destination. * * @return string * @return null|string */ public function getCode(): string; public function getName(): string; /** * Retourne le nom de la table de destination. Loading src/UnicaenDbImport/Domain/Import.php +1 −5 Changes for src/UnicaenDbImport/Domain/Import.php: 1 added line, 5 removed lines. Original line number Diff line number Diff line Loading @@ -69,11 +69,7 @@ class Import implements ImportInterface */ public function getName(): string { if ($name = $this->config->get('name')) { return $name; } return $this->getSource()->getCode() . ' ==> ' . $this->getDestination()->getCode(); return $this->config->get('name'); } /** Loading src/UnicaenDbImport/Domain/SourceInterface.php +9 −2 Changes for src/UnicaenDbImport/Domain/SourceInterface.php: 9 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -18,9 +18,16 @@ interface SourceInterface /** * Retourne le petit nom de cette source. * * @return string * @return null|string */ public function getName(): string; /** * Retourne le 'code' unique permettant d'identifier cette source. * * @return null|string */ public function getCode(): string; public function getCode(): ?string; /** * Retourne le nom de la table de source. Loading Loading
src/UnicaenDbImport/Config/ConfigFactory.php +0 −12 Changes for src/UnicaenDbImport/Config/ConfigFactory.php: 0 added lines, 12 removed lines. Original line number Diff line number Diff line Loading @@ -299,12 +299,6 @@ class ConfigFactory */ private function createSource(array $sourceConfig): Source { // normalize if (array_key_exists('name', $sourceConfig)) { $sourceConfig['code'] = $sourceConfig['name']; unset($sourceConfig['name']); } $connectionName = $sourceConfig['connection']; $sourceConfig['connection'] = $this->getConnectionByName($connectionName); Loading @@ -325,12 +319,6 @@ class ConfigFactory */ private function createDestination(array $destinationConfig): Destination { // normalize if (array_key_exists('name', $destinationConfig)) { $destinationConfig['code'] = $destinationConfig['name']; unset($destinationConfig['name']); } $connectionName = $destinationConfig['connection']; $destinationConfig['connection'] = $this->getConnectionByName($connectionName); Loading
src/UnicaenDbImport/Domain/Destination.php +3 −3 Changes for src/UnicaenDbImport/Domain/Destination.php: 3 added lines, 3 removed lines. Original line number Diff line number Diff line Loading @@ -82,7 +82,7 @@ class Destination implements DestinationInterface */ protected function validateConfig() { (new AssertionChain($this->config->get($key = 'code'), "Une string non vide est requise pour la clé suivante: $key")) (new AssertionChain($this->config->get($key = 'name'), "Une string non vide est requise pour la clé suivante: $key")) ->notEmpty() ->string(); Loading Loading @@ -111,9 +111,9 @@ class Destination implements DestinationInterface } public function getCode(): string public function getName(): string { return $this->config->get('code'); return $this->config->get('name'); } public function getTable(): string Loading
src/UnicaenDbImport/Domain/DestinationInterface.php +2 −2 Changes for src/UnicaenDbImport/Domain/DestinationInterface.php: 2 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -29,9 +29,9 @@ interface DestinationInterface /** * Retourne le petit nom de cette destination. * * @return string * @return null|string */ public function getCode(): string; public function getName(): string; /** * Retourne le nom de la table de destination. Loading
src/UnicaenDbImport/Domain/Import.php +1 −5 Changes for src/UnicaenDbImport/Domain/Import.php: 1 added line, 5 removed lines. Original line number Diff line number Diff line Loading @@ -69,11 +69,7 @@ class Import implements ImportInterface */ public function getName(): string { if ($name = $this->config->get('name')) { return $name; } return $this->getSource()->getCode() . ' ==> ' . $this->getDestination()->getCode(); return $this->config->get('name'); } /** Loading
src/UnicaenDbImport/Domain/SourceInterface.php +9 −2 Changes for src/UnicaenDbImport/Domain/SourceInterface.php: 9 added lines, 2 removed lines. Original line number Diff line number Diff line Loading @@ -18,9 +18,16 @@ interface SourceInterface /** * Retourne le petit nom de cette source. * * @return string * @return null|string */ public function getName(): string; /** * Retourne le 'code' unique permettant d'identifier cette source. * * @return null|string */ public function getCode(): string; public function getCode(): ?string; /** * Retourne le nom de la table de source. Loading