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