|
1 | 1 | <?php
|
2 | 2 |
|
3 |
| -namespace Enqueue\Magento2\Plugin\Model\Config; |
| 3 | +namespace Enqueue\Magento2\Plugin\Config; |
4 | 4 |
|
5 | 5 | use \Enqueue\AmqpExt\AmqpContext;
|
6 | 6 | use Enqueue\Null\NullContext;
|
|
11 | 11 | use \Enqueue\Dbal\DbalContext;
|
12 | 12 | use \Magento\Framework\Exception\TemporaryState\CouldNotSaveException;
|
13 | 13 |
|
14 |
| -class ConfigPlugin |
| 14 | +class ValidateConfiguration |
15 | 15 | {
|
16 | 16 | /**
|
17 | 17 | * @var array
|
@@ -75,22 +75,20 @@ public function beforeSave(\Magento\Config\Model\Config $subject)
|
75 | 75 | if (isset($beforeSaveData['transport']['fields']['default']['value'])) {
|
76 | 76 | $configValue = $beforeSaveData['transport']['fields']['default']['value'];
|
77 | 77 |
|
78 |
| - if (false == isset($this->_preDefinedServices[$configValue])) { |
| 78 | + if (false === isset($this->_preDefinedServices[$configValue])) { |
79 | 79 | throw new \LogicException(sprintf('Unknown transport: "%s"', $configValue));
|
80 | 80 | }
|
81 | 81 |
|
82 |
| - if (false == $this->isClassExists($this->_preDefinedServices[$configValue]['class'])) { |
| 82 | + if (false === $this->isClassExists($this->_preDefinedServices[$configValue]['class'])) { |
83 | 83 | throw new CouldNotSaveException(
|
84 | 84 | __(
|
85 |
| - vsprintf( |
86 |
| - '%s transport requires package "%s". Please install it via composer. #> php composer.php require %s', |
| 85 | + '%name transport requires package "%package".' |
| 86 | + . ' Please install it via composer. #> php composer.php require %package', |
87 | 87 | [
|
88 |
| - $this->_preDefinedServices[$configValue]['name'], |
89 |
| - $this->_preDefinedServices[$configValue]['package'], |
90 |
| - $this->_preDefinedServices[$configValue]['package'] |
| 88 | + 'name' => $this->_preDefinedServices[$configValue]['name'], |
| 89 | + 'package' => $this->_preDefinedServices[$configValue]['package'], |
91 | 90 | ]
|
92 | 91 | )
|
93 |
| - ) |
94 | 92 | );
|
95 | 93 | }
|
96 | 94 | }
|
|
0 commit comments