| Conditions | 2 |
| Paths | 2 |
| Total Lines | 18 |
| Code Lines | 10 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | public function create(array $config) |
||
| 16 | { |
||
| 17 | $broLibPath = dirname(dirname($config['binFilePath'])); |
||
| 18 | $preset = $config['preset']; |
||
| 19 | |||
| 20 | $vendoredPath = $broLibPath . '/../../bro/code'; |
||
| 21 | |||
| 22 | $application = new Application(); |
||
| 23 | |||
| 24 | if (file_exists($vendoredPath)) { |
||
| 25 | $broLibPath = $vendoredPath; |
||
| 26 | } |
||
| 27 | |||
| 28 | $broConfigPath = $broLibPath . '/presets/' . basename($preset) . '.php'; |
||
| 29 | $this->extendApplication($application, $broConfigPath); |
||
| 30 | |||
| 31 | return $application; |
||
| 32 | } |
||
| 33 | |||
| 45 |