diff --git a/Plugin/Model/Config/ConfigPlugin.php b/Plugin/Config/ValidateConfiguration.php similarity index 80% rename from Plugin/Model/Config/ConfigPlugin.php rename to Plugin/Config/ValidateConfiguration.php index c8e798a..9258936 100644 --- a/Plugin/Model/Config/ConfigPlugin.php +++ b/Plugin/Config/ValidateConfiguration.php @@ -1,6 +1,6 @@ _preDefinedServices[$configValue])) { + if (false === isset($this->_preDefinedServices[$configValue])) { throw new \LogicException(sprintf('Unknown transport: "%s"', $configValue)); } - if (false == $this->isClassExists($this->_preDefinedServices[$configValue]['class'])) { + if (false === $this->isClassExists($this->_preDefinedServices[$configValue]['class'])) { throw new CouldNotSaveException( __( - vsprintf( - '%s transport requires package "%s". Please install it via composer. #> php composer.php require %s', + '%name transport requires package "%package".' + . ' Please install it via composer. #> php composer.php require %package', [ - $this->_preDefinedServices[$configValue]['name'], - $this->_preDefinedServices[$configValue]['package'], - $this->_preDefinedServices[$configValue]['package'] + 'name' => $this->_preDefinedServices[$configValue]['name'], + 'package' => $this->_preDefinedServices[$configValue]['package'], ] ) - ) ); } } diff --git a/etc/di.xml b/etc/di.xml index bf32d8f..37ee724 100644 --- a/etc/di.xml +++ b/etc/di.xml @@ -6,6 +6,6 @@ --> - + \ No newline at end of file