| Conditions | 5 |
| Paths | 3 |
| Total Lines | 20 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php namespace Bedard\Shop\Classes; |
||
| 27 | public function getDrivers() |
||
| 28 | { |
||
| 29 | $drivers = []; |
||
| 30 | |||
| 31 | foreach ($this->manager->getPlugins() as $id => $plugin) { |
||
| 32 | if (! method_exists($plugin, 'registerShopDrivers')) { |
||
| 33 | continue; |
||
| 34 | } |
||
| 35 | |||
| 36 | foreach ($plugin->registerShopDrivers() as $driver) { |
||
| 37 | if (array_key_exists('name', $driver)) { |
||
| 38 | $driver['name'] = trans($driver['name']); |
||
| 39 | } |
||
| 40 | |||
| 41 | $drivers[] = $driver; |
||
| 42 | } |
||
| 43 | } |
||
| 44 | |||
| 45 | return $drivers; |
||
| 46 | } |
||
| 47 | |||
| 78 |
Adding a
@returnannotation to a constructor is not recommended, since a constructor does not have a meaningful return value.Please refer to the PHP core documentation on constructors.