| Conditions | 2 |
| Paths | 2 |
| Total Lines | 15 |
| Code Lines | 9 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 28 | public function execute(InputInterface $input, OutputInterface $output) |
||
| 29 | { |
||
| 30 | $config = config()->get('database', []); |
||
| 31 | $connection = $input->getOption('connection'); |
||
| 32 | if (!isset($config[$connection])) { |
||
| 33 | throw new \RuntimeException(sprintf('Cannot found database "%s" config', $connection)); |
||
| 34 | } |
||
| 35 | |||
| 36 | $this->config = $config[$connection]; |
||
|
|
|||
| 37 | $this->config['dbname'] = $this->config['name']; |
||
| 38 | |||
| 39 | $this->createConnection(); |
||
| 40 | |||
| 41 | return parent::execute($input, $output); |
||
| 42 | } |
||
| 43 | } |
||
| 44 |
An attempt at access to an undefined property has been detected. This may either be a typographical error or the property has been renamed but there are still references to its old name.
If you really want to allow access to undefined properties, you can define magic methods to allow access. See the php core documentation on Overloading.